]> git.sesse.net Git - kdenlive/blobdiff - src/timecodedisplay.h
Do not hide render profile list when there is only one item:
[kdenlive] / src / timecodedisplay.h
index 28045886efa149c6ee5bd9e824efe6a84c30a2c8..484841da3c4d957310f1b06cb5fc3143086686b7 100644 (file)
 #ifndef TIMECODEDISPLAY_H_
 #define TIMECODEDISPLAY_H_
 
-#include "ui_timecodedisplay_ui.h"
 #include "timecode.h"
 #include "gentime.h"
 
+#include <QAbstractSpinBox>
 
 /**
  * @class TimecodeDisplay
@@ -33,7 +33,7 @@
  * TimecodeDisplay can be used to insert eigther frames
  * or a timecode in the format HH:MM:SS:FF
  */
-class TimecodeDisplay : public QWidget, public Ui::TimecodeDisplay_UI
+class TimecodeDisplay : public QAbstractSpinBox
 {
     Q_OBJECT
 
@@ -74,6 +74,8 @@ public:
      * @param t the new timecode */
     void updateTimeCode(Timecode t);
 
+    virtual void stepBy(int steps);
+
 private:
     /** timecode for widget */
     Timecode m_timecode;
@@ -81,6 +83,7 @@ private:
     bool m_frametimecode;
     int m_minimum;
     int m_maximum;
+    int m_value;
 
 public slots:
     /** @brief Sets the value.
@@ -95,13 +98,7 @@ public slots:
     void slotUpdateTimeCodeFormat();
 
 private slots:
-    void slotValueUp();
-    void slotValueDown();
-
-    /** @brief Updates the selection when the cursor position changed.
-     * The digit after the cursor will be selected.
-     * This makes it easier to edit the timecode. */
-    void slotCursorPositionChanged(int oldPos, int newPos);
+    void slotEditingFinished();
 
 signals:
     /**
@@ -115,7 +112,9 @@ signals:
 
 protected:
     virtual void keyPressEvent(QKeyEvent *e);
-    virtual void wheelEvent(QWheelEvent *e);
+    virtual void mouseReleaseEvent(QMouseEvent *);
+//    virtual void wheelEvent(QWheelEvent *e);
+    virtual QAbstractSpinBox::StepEnabled stepEnabled () const;
 
 };