]> git.sesse.net Git - kdenlive/blobdiff - src/smallruler.h
jogshuttle.cpp: close() on error path [Coverity 7/14] by Mikko Rapeli
[kdenlive] / src / smallruler.h
index 9d5d07d095ff28a5e92f55b904af0d9c0329c17a..f3ccc7251493b0d2f956851b135dcead713de947 100644 (file)
 #ifndef SMALLRULER_H
 #define SMALLRULER_H
 
+#include <KColorScheme>
 #include <QWidget>
 
-class SmallRuler : public QWidget {
+#include "monitormanager.h"
+
+
+class SmallRuler : public QWidget
+{
     Q_OBJECT
 
 public:
-    SmallRuler(QWidget *parent = 0);
+    explicit 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);
@@ -47,10 +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);