]> git.sesse.net Git - kdenlive/blob - src/customruler.h
Make communication between timeline and its ruler easier
[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 class CustomRuler : public KRuler {
10     Q_OBJECT
11
12 public:
13     CustomRuler(Timecode tc, CustomTrackView *parent);
14     virtual void mousePressEvent(QMouseEvent * event);
15     virtual void mouseMoveEvent(QMouseEvent * event);
16     void setPixelPerMark(double rate);
17     static const int comboScale[];
18 protected:
19     virtual void paintEvent(QPaintEvent * /*e*/);
20
21 private:
22     int m_cursorPosition;
23     Timecode m_timecode;
24     CustomTrackView *m_view;
25
26 public slots:
27     void slotMoveRuler(int newPos);
28     void slotCursorMoved(int oldpos, int newpos);
29
30 };
31
32 #endif