forked from DOMjudge/DOMjura
-
Notifications
You must be signed in to change notification settings - Fork 0
/
problem.h
61 lines (56 loc) · 1.43 KB
/
problem.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/** \file problem.h
* \brief Contains the class for a problem.
*/
#ifndef PROBLEM_H
#define PROBLEM_H
#include <QObject>
namespace DJ
{
namespace Model
{
/** A problem (from the API).
*/
class Problem : public QObject
{
Q_OBJECT
public:
/** Constructs a new problem.
* \param problem The problem as returned from the DOMjudge API
* \param parent The parent of this object.
*/
explicit Problem(QJsonObject problem, QObject *parent = 0);
/** Returns the ID of this problem.
* \return The ID of this problem.
*/
QString getId();
/** Returns the name of this problem.
* \return The name of this problem.
*/
QString getName();
/** Returns the short name of this problem.
* \return The short name of this problem.
*/
QString getShortName();
/** Returns the color of this problem.
* \return The color of this problem.
*/
QString getColor();
/** Returns the rgb of this problem.
* \return The rgb of this problem.
*/
QString getRGB();
/** Returns a string representing this problem.
* \return A string representation of this problem.
* Useful for debug printing.
*/
QString toString();
private:
QString id;
QString name;
QString shortname;
QString color;
QString rgb;
};
}
}
#endif // PROBLEM_H