equal
deleted
inserted
replaced
35 |
35 |
36 // this class is for custom nick sorting |
36 // this class is for custom nick sorting |
37 class ListWidgetNickItem : public QListWidgetItem |
37 class ListWidgetNickItem : public QListWidgetItem |
38 { |
38 { |
39 public: |
39 public: |
40 ListWidgetNickItem(const QString& nick); |
40 ListWidgetNickItem(const QString& nick, bool isFriend, bool isIgnored); |
41 bool operator<(const QListWidgetItem & other) const; |
41 bool operator<(const QListWidgetItem & other) const; |
|
42 void setFriend(bool isFriend); |
|
43 void setIgnored(bool isIgnored); |
|
44 bool isFriend(); |
|
45 bool ignored(); |
|
46 |
|
47 private: |
|
48 bool aFriend; |
|
49 bool isIgnored; |
42 }; |
50 }; |
43 |
51 |
44 class HWChatWidget : public QWidget |
52 class HWChatWidget : public QWidget |
45 { |
53 { |
46 Q_OBJECT |
54 Q_OBJECT |
52 void setShowReady(bool s); |
60 void setShowReady(bool s); |
53 |
61 |
54 private: |
62 private: |
55 void loadList(QStringList & list, const QString & file); |
63 void loadList(QStringList & list, const QString & file); |
56 void saveList(QStringList & list, const QString & file); |
64 void saveList(QStringList & list, const QString & file); |
57 void updateIcon(QListWidgetItem *item); |
65 void updateNickItem(QListWidgetItem *item); |
58 void updateIcons(); |
66 void updateNickItems(); |
59 |
67 |
60 public slots: |
68 public slots: |
61 void onChatString(const QString& str); |
69 void onChatString(const QString& str); |
62 void onServerMessage(const QString& str); |
70 void onServerMessage(const QString& str); |
63 void nickAdded(const QString& nick, bool notifyNick); |
71 void nickAdded(const QString& nick, bool notifyNick); |