/* # 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 #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 *_hash; QSystemTrayIcon *_trayIcon; QString _nickname; QMenu *_menu; QAction *_sendFileAction; }; #endif /* CLIENTCHATDIALOG_H_ */