-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathboard.h
40 lines (29 loc) · 775 Bytes
/
board.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef BOARD_H
#define BOARD_H
#include <QObject>
#include <QJsonArray>
#include "category.h"
#include "playeranswer.h"
class Game;
class Board : public QObject
{
Q_OBJECT
Q_PROPERTY(QList<QObject*> categories READ categories WRITE setCategories NOTIFY categoriesChanged)
public:
explicit Board(QObject *parent = nullptr);
~Board() override;
QList<QObject*> categories() const;
void loadJson(QJsonArray const& catArray, Game * game);
QJsonArray saveJson();
void reset();
signals:
void categoriesChanged(QList<QObject*> categories);
void boardStateChanged();
public slots:
void setCategories(QList<QObject*> categories);
void questionStateChanged();
private:
class Private;
Private * d;
};
#endif // BOARD_H