projects
/
multypo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix score
[multypo.git]
/
qt
/
multypo.h
diff --git
a/qt/multypo.h
b/qt/multypo.h
index 9220df841240d0602427d1b481e551b079aede51..66728a6d8264352068f53bb381ed595afed3ba4c 100644
(file)
--- a/
qt/multypo.h
+++ b/
qt/multypo.h
@@
-12,6
+12,12
@@
class MultypoWindow : public QWidget
Q_OBJECT
public:
Q_OBJECT
public:
+ enum State {
+ Naming,
+ Playing,
+ Scoring
+ };
+
explicit MultypoWindow(QWidget *parent = 0);
~MultypoWindow();
explicit MultypoWindow(QWidget *parent = 0);
~MultypoWindow();
@@
-20,15
+26,18
@@
public:
private:
void handleKeyPress(int device, QString string);
void nextWord();
private:
void handleKeyPress(int device, QString string);
void nextWord();
- void resetPlayerText();
+ bool allPlayersWaiting();
+ int typingPlayers();
+ void setLabel(QString text, QString color);
-private:
+ State state; // naming iff (no players or any player is naming)
+ QString currentWord; // defined iff state == Playing
+ QMap<int, Player*> players;
+
bool xiInited;
int xiOpcode;
bool xiInited;
int xiOpcode;
- bool gameStarted;
QLabel *mainLabel;
QFile words;
QLabel *mainLabel;
QFile words;
- QMap<int, Player*> players;
};
#endif // MULTIKBD_H
};
#endif // MULTIKBD_H