X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fkeyframeedit.h;h=165ccc1734514766e72dc24b880aac52dcf5ec06;hb=836ab97535a8b5194a1cfeade75d9d3b26b90c8b;hp=23115b36b090a202d335767a617c77cbe8f9af82;hpb=9eb4f43c51f57626d38b3448b042c07471d36ed4;p=kdenlive diff --git a/src/keyframeedit.h b/src/keyframeedit.h index 23115b36..165ccc17 100644 --- a/src/keyframeedit.h +++ b/src/keyframeedit.h @@ -26,6 +26,7 @@ #include class QButtonGroup; +class PositionEdit; #include "ui_keyframeeditor_ui.h" #include "definitions.h" @@ -82,7 +83,7 @@ class KeyframeEdit : public QWidget, public Ui::KeyframeEditor_UI public: explicit KeyframeEdit(QDomElement e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent = 0); virtual ~KeyframeEdit(); - void addParameter(QDomElement e, int activeKeyframe = -1); + virtual void addParameter(QDomElement e, int activeKeyframe = -1); const QString getValue(const QString &name); /** @brief Updates the timecode display according to settings (frame number or hh:mm:ss:ff) */ void updateTimecodeFormat(); @@ -90,29 +91,41 @@ public: /** @brief Returns true if the parameter @param name should be shown on the clip in timeline. */ bool isVisibleParam(const QString &name); -private: - QList m_params; - int m_min; - int m_max; - Timecode m_timecode; - QGridLayout *m_slidersLayout; - QButtonGroup *m_showButtons; + /** @brief Makes the first parameter visible in timeline if no parameter is selected. */ + void checkVisibleParam(); - void generateAllParams(); +public slots: + + void slotUpdateRange(int inPoint, int outPoint); + +protected: /** @brief Gets the position of a keyframe from the table. - * @param row Row of the keyframe in the table */ + * @param row Row of the keyframe in the table */ int getPos(int row); /** @brief Converts a frame value to timecode considering the frames vs. HH:MM:SS:FF setting. - * @return timecode */ + * @return timecode */ QString getPosString(int pos); + void generateAllParams(); + + int m_min; + int m_max; + +protected slots: + void slotAdjustKeyframeInfo(bool seek = true); + +private: + QList m_params; + Timecode m_timecode; + QGridLayout *m_slidersLayout; + PositionEdit *m_position; + private slots: void slotDeleteKeyframe(); void slotAddKeyframe(); void slotGenerateParams(int row, int column); - void slotAdjustKeyframeInfo(bool seek = true); void slotAdjustKeyframePos(int value); - void slotAdjustKeyframeValue(int value); + void slotAdjustKeyframeValue(double value); /** @brief Turns the seek to keyframe position setting on/off. * @param seek true = seeking on */ void slotSetSeeking(bool seek); @@ -124,11 +137,12 @@ private slots: void slotResetKeyframe(); /** @brief Makes the parameter at column @param id the visible (in timeline) one. */ - void slotUpdateVisibleParameter(int id); + void slotUpdateVisibleParameter(int id, bool update = true); signals: void parameterChanged(); void seekToPos(int); + void showComments(bool show); }; #endif