--- a/QTfrontend/ui/widget/chatwidget.h Mon Jan 30 23:20:28 2012 +0100
+++ b/QTfrontend/ui/widget/chatwidget.h Mon Jan 30 17:32:18 2012 -0500
@@ -41,17 +41,17 @@
/// Class for custom nickname sorting
class ListWidgetNickItem : public QListWidgetItem
{
-public:
- ListWidgetNickItem(const QString& nick, bool isFriend, bool isIgnored);
- bool operator<(const QListWidgetItem & other) const;
- void setFriend(bool isFriend);
- void setIgnored(bool isIgnored);
- bool isFriend();
- bool ignored();
+ public:
+ ListWidgetNickItem(const QString& nick, bool isFriend, bool isIgnored);
+ bool operator<(const QListWidgetItem & other) const;
+ void setFriend(bool isFriend);
+ void setIgnored(bool isIgnored);
+ bool isFriend();
+ bool ignored();
-private:
- bool aFriend;
- bool isIgnored;
+ private:
+ bool aFriend;
+ bool isIgnored;
};
@@ -66,95 +66,95 @@
class HWChatWidget : public QWidget
{
- Q_OBJECT
+ Q_OBJECT
- public:
- HWChatWidget(QWidget* parent, QSettings * gameSettings, bool notify);
- void loadLists(const QString & nick);
- void saveLists(const QString & nick);
- void setShowReady(bool s);
- void setShowFollow(bool enabled);
- QStringList ignoreList, friendsList;
- static const QString & styleSheet();
- void displayError(const QString & message);
- void displayNotice(const QString & message);
- void displayWarning(const QString & message);
- void setUser(const QString & nickname);
+ public:
+ HWChatWidget(QWidget* parent, QSettings * gameSettings, bool notify);
+ void loadLists(const QString & nick);
+ void saveLists(const QString & nick);
+ void setShowReady(bool s);
+ void setShowFollow(bool enabled);
+ QStringList ignoreList, friendsList;
+ static const QString & styleSheet();
+ void displayError(const QString & message);
+ void displayNotice(const QString & message);
+ void displayWarning(const QString & message);
+ void setUser(const QString & nickname);
-protected:
- virtual void dragEnterEvent(QDragEnterEvent * event);
- virtual void dropEvent(QDropEvent * event);
+ protected:
+ virtual void dragEnterEvent(QDragEnterEvent * event);
+ virtual void dropEvent(QDropEvent * event);
-private:
- static QString * s_styleSheet;
- static QStringList * s_displayNone;
- static bool s_isTimeStamped;
- static QString s_tsFormat;
- static const QRegExp URLREGEXP;
+ private:
+ static QString * s_styleSheet;
+ static QStringList * s_displayNone;
+ static bool s_isTimeStamped;
+ static QString s_tsFormat;
+ static const QRegExp URLREGEXP;
- static void setStyleSheet(const QString & styleSheet = "");
+ static void setStyleSheet(const QString & styleSheet = "");
- void loadList(QStringList & list, const QString & file);
- void saveList(QStringList & list, const QString & file);
- void updateNickItem(QListWidgetItem *item);
- void updateNickItems();
- void addLine(const QString & cssClass, QString line, bool isHighlight = false);
- bool parseCommand(const QString & line);
- void discardStyleSheet();
- void saveStyleSheet();
- QString linkedNick(const QString & nickname);
+ void loadList(QStringList & list, const QString & file);
+ void saveList(QStringList & list, const QString & file);
+ void updateNickItem(QListWidgetItem *item);
+ void updateNickItems();
+ void addLine(const QString & cssClass, QString line, bool isHighlight = false);
+ bool parseCommand(const QString & line);
+ void discardStyleSheet();
+ void saveStyleSheet();
+ QString linkedNick(const QString & nickname);
- public slots:
- void onChatString(const QString& str);
- void onChatString(const QString& nick, const QString& str);
- void onServerMessage(const QString& str);
- void nickAdded(const QString& nick, bool notifyNick);
- void nickRemoved(const QString& nick);
- void clear();
- void setReadyStatus(const QString & nick, bool isReady);
- void adminAccess(bool);
+ public slots:
+ void onChatString(const QString& str);
+ void onChatString(const QString& nick, const QString& str);
+ void onServerMessage(const QString& str);
+ void nickAdded(const QString& nick, bool notifyNick);
+ void nickRemoved(const QString& nick);
+ void clear();
+ void setReadyStatus(const QString & nick, bool isReady);
+ void adminAccess(bool);
- signals:
- void chatLine(const QString& str);
- void kick(const QString & str);
- void ban(const QString & str);
- void info(const QString & str);
- void follow(const QString &);
- void nickCountUpdate(int cnt);
+ signals:
+ void chatLine(const QString& str);
+ void kick(const QString & str);
+ void ban(const QString & str);
+ void info(const QString & str);
+ void follow(const QString &);
+ void nickCountUpdate(int cnt);
- private:
- bool m_isAdmin;
- QGridLayout mainLayout;
- QTextBrowser* chatText;
- QStringList chatStrings;
- QListWidget* chatNicks;
- SmartLineEdit* chatEditLine;
- QAction * acInfo;
- QAction * acKick;
- QAction * acBan;
- QAction * acFollow;
- QAction * acIgnore;
- QAction * acFriend;
- QSettings * gameSettings;
- QString m_helloSound;
- QString m_hilightSound;
- QString m_userNick;
- QString m_clickedNick;
- QList<QRegExp> m_highlights; ///< regular expressions used for highlighting
- bool notify;
- bool showReady;
+ private:
+ bool m_isAdmin;
+ QGridLayout mainLayout;
+ QTextBrowser* chatText;
+ QStringList chatStrings;
+ QListWidget* chatNicks;
+ SmartLineEdit* chatEditLine;
+ QAction * acInfo;
+ QAction * acKick;
+ QAction * acBan;
+ QAction * acFollow;
+ QAction * acIgnore;
+ QAction * acFriend;
+ QSettings * gameSettings;
+ QString m_helloSound;
+ QString m_hilightSound;
+ QString m_userNick;
+ QString m_clickedNick;
+ QList<QRegExp> m_highlights; ///< regular expressions used for highlighting
+ bool notify;
+ bool showReady;
- private slots:
- void returnPressed();
- void onBan();
- void onKick();
- void onInfo();
- void onFollow();
- void onIgnore();
- void onFriend();
- void chatNickDoubleClicked(QListWidgetItem * item);
- void chatNickSelected(int index);
- void linkClicked(const QUrl & link);
+ private slots:
+ void returnPressed();
+ void onBan();
+ void onKick();
+ void onInfo();
+ void onFollow();
+ void onIgnore();
+ void onFriend();
+ void chatNickDoubleClicked(QListWidgetItem * item);
+ void chatNickSelected(int index);
+ void linkClicked(const QUrl & link);
};
#endif // _CHAT_WIDGET_INCLUDED