]> git.sesse.net Git - kdenlive/blobdiff - src/geometryval.h
Const'ref
[kdenlive] / src / geometryval.h
index b2d907643c8383c842a1713efa6b41eee5401dd0..a1557fc03f5bb6b05cb7340cf2f2848e253eff4a 100644 (file)
 #include <QWidget>
 #include <QDomElement>
 #include <QGraphicsPathItem>
-#include <QGraphicsView>
 
 #include <mlt++/Mlt.h>
 
 #include "ui_geometryval_ui.h"
 #include "definitions.h"
 #include "keyframehelper.h"
-#include "ui_geometryposition_ui.h"
+#include "timecodedisplay.h"
 
-//class QGraphicsScene;
 class GraphicsSceneRectMove;
 class QGraphicsRectItem;
-class QMouseEvent;
+class QGraphicsView;
 
 
 class Geometryval : public QWidget, public Ui::Geometryval
 {
     Q_OBJECT
 public:
-    explicit Geometryval(const MltVideoProfile profile, QPoint frame_size, int startPoint = 0, QWidget* parent = 0);
+    explicit Geometryval(const MltVideoProfile &profile, const Timecode &t, const QPoint &frame_size, int startPoint = 0, QWidget* parent = 0);
     virtual ~Geometryval();
     QDomElement getParamDesc();
     QString getValue() const;
-    void setFrameSize(QPoint p);
+    void setFrameSize(const QPoint &p);
+    /** @brief Updates the timecode display according to settings (frame number or hh:mm:ss:ff) */
+    void updateTimecodeFormat();
+    void slotUpdateRange(int inPoint, int outPoint);
 
 private:
     MltVideoProfile m_profile;
@@ -56,45 +57,48 @@ private:
     KeyframeHelper *m_helper;
     QGraphicsPathItem *m_path;
     QMenu *m_configMenu;
-    QMenu *m_scaleMenu;
-    QMenu *m_alignMenu;
     QAction *m_syncAction;
-    QAction *m_editGeom;
+    QAction *m_editOptions;
+    QAction *m_reset;
     bool m_fixedMode;
     QPoint m_frameSize;
-    Ui::GeometryPosition_UI m_view;
     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 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 slotGeometry();
     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();