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 b9dbf3faefc1d49c7a58b000473eb679a1b63f0c..66728a6d8264352068f53bb381ed595afed3ba4c 100644
(file)
--- a/
qt/multypo.h
+++ b/
qt/multypo.h
@@
-2,14
+2,22
@@
#define MULTIKBD_H
#include <QWidget>
#define MULTIKBD_H
#include <QWidget>
+#include <QMap>
+#include <QFile>
-class QLabel;
+#include "player.h"
class MultypoWindow : public QWidget
{
Q_OBJECT
public:
class MultypoWindow : public QWidget
{
Q_OBJECT
public:
+ enum State {
+ Naming,
+ Playing,
+ Scoring
+ };
+
explicit MultypoWindow(QWidget *parent = 0);
~MultypoWindow();
explicit MultypoWindow(QWidget *parent = 0);
~MultypoWindow();
@@
-17,11
+25,19
@@
public:
private:
void handleKeyPress(int device, QString string);
private:
void handleKeyPress(int device, QString string);
+ void nextWord();
+ 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;
QLabel *mainLabel;
bool xiInited;
int xiOpcode;
QLabel *mainLabel;
+ QFile words;
};
#endif // MULTIKBD_H
};
#endif // MULTIKBD_H