-
Notifications
You must be signed in to change notification settings - Fork 1
/
nodeeditorwidget.h
133 lines (114 loc) · 3.35 KB
/
nodeeditorwidget.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#ifndef NODEEDITORWIDGET_H
#define NODEEDITORWIDGET_H
#include "map.h"
#include "mapview.h"
#include <QWidget>
#include <QListWidget>
#include <QFrame>
#include <QLabel>
#include <QSpinBox>
#include <QComboBox>
#include <QCheckBox>
#include <QHash>
#include <QToolBar>
class NodeEditorWidget : public QWidget
{
Q_OBJECT
public:
explicit NodeEditorWidget(Map* map, MapView* mapView, QWidget* parent = 0);
void setMap(Map* map);
public slots:
void select(Node* node);
void deselect();
signals:
void redrawMap();
void nodeSelected(MovableObject* n);
void nodeDeselected();
private slots:
void nodeListIndexChanged(int index);
void addNodeClicked();
void removeNodeClicked();
void moveUpClicked();
void moveDownClicked();
void xChanged(int x);
void yChanged(int y);
void zChanged(int z);
void areaIdChnaged(int areaId);
void iconIdChanged(int iconId);
void iconChanged(int iconIndex);
void bowserJrPathChanged(int pathIndex);
void nodeVisibleToggled(bool toggle);
void hasStarCoinsToggled(bool toggle);
void goToNextWorldToggled(bool toggle);
void unknownBitToggled(bool toggle);
void pathListIndexChanged(int index);
void addPathClicked();
void removePathClicked();
void movePathUpClicked();
void movePathDownClicked();
void endingNodeIdChanged(int endingNodeId);
void pathSettingIdChanged(int pathSettingId);
void directionChanged(int direction);
void reversePathAnimToggled(bool toggle);
void unlockedPath0Chnaged(int id);
void unlockedPath1Chnaged(int id);
void unlockedPath2Chnaged(int id);
void unlockedPath3Chnaged(int id);
void cameraScrollNodeChnaged(int id);
void sUnlockedPath0Chnaged(int id);
void sUnlockedPath1Chnaged(int id);
void sUnlockedPath2Chnaged(int id);
void sUnlockedPath3Chnaged(int id);
void sCameraScrollNodeChnaged(int id);
private:
class HorLine : public QFrame { public: HorLine() { setFrameStyle(QFrame::HLine | QFrame::Sunken); } };
QListWidget* nodeList;
QSpinBox* xPos;
QSpinBox* yPos;
QSpinBox* zPos;
QSpinBox* areaId;
QSpinBox* iconId;
QComboBox* icon;
QComboBox* bowserJrPath;
QCheckBox* nodeVisible;
QCheckBox* hasStarCoins;
QCheckBox* goToNextWorld;
QCheckBox* unknownBit;
QSpinBox* unlockedPath0;
QSpinBox* unlockedPath1;
QSpinBox* unlockedPath2;
QSpinBox* unlockedPath3;
QSpinBox* cameraScrollNode;
QSpinBox* sUnlockedPath0;
QSpinBox* sUnlockedPath1;
QSpinBox* sUnlockedPath2;
QSpinBox* sUnlockedPath3;
QSpinBox* sCameraScrollNode;
QListWidget* pathList;
QToolBar* pButtonsBar;
QSpinBox* endingNodeId;
QSpinBox* pathSettingId;
QComboBox* direction;
QCheckBox* reversePathAnim;
QHash<quint8, int> iconIndexes;
Map* map;
MapView* mapView;
Node* editNode;
Path* editPath;
void _select(Node* node);
void _deselect();
void updateList(bool keepIndex=true);
void setEditsEnabled(bool enabled);
void updateInfo();
void allowChanges(bool allow);
void clearValues();
void loadLevelIcons();
void pSelect(Path* p);
void pDeselect();
void pUpdateList(bool keepIndex=true);
void pSetEditsEnabled(bool enabled);
void pUpdateInfo();
void pAllowChanges(bool allow);
void pClearValues();
};
#endif // NODEEDITORWIDGET_H