]> git.sesse.net Git - kdenlive/blobdiff - src/customruler.h
* NEW: find as you type feature. You can now type a text and the timeline will scroll...
[kdenlive] / src / customruler.h
index 767c58057057631c768cd5266d1a2634d6fadcb5..f5f62341dc47e9c1affa419389425f4073830639 100644 (file)
@@ -3,23 +3,42 @@
 
 #include <KRuler>
 
-class CustomRuler : public KRuler
-{
-  Q_OBJECT
-  
-  public:
-    CustomRuler(QWidget *parent=0);
-    virtual void mousePressEvent ( QMouseEvent * event );
-    void setPixelPerMark (double rate);
+#include "customtrackview.h"
+#include "timecode.h"
+
+enum RULER_MOVE { RULER_CURSOR = 0, RULER_START = 1, RULER_MIDDLE = 2, RULER_END = 3 };
+
+class CustomRuler : public KRuler {
+    Q_OBJECT
+
+public:
+    CustomRuler(Timecode tc, CustomTrackView *parent);
+    void setPixelPerMark(double rate);
     static const int comboScale[];
-  protected:
+    int outPoint() const;
+    int inPoint() const;
+    void setDuration(int d);
+
+protected:
     virtual void paintEvent(QPaintEvent * /*e*/);
+    virtual void wheelEvent(QWheelEvent * e);
+    virtual void mousePressEvent(QMouseEvent * event);
+    virtual void mouseMoveEvent(QMouseEvent * event);
 
-  private:
+private:
     int m_cursorPosition;
+    Timecode m_timecode;
+    CustomTrackView *m_view;
+    int m_zoneStart;
+    int m_zoneEnd;
+    int m_duration;
+    double m_textSpacing;
+    RULER_MOVE m_moveCursor;
+    QMenu *m_contextMenu;
 
-  public slots:
-    void slotNewValue ( int _value );
+public slots:
+    void slotMoveRuler(int newPos);
+    void slotCursorMoved(int oldpos, int newpos);
 };
 
 #endif