overte-AleziaKurdis/interface/src/ui/ChatWindow.h
Andrzej Kapolka b721533f0b Make chat a dock widget, since that's the behavior it's emulating anyway
(and for some reason, the current strategy causes a problem on at least Ryan's
and my machine).
2014-03-14 10:43:12 -07:00

63 lines
1.2 KiB
C++

//
// ChatWindow.h
// interface
//
// Created by Dimitar Dobrev on 3/6/14.
// Copyright (c) 2014 High Fidelity, Inc. All rights reserved.
//
#ifndef __interface__ChatWindow__
#define __interface__ChatWindow__
#include <QDateTime>
#include <QDockWidget>
#include <QTimer>
#include <Application.h>
#ifdef HAVE_QXMPP
#include <QXmppClient.h>
#include <QXmppMessage.h>
#endif
namespace Ui {
class ChatWindow;
}
class ChatWindow : public QDockWidget {
Q_OBJECT
public:
ChatWindow();
~ChatWindow();
virtual void keyPressEvent(QKeyEvent *event);
virtual void showEvent(QShowEvent* event);
protected:
bool eventFilter(QObject* sender, QEvent* event);
private:
#ifdef HAVE_QXMPP
QString getParticipantName(const QString& participant);
#endif
void startTimerForTimeStamps();
void addTimeStamp();
Ui::ChatWindow* ui;
int numMessagesAfterLastTimeStamp;
QDateTime lastMessageStamp;
private slots:
void connected();
void timeout();
#ifdef HAVE_QXMPP
void error(QXmppClient::Error error);
void participantsChanged();
void messageReceived(const QXmppMessage& message);
#endif
};
#endif /* defined(__interface__ChatWindow__) */