X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftimecodedisplay.h;h=e3ae03f7ca83eb361f425d3ed0be60d5ad6fadf0;hb=0ae1ad35ac158ca3a89de99c25dff38575ea1ae5;hp=4a4232ed7798d4180bd1616f88dfb4df30c6230f;hpb=f91e1561b66d8ceb35097f1ad4523b59951cd417;p=kdenlive diff --git a/src/timecodedisplay.h b/src/timecodedisplay.h index 4a4232ed..e3ae03f7 100644 --- a/src/timecodedisplay.h +++ b/src/timecodedisplay.h @@ -20,10 +20,10 @@ #ifndef TIMECODEDISPLAY_H_ #define TIMECODEDISPLAY_H_ -#include "ui_timecodedisplay_ui.h" #include "timecode.h" #include "gentime.h" +#include /** * @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 @@ -41,7 +41,7 @@ public: /** @brief Constructor for the widget, sets value to 0. * @param t Timecode object used to setup correct input (frames or HH:MM:SS:FF) * @param parent parent Widget */ - TimecodeDisplay(Timecode t, QWidget *parent = 0); + explicit TimecodeDisplay(Timecode t, QWidget *parent = 0); /** @brief Returns the minimum value, which can be entered. * default is 0 */ @@ -57,7 +57,7 @@ public: void setRange(int min, int max); /** @brief Returns the current input in frames. */ - int value() const; + int getValue() const; /** @brief Returns the current input as a GenTime object. */ GenTime gentime() const; @@ -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,8 +98,7 @@ public slots: void slotUpdateTimeCodeFormat(); private slots: - void slotValueUp(); - void slotValueDown(); + void slotEditingFinished(); signals: /** @@ -110,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; };