]> git.sesse.net Git - kdenlive/blob - src/customruler.h
Zone selection widget
[kdenlive] / src / customruler.h
1 #ifndef CUSTOMRULER_H
2 #define CUSTOMRULER_H
3
4 #include <KRuler>
5
6 #include "customtrackview.h"
7 #include "timecode.h"
8
9 enum RULER_MOVE { RULER_CURSOR = 0, RULER_START = 1, RULER_MIDDLE = 2, RULER_END = 3 };
10
11 class CustomRuler : public KRuler {
12     Q_OBJECT
13
14 public:
15     CustomRuler(Timecode tc, CustomTrackView *parent);
16     virtual void mousePressEvent(QMouseEvent * event);
17     virtual void mouseMoveEvent(QMouseEvent * event);
18     void setPixelPerMark(double rate);
19     static const int comboScale[];
20     int outPoint();
21     int inPoint();
22
23 protected:
24     virtual void paintEvent(QPaintEvent * /*e*/);
25
26 private:
27     int m_cursorPosition;
28     Timecode m_timecode;
29     CustomTrackView *m_view;
30     int m_zoneStart;
31     int m_zoneEnd;
32     RULER_MOVE m_moveCursor;
33
34 public slots:
35     void slotMoveRuler(int newPos);
36     void slotCursorMoved(int oldpos, int newpos);
37
38 };
39
40 #endif