X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fgeometryval.h;h=3bacb18d26396754b2be91b38a98b579d7af09ba;hb=f9394be680a8ac3c2ff8e39c9d8439eae5b55acc;hp=cb7d98462aed67fa032d081cad41e7c56e49a3d3;hpb=c42a026234a44a2d766e57bc64a6ac7bbd094000;p=kdenlive diff --git a/src/geometryval.h b/src/geometryval.h index cb7d9846..3bacb18d 100644 --- a/src/geometryval.h +++ b/src/geometryval.h @@ -22,12 +22,14 @@ #include #include #include +#include #include #include "ui_geometryval_ui.h" #include "definitions.h" #include "keyframehelper.h" +#include "timecodedisplay.h" //class QGraphicsScene; class GraphicsSceneRectMove; @@ -35,51 +37,69 @@ class QGraphicsRectItem; class QMouseEvent; -class Geometryval : public QWidget +class Geometryval : public QWidget, public Ui::Geometryval { Q_OBJECT public: - explicit Geometryval(const MltVideoProfile profile, QWidget* parent = 0); + explicit Geometryval(const MltVideoProfile profile, Timecode t, QPoint frame_size, int startPoint = 0, QWidget* parent = 0); + virtual ~Geometryval(); QDomElement getParamDesc(); + QString getValue() const; + void setFrameSize(QPoint p); + /** @brief Updates the timecode display according to settings (frame number or hh:mm:ss:ff) */ + void updateTimecodeFormat(); private: - Ui::Geometryval ui; MltVideoProfile m_profile; - //QGraphicsScene* scene; - GraphicsSceneRectMove *scene; - QDomElement param; - QGraphicsRectItem *paramRect; + int m_realWidth; + GraphicsSceneRectMove *m_scene; + QGraphicsRectItem *m_paramRect; Mlt::Geometry *m_geom; KeyframeHelper *m_helper; QGraphicsPathItem *m_path; - QMenu *m_scaleMenu; - QMenu *m_alignMenu; + QMenu *m_configMenu; QAction *m_syncAction; + QAction *m_editOptions; + QAction *m_reset; bool m_fixedMode; + QPoint m_frameSize; void updateTransitionPath(); + double m_dar; + int m_startPoint; + QGraphicsView *m_sceneview; + TimecodeDisplay m_timePos; + bool keyframeSelected(); public slots: - void setupParam(const QDomElement&, int, int); + void setupParam(const QDomElement, int minframe, int maxframe); + /** @brief Updates position of the local timeline to @param relTimelinePos. */ + void slotSyncPosition(int relTimelinePos); private slots: void slotNextFrame(); void slotPreviousFrame(); - void slotPositionChanged(int pos, bool seek = true); - void slotDeleteFrame(); - void slotAddFrame(); + void slotPositionChanged(int pos = -1, bool seek = true); + void slotDeleteFrame(int pos = -1); + void slotAddFrame(int pos = -1); void slotUpdateTransitionProperties(); void slotTransparencyChanged(int transp); - void slotResize50(); - void slotResize100(); - void slotResize200(); + void slotResizeCustom(); + void slotResizeOriginal(); void slotAlignRight(); void slotAlignLeft(); void slotAlignTop(); void slotAlignBottom(); - void slotAlignCenter(); void slotAlignHCenter(); void slotAlignVCenter(); void slotSyncCursor(); + void slotResetPosition(); + void slotKeyframeMoved(int); + void slotSwitchOptions(); + void slotUpdateGeometry(); + void slotGeometryX(int value); + void slotGeometryY(int value); + void slotGeometryWidth(int value); + void slotGeometryHeight(int value); signals: void parameterChanged();