-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplayeranswer.h
More file actions
38 lines (25 loc) · 735 Bytes
/
Copy pathplayeranswer.h
File metadata and controls
38 lines (25 loc) · 735 Bytes
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
#ifndef PLAYERANSWER_H
#define PLAYERANSWER_H
#include <QObject>
#include "player.h"
class PlayerAnswer : public QObject
{
Q_OBJECT
Q_PROPERTY(Player* player READ player WRITE setPlayer NOTIFY playerChanged)
Q_PROPERTY(int score READ score WRITE setScore NOTIFY scoreChanged)
public:
explicit PlayerAnswer(QObject *parent = nullptr);
explicit PlayerAnswer(Player * player, int score, QObject *parent = nullptr);
Player* player() const;
int score() const;
signals:
void playerChanged(Player* player);
void scoreChanged(int score);
public slots:
void setPlayer(Player* player);
void setScore(int score);
private:
Player* m_player;
int m_score;
};
#endif // PLAYERANSWER_H