-
Notifications
You must be signed in to change notification settings - Fork 1
/
animationseditor.h
84 lines (68 loc) · 1.86 KB
/
animationseditor.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
#ifndef ANIMATIONSEDITOR_H
#define ANIMATIONSEDITOR_H
#include "map.h"
#include "mapview.h"
#include <QWidget>
#include <QListWidget>
#include <QFrame>
#include <QLabel>
#include <QSpinBox>
#include <QToolBar>
class AnimationsEditor : public QWidget
{
Q_OBJECT
public:
AnimationsEditor(Map* map, MapView* mapView, QWidget* parent = 0);
void setMap(Map* map);
public slots:
//void selectKeyframe(Keyframe* keyframe);
//void deselectKeyframe();
signals:
void redrawMap();
void keyframeSelected(MovableObject* n);
void keyframeDeselected();
public slots:
void kSelect(Keyframe* k);
void kDeselect();
private slots:
void pathsListIndexChanged(int index);
void addPathClicked();
void removePathClicked();
void movePathUpClicked();
void movePathDownClicked();
void keyframeListIndexChanged(int index);
void addKeyframeClicked();
void removeKeyframeClicked();
void moveKeyframeUpClicked();
void moveKeyframeDownClicked();
void xChanged(int x);
void yChanged(int y);
void zChanged(int z);
void rotChanged(int rot);
void paceChanged(int pace);
private:
class HorLine : public QFrame { public: HorLine() { setFrameStyle(QFrame::HLine | QFrame::Sunken); } };
QListWidget* pathsList;
QListWidget* keyframeList;
QToolBar* kButtonsBar;
QSpinBox* xPos;
QSpinBox* yPos;
QSpinBox* zPos;
QSpinBox* rot;
QSpinBox* pace;
Map* map;
MapView* mapView;
AnimationPath* editPath;
Keyframe* editKeyframe;
void select(AnimationPath* path);
void deselect();
void updateList(bool keepIndex=true);
void _kSelect(Keyframe* k);
void _kDeselect();
void kUpdateList(bool keepIndex=true);
void kSetEditsEnabled(bool enabled);
void kUpdateInfo();
void kAllowChanges(bool allow);
void kClearValues();
};
#endif // ANIMATIONSEDITOR_H