blob: 728af05577e65fd93fc8aae26b4f29e33b61399d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#ifndef SERVERCHATDIALOG_H_
#define SERVERCHATDIALOG_H_
#include <QtGui>
#include <src/gui/serverFileTransfert.h>
#include "pvsinterface.h"
class MainWindow;
namespace Ui
{
class ServerChatDialogClass;
}
class ServerChatDialog: public QDialog
{
Q_OBJECT
public:
ServerChatDialog(QWidget *parent = 0);
~ServerChatDialog();
void setTrayIcon(QSystemTrayIcon *trayIcon);
void chat_nicklist_update();
void chat_client_add(QString nick);
void chat_client_remove(QString nick);
public Q_SLOTS:
void open();
void chat_receive(QString nick_from, QString nick_to, QString msg);
void chat_send();
private Q_SLOTS:
void addTab(QModelIndex i);
void sendFile();
void showMenu(QPoint p);
void removeTab(int i);
void removeIcon(int i);
private:
Ui::ServerChatDialogClass *uichat;
QTextEdit* getTab(QString text);
void showMsg(QString nick_from, QString msg, QTextEdit *t);
void sendFile(QString filename);
void showEvent(QString msg);
QList<QTextEdit *> _tabList;
QHash<QString, QTextEdit*> *_hash;
QString _nickname;
QStringList _nickList;
QMenu* _menu;
QAction* _sendFileAction;
protected:
void dragEnterEvent(QDragEnterEvent *event);
void dragMoveEvent(QDragMoveEvent *event);
void dragLeaveEvent(QDragLeaveEvent *event);
void dropEvent(QDropEvent *event);
};
#endif /* SERVERCHATDIALOG_H_ */
|