author | koda |
Wed, 02 Nov 2011 19:17:07 +0100 | |
changeset 6264 | 62d59a87daad |
parent 6227 | ce60b734fff1 |
child 6616 | f77bb02b669f |
permissions | -rw-r--r-- |
5205
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
1 |
/* |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
2 |
* Hedgewars, a free turn based strategy game |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
3 |
* Copyright (c) 2006-2011 Andrey Korotaev <unC0Rr@gmail.com> |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
4 |
* |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
6 |
* it under the terms of the GNU General Public License as published by |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
7 |
* the Free Software Foundation; version 2 of the License |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
8 |
* |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
12 |
* GNU General Public License for more details. |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
13 |
* |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
17 |
*/ |
5204 | 18 |
|
19 |
#ifndef PAGE_ROOMLIST_H |
|
20 |
#define PAGE_ROOMLIST_H |
|
21 |
||
5205
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
22 |
#include "AbstractPage.h" |
5204 | 23 |
|
24 |
class HWChatWidget; |
|
5205
78138ae93820
some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents:
5204
diff
changeset
|
25 |
class AmmoSchemeModel; |
5204 | 26 |
|
27 |
class PageRoomsList : public AbstractPage |
|
28 |
{ |
|
29 |
Q_OBJECT |
|
30 |
||
31 |
public: |
|
6165
6fe3e922246e
moving and renaming SDLs.*, making it a singleton; cleaning up class responsibilties wrt SDLInteraction; some comments
sheepluva
parents:
6060
diff
changeset
|
32 |
PageRoomsList(QWidget* parent, QSettings * config); |
6180
0992fc5a4ad9
some changes to the css... display:none; works now (e.g. you can use it for user join/leave messages that are not your friends)
sheepluva
parents:
6165
diff
changeset
|
33 |
void displayError(const QString & message); |
0992fc5a4ad9
some changes to the css... display:none; works now (e.g. you can use it for user join/leave messages that are not your friends)
sheepluva
parents:
6165
diff
changeset
|
34 |
void displayNotice(const QString & message); |
0992fc5a4ad9
some changes to the css... display:none; works now (e.g. you can use it for user join/leave messages that are not your friends)
sheepluva
parents:
6165
diff
changeset
|
35 |
void displayWarning(const QString & message); |
5204 | 36 |
|
37 |
QLineEdit * roomName; |
|
38 |
QLineEdit * searchText; |
|
39 |
QTableWidget * roomsList; |
|
40 |
QPushButton * BtnCreate; |
|
41 |
QPushButton * BtnJoin; |
|
42 |
QPushButton * BtnRefresh; |
|
43 |
QPushButton * BtnAdmin; |
|
44 |
QPushButton * BtnClear; |
|
45 |
QComboBox * CBState; |
|
46 |
QComboBox * CBRules; |
|
47 |
QComboBox * CBWeapons; |
|
48 |
HWChatWidget * chatWidget; |
|
5259
926958e3e87b
display player count below and with label, just because it's funny to mess with unC0Rr's code and make him cry :P
sheepluva
parents:
5205
diff
changeset
|
49 |
QLabel * lblCount; |
5204 | 50 |
|
51 |
public slots: |
|
6227
ce60b734fff1
update name autocompletion after nick change (since own nick isn't suggested)
sheepluva
parents:
6180
diff
changeset
|
52 |
void setAdmin(bool); |
5204 | 53 |
void setRoomsList(const QStringList & list); |
6227
ce60b734fff1
update name autocompletion after nick change (since own nick isn't suggested)
sheepluva
parents:
6180
diff
changeset
|
54 |
void setUser(const QString & nickname); |
5259
926958e3e87b
display player count below and with label, just because it's funny to mess with unC0Rr's code and make him cry :P
sheepluva
parents:
5205
diff
changeset
|
55 |
void updateNickCounter(int cnt); |
5204 | 56 |
|
6042
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
57 |
signals: |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
58 |
void askForCreateRoom(const QString &); |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
59 |
void askForJoinRoom(const QString &); |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
60 |
void askForRoomList(); |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
61 |
void askJoinConfirmation(const QString &); |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
62 |
|
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
63 |
protected: |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
64 |
QLayout * bodyLayoutDefinition(); |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
65 |
QLayout * footerLayoutDefinition(); |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
66 |
void connectSignals(); |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
67 |
|
5204 | 68 |
private slots: |
69 |
void onCreateClick(); |
|
70 |
void onJoinClick(); |
|
71 |
void onRefreshClick(); |
|
72 |
void onClearClick(); |
|
73 |
void onJoinConfirmation(const QString &); |
|
74 |
||
6042
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
75 |
private: |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
76 |
QSettings * m_gameSettings; |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
77 |
|
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
78 |
bool gameInLobby; |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
79 |
QString gameInLobbyName; |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
80 |
QStringList listFromServer; |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
81 |
AmmoSchemeModel * ammoSchemeModel; |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
82 |
|
5204 | 83 |
}; |
84 |
||
85 |
#endif |