summaryrefslogtreecommitdiffstats
path: root/src/gui/clientChatDialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/clientChatDialog.h')
-rw-r--r--src/gui/clientChatDialog.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/gui/clientChatDialog.h b/src/gui/clientChatDialog.h
new file mode 100644
index 0000000..42bbb75
--- /dev/null
+++ b/src/gui/clientChatDialog.h
@@ -0,0 +1,63 @@
+/*
+ # Copyright (c) 2009, 2010 - OpenSLX Project, Computer Center University of
+ # Freiburg
+ #
+ # This program is free software distributed under the GPL version 2.
+ # See http://openslx.org/COPYING
+ #
+ # If you have any feedback please consult http://openslx.org/feedback and
+ # send your suggestions, praise, or complaints to feedback@openslx.org
+ #
+ # General information about OpenSLX can be found at http://openslx.org/
+ */
+
+#ifndef CLIENTCHATDIALOG_H_
+#define CLIENTCHATDIALOG_H_
+
+#include <QtGui>
+#include "pvsinterface.h"
+#include "clientFileSendDialog.h"
+#include "ui_clientChatDialog.h"
+
+class ClientChatDialog: public QDialog, private Ui::ClientChatDialogClass
+{
+Q_OBJECT
+
+public:
+ ClientChatDialog(QWidget *parent = 0);
+ ~ClientChatDialog();
+ void setTrayIcon(QSystemTrayIcon *trayIcon);
+
+private Q_SLOTS:
+ void send();
+ void receive(QString nick_from, QString nick_to, QString msg);
+ void addTab(QModelIndex i);
+ void removeTab(int i);
+ void addClient(QString nick);
+ void removeClient(QString nick);
+ void showMenu(QPoint p);
+ void removeIcon(int i);
+ void sendFile();
+ void sendFile(QString filename);
+ void connected();
+ void disconnected();
+
+protected:
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dropEvent(QDropEvent *event);
+
+private:
+ QTextEdit* getTab(QString text);
+ void printMsg(QString nick_from, QString msg, QTextEdit *t);
+ void printEvent(QString msg);
+
+ OrgOpenslxPvsInterface *_ifaceDBus;
+ QHash<QString, QTextEdit*> *_hash;
+ QSystemTrayIcon *_trayIcon;
+ QString _nickname;
+ QMenu *_menu;
+ QAction *_sendFileAction;
+
+};
+
+#endif /* CLIENTCHATDIALOG_H_ */