]> git.sesse.net Git - kdenlive/blobdiff - src/smallruler.h
Several fixes for region effect
[kdenlive] / src / smallruler.h
index 38c466fbf889ac69ac23ec75eec42d2e046ad3ee..224ba63a5c7976f1bb2749683965efee2aefaed0 100644 (file)
 #ifndef SMALLRULER_H
 #define SMALLRULER_H
 
+#include <KColorScheme>
 #include <QWidget>
 
+#include "monitormanager.h"
+
+
 class SmallRuler : public QWidget
 {
     Q_OBJECT
 
 public:
-    SmallRuler(QWidget *parent = 0);
+    SmallRuler(MonitorManager *manager, QWidget *parent = 0);
     virtual void mousePressEvent(QMouseEvent * event);
     virtual void mouseMoveEvent(QMouseEvent * event);
+    virtual void leaveEvent( QEvent * event );
     void adjustScale(int maximum);
     void setZone(int start, int end);
     QPoint zone();
     void setMarkers(QList < int > list);
+    int position() const;
+    void updatePalette();
 
 protected:
     virtual void paintEvent(QPaintEvent *e);
@@ -49,13 +56,16 @@ private:
     int m_maxval;
     int m_zoneStart;
     int m_zoneEnd;
-    QColor m_zoneColor;
+    KStatefulBrush m_zoneBrush;
     QList <int> m_markers;
     QPixmap m_pixmap;
+    MonitorManager *m_manager;
+    /** @brief True is mouse is over the ruler cursor. */
+    bool m_overCursor;
     void updatePixmap();
 
 public slots:
-    void slotNewValue(int value);
+    bool slotNewValue(int value);
 
 signals:
     void seekRenderer(int);