equal
deleted
inserted
replaced
35 class HWChatWidget : public QWidget |
35 class HWChatWidget : public QWidget |
36 { |
36 { |
37 Q_OBJECT |
37 Q_OBJECT |
38 |
38 |
39 public: |
39 public: |
40 HWChatWidget(QWidget* parent, QSettings * gameSettings, SDLInteraction * sdli, bool notify); |
40 HWChatWidget(QWidget* parent, QSettings * gameSettings, SDLInteraction * sdli, bool notify); |
|
41 void loadLists(const QString & nick); |
|
42 void saveLists(const QString & nick); |
|
43 void setShowReady(bool s); |
|
44 |
|
45 private: |
|
46 void loadList(QStringList & list, const QString & file); |
|
47 void saveList(QStringList & list, const QString & file); |
|
48 void updateIcon(QListWidgetItem *item); |
|
49 void updateIcons(); |
41 |
50 |
42 public slots: |
51 public slots: |
43 void onChatString(const QString& str); |
52 void onChatString(const QString& str); |
44 void onServerMessage(const QString& str); |
53 void onServerMessage(const QString& str); |
45 void nickAdded(const QString& nick, bool notifyNick); |
54 void nickAdded(const QString& nick, bool notifyNick); |
57 |
66 |
58 private: |
67 private: |
59 QGridLayout mainLayout; |
68 QGridLayout mainLayout; |
60 QTextBrowser* chatText; |
69 QTextBrowser* chatText; |
61 QStringList chatStrings; |
70 QStringList chatStrings; |
|
71 QStringList ignoreList, friendsList; |
62 QListWidget* chatNicks; |
72 QListWidget* chatNicks; |
63 QLineEdit* chatEditLine; |
73 QLineEdit* chatEditLine; |
64 QAction * acInfo; |
74 QAction * acInfo; |
65 QAction * acKick; |
75 QAction * acKick; |
66 QAction * acBan; |
76 QAction * acBan; |
67 QAction * acFollow; |
77 QAction * acFollow; |
|
78 QAction * acIgnore; |
|
79 QAction * acFriend; |
68 QSettings * gameSettings; |
80 QSettings * gameSettings; |
69 SDLInteraction * sdli; |
81 SDLInteraction * sdli; |
70 Mix_Chunk *sound[4]; |
82 Mix_Chunk *sound[4]; |
71 bool notify; |
83 bool notify; |
|
84 bool showReady; |
72 |
85 |
73 private slots: |
86 private slots: |
74 void returnPressed(); |
87 void returnPressed(); |
75 void onBan(); |
88 void onBan(); |
76 void onKick(); |
89 void onKick(); |
77 void onInfo(); |
90 void onInfo(); |
78 void onFollow(); |
91 void onFollow(); |
|
92 void onIgnore(); |
|
93 void onFriend(); |
79 void chatNickDoubleClicked(QListWidgetItem * item); |
94 void chatNickDoubleClicked(QListWidgetItem * item); |
80 }; |
95 }; |
81 |
96 |
82 #endif // _CHAT_WIDGET_INCLUDED |
97 #endif // _CHAT_WIDGET_INCLUDED |