Mercurial > hg > dmlib
comparison edtimeline.h @ 357:1b8362a26692
Work towards Qt based editor.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 16 Oct 2012 20:09:11 +0300 |
parents | |
children | e1c984404b6b |
comparison
equal
deleted
inserted
replaced
356:2a22b0f1a469 | 357:1b8362a26692 |
---|---|
1 #ifndef EDTIMELINE_H | |
2 #define EDTIMELINE_H | |
3 | |
4 #include <QWidget> | |
5 #include "dmtimeline.h" | |
6 | |
7 class TimelineTrackView : public QWidget | |
8 { | |
9 Q_OBJECT | |
10 | |
11 public: | |
12 TimelineTrackView(QWidget *parent = 0); | |
13 void setTrack(DMTimelineTrack *mtrack); | |
14 DMTimelineTrack * getTrack(); | |
15 | |
16 void setTime(const int mtime); | |
17 void setOffset(const int moffs); | |
18 void setScale(const float mscale); | |
19 | |
20 protected: | |
21 void mousePressEvent(QMouseEvent *event); | |
22 void mouseMoveEvent(QMouseEvent *event); | |
23 void mouseReleaseEvent(QMouseEvent *event); | |
24 | |
25 void paintEvent(QPaintEvent *event); | |
26 | |
27 private: | |
28 float scale; | |
29 int time, offs; | |
30 DMTimelineTrack *track; | |
31 }; | |
32 | |
33 #endif |