-
Notifications
You must be signed in to change notification settings - Fork 2
/
level.h
80 lines (64 loc) · 2.76 KB
/
level.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2015 Simon Stuerz <stuerz.simon@gmail.com> *
* *
* This file is part of Monster Wars. *
* *
* Monster Wars is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, version 3 of the License. *
* *
* Monster Wars is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with Monster Wars. If not, see <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef LEVEL_H
#define LEVEL_H
#include <QObject>
#include <QDebug>
class Monster;
class Player;
class Level: public QObject
{
Q_OBJECT
Q_PROPERTY(int levelId READ levelId NOTIFY levelIdChanged)
Q_PROPERTY(QString name READ name NOTIFY nameChanged)
Q_PROPERTY(QString bestTime READ bestTime NOTIFY bestTimeChanged)
Q_PROPERTY(bool unlocked READ unlocked NOTIFY unlockedChanged)
public:
explicit Level(QObject *parent = 0);
~Level();
void setName(const QString &name);
QString name() const;
void setLevelId(const int &levelId);
int levelId() const;
void setBestTime(const QString &bestTime);
QString bestTime() const;
void setTimeStamp(const int &timeStamp);
int timeStamp() const;
void setUnlocked(const bool &unlocked);
bool unlocked() const;
void setMonstersVariants(const QVariantList &monstersVariant);
QVariantList monstersVariant() const;
void setPlayersVariants(const QVariantList &playersVariant);
QVariantList playersVariant() const;
private:
QVariantList m_monstersVariant;
QVariantList m_playersVariant;
QString m_name;
int m_levelId;
int m_timeStamp;
QString m_bestTime;
bool m_unlocked;
signals:
void levelIdChanged();
void nameChanged();
void bestTimeChanged();
void unlockedChanged();
};
#endif // LEVEL_H