-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlevelinfo.h
57 lines (41 loc) · 1.13 KB
/
levelinfo.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
#ifndef LEVELINFO_H
#define LEVELINFO_H
#include <QObject>
#include<QString>
#include "consts.h"
#include "bag.h"
#include <QList>
using std::string;
class LevelInfo : public QObject
{
Q_OBJECT
public:
Q_PROPERTY(QString test READ test WRITE setTest NOTIFY testChanged)
explicit LevelInfo(QObject *parent = 0);
~LevelInfo();
Q_INVOKABLE QString getImageName(int i);
Q_INVOKABLE int getX(QString room, int i);
Q_INVOKABLE int getY(QString room, int i);
Q_INVOKABLE int getDoorX(int lvl, int i);
Q_INVOKABLE int getDoorY(int lvl, int i);
Q_INVOKABLE bool isVisible(int i);
Q_INVOKABLE bool isBagCatched();
Q_INVOKABLE void catchBag();
Q_INVOKABLE void addToBag(int i);
Q_INVOKABLE void recreate();
Q_INVOKABLE void removeFromBag(int i);
Q_INVOKABLE QString whatIsInBag(int i);
Q_INVOKABLE bool isBagFull();
void setTest(QString &str);
QString test(){return _test;}
signals:
void testChanged();
public slots:
void changeVisible(int i);
private:
QString _test;
Bag bag;
QList<int> thingOnPlace;
QList<bool> visible;
};
#endif // LEVELINFO_H