24 class HWChatWidget; |
24 class HWChatWidget; |
25 class AmmoSchemeModel; |
25 class AmmoSchemeModel; |
26 |
26 |
27 class PageRoomsList : public AbstractPage |
27 class PageRoomsList : public AbstractPage |
28 { |
28 { |
29 Q_OBJECT |
29 Q_OBJECT |
30 |
30 |
31 public: |
31 public: |
32 PageRoomsList(QWidget* parent, QSettings * config); |
32 PageRoomsList(QWidget* parent, QSettings * config); |
33 void displayError(const QString & message); |
33 void displayError(const QString & message); |
34 void displayNotice(const QString & message); |
34 void displayNotice(const QString & message); |
35 void displayWarning(const QString & message); |
35 void displayWarning(const QString & message); |
36 |
36 |
37 QLineEdit * roomName; |
37 QLineEdit * roomName; |
38 QLineEdit * searchText; |
38 QLineEdit * searchText; |
39 QTableWidget * roomsList; |
39 QTableWidget * roomsList; |
40 QPushButton * BtnCreate; |
40 QPushButton * BtnCreate; |
41 QPushButton * BtnJoin; |
41 QPushButton * BtnJoin; |
42 QPushButton * BtnRefresh; |
42 QPushButton * BtnRefresh; |
43 QPushButton * BtnAdmin; |
43 QPushButton * BtnAdmin; |
44 QPushButton * BtnClear; |
44 QPushButton * BtnClear; |
45 QComboBox * CBState; |
45 QComboBox * CBState; |
46 QComboBox * CBRules; |
46 QComboBox * CBRules; |
47 QComboBox * CBWeapons; |
47 QComboBox * CBWeapons; |
48 HWChatWidget * chatWidget; |
48 HWChatWidget * chatWidget; |
49 QLabel * lblCount; |
49 QLabel * lblCount; |
50 |
50 |
51 public slots: |
51 public slots: |
52 void setAdmin(bool); |
52 void setAdmin(bool); |
53 void setRoomsList(const QStringList & list); |
53 void setRoomsList(const QStringList & list); |
54 void setUser(const QString & nickname); |
54 void setUser(const QString & nickname); |
55 void updateNickCounter(int cnt); |
55 void updateNickCounter(int cnt); |
56 |
56 |
57 signals: |
57 signals: |
58 void askForCreateRoom(const QString &); |
58 void askForCreateRoom(const QString &); |
59 void askForJoinRoom(const QString &); |
59 void askForJoinRoom(const QString &); |
60 void askForRoomList(); |
60 void askForRoomList(); |
61 void askJoinConfirmation(const QString &); |
61 void askJoinConfirmation(const QString &); |
62 |
62 |
63 protected: |
63 protected: |
64 QLayout * bodyLayoutDefinition(); |
64 QLayout * bodyLayoutDefinition(); |
65 QLayout * footerLayoutDefinition(); |
65 QLayout * footerLayoutDefinition(); |
66 void connectSignals(); |
66 void connectSignals(); |
67 |
67 |
68 private slots: |
68 private slots: |
69 void onCreateClick(); |
69 void onCreateClick(); |
70 void onJoinClick(); |
70 void onJoinClick(); |
71 void onRefreshClick(); |
71 void onRefreshClick(); |
72 void onClearClick(); |
72 void onClearClick(); |
73 void onJoinConfirmation(const QString &); |
73 void onJoinConfirmation(const QString &); |
74 |
74 |
75 private: |
75 private: |
76 QSettings * m_gameSettings; |
76 QSettings * m_gameSettings; |
77 |
77 |
78 bool gameInLobby; |
78 bool gameInLobby; |
79 QString gameInLobbyName; |
79 QString gameInLobbyName; |
80 QStringList listFromServer; |
80 QStringList listFromServer; |
81 AmmoSchemeModel * ammoSchemeModel; |
81 AmmoSchemeModel * ammoSchemeModel; |
82 |
82 |
83 }; |
83 }; |
84 |
84 |
85 #endif |
85 #endif |