-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSportQuestion.h
More file actions
41 lines (31 loc) · 975 Bytes
/
Copy pathSportQuestion.h
File metadata and controls
41 lines (31 loc) · 975 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
39
40
41
#ifndef SPORTQUESTION_H
#define SPORTQUESTION_H
#include <QMetaObject>
#include <QString>
class SportQuestion
{
Q_GADGET
friend QDebug operator<<(QDebug debug, const SportQuestion &question);
public:
SportQuestion();
SportQuestion(const QString &issue, const QString &choice, const QString &answer)
: m_issue{ issue }, m_choice{ choice }, m_answer{ answer }
{
}
QString issue() const;
void setIssue(const QString &newIssue);
QString choice() const;
void setChoice(const QString &newChoice);
QString answer() const;
void setAnswer(const QString &newAnswer);
protected:
QString m_issue;
QString m_choice;
QString m_answer;
private:
Q_PROPERTY(QString issue READ issue WRITE setIssue)
Q_PROPERTY(QString choice READ choice WRITE setChoice)
Q_PROPERTY(QString answer READ answer WRITE setAnswer)
};
QDebug operator<<(QDebug debug, const SportQuestion &question);
#endif // SPORTQUESTION_H