-
Notifications
You must be signed in to change notification settings - Fork 1
/
pathbehavioreditor.h
51 lines (41 loc) · 1.2 KB
/
pathbehavioreditor.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
#ifndef PATHBEHAVIOREDITOR_H
#define PATHBEHAVIOREDITOR_H
#include "map.h"
#include <QWidget>
#include <QListWidget>
#include <QSpinBox>
#include <QComboBox>
#include <QHash>
class PathBehaviorEditor : public QWidget
{
Q_OBJECT
public:
explicit PathBehaviorEditor(Map* map, QWidget* parent = 0);
void select(PathBehavior* pathBehavior);
void deselect();
void setMap(Map* map);
private slots:
void pathBehaviorsListIndexChanged(int index);
void addPathBehaviorClicked();
void removePathBehaviorClicked();
void moveUpClicked();
void moveDownClicked();
void animationIdChanged(int animationId);
void starCoinCostChanged(int starCoinCost);
void settingsChanged(int index);
private:
class HorLine : public QFrame { public: HorLine() { setFrameStyle(QFrame::HLine | QFrame::Sunken); } };
QListWidget* pathBehaviorList;
QComboBox* settings;
QSpinBox* animationId;
QSpinBox* starCoinCost;
QHash<int, quint8> settingsHash;
Map* map;
PathBehavior* editPathBehavior;
void updateList();
void setEditsEnabled(bool enabled);
void updateInfo();
void allowChanges(bool allow);
void clearValues();
};
#endif // PATHBEHAVIOREDITOR_H