equal
deleted
inserted
replaced
19 |
19 |
20 #ifndef _CHAT_WIDGET_INCLUDED |
20 #ifndef _CHAT_WIDGET_INCLUDED |
21 #define _CHAT_WIDGET_INCLUDED |
21 #define _CHAT_WIDGET_INCLUDED |
22 |
22 |
23 #include <QWidget> |
23 #include <QWidget> |
24 #include <QListWidget> |
|
25 #include <QString> |
24 #include <QString> |
26 #include <QGridLayout> |
25 #include <QGridLayout> |
27 #include <QList> |
26 #include <QList> |
28 #include <QPair> |
27 #include <QPair> |
29 #include <QRegExp> |
28 #include <QRegExp> |
30 #include <QHash> |
29 #include <QHash> |
|
30 #include <QListWidgetItem> |
31 |
31 |
32 #include "SDLInteraction.h" |
32 #include "SDLInteraction.h" |
33 |
33 |
34 #include "SmartLineEdit.h" |
34 #include "SmartLineEdit.h" |
35 |
35 |
36 class ListWidgetNickItem; |
|
37 class QTextBrowser; |
36 class QTextBrowser; |
38 class QLineEdit; |
37 class QLineEdit; |
39 class QListWidget; |
38 class QListView; |
40 class QSettings; |
39 class QSettings; |
|
40 class QAbstractListModel; |
41 |
41 |
42 /// Class for custom nickname sorting |
42 /// Class for custom nickname sorting |
43 class ListWidgetNickItem : public QListWidgetItem |
43 class ListWidgetNickItem : public QListWidgetItem |
44 { |
44 { |
45 public: |
45 public: |
85 static const QString & styleSheet(); |
85 static const QString & styleSheet(); |
86 void displayError(const QString & message); |
86 void displayError(const QString & message); |
87 void displayNotice(const QString & message); |
87 void displayNotice(const QString & message); |
88 void displayWarning(const QString & message); |
88 void displayWarning(const QString & message); |
89 void setUser(const QString & nickname); |
89 void setUser(const QString & nickname); |
|
90 void setUsersModel(QAbstractListModel * model); |
90 |
91 |
91 protected: |
92 protected: |
92 virtual void dragEnterEvent(QDragEnterEvent * event); |
93 virtual void dragEnterEvent(QDragEnterEvent * event); |
93 virtual void dropEvent(QDropEvent * event); |
94 virtual void dropEvent(QDropEvent * event); |
94 |
95 |
135 private: |
136 private: |
136 bool m_isAdmin; |
137 bool m_isAdmin; |
137 QGridLayout mainLayout; |
138 QGridLayout mainLayout; |
138 QTextBrowser* chatText; |
139 QTextBrowser* chatText; |
139 QStringList chatStrings; |
140 QStringList chatStrings; |
140 QListWidget* chatNicks; |
141 QListView* chatNicks; |
141 SmartLineEdit* chatEditLine; |
142 SmartLineEdit* chatEditLine; |
142 QAction * acInfo; |
143 QAction * acInfo; |
143 QAction * acKick; |
144 QAction * acKick; |
144 QAction * acBan; |
145 QAction * acBan; |
145 QAction * acFollow; |
146 QAction * acFollow; |