]> git.sesse.net Git - kdenlive/blobdiff - src/geometrywidget.h
on-monitor editing: show controls next to the edit monitor
[kdenlive] / src / geometrywidget.h
index 18ff8622d2049766f5b39fe904be494952322a4f..aa47d7f46d0420fee8ea6603e16e0df31ad4f425 100644 (file)
 #include <QWidget>
 
 class QDomElement;
-class QGraphicsRectItem;
 class Monitor;
 class MonitorScene;
 class KeyframeHelper;
 class TimecodeDisplay;
+class OnMonitorRectItem;
+
 
 class GeometryWidget : public QWidget
 {
@@ -40,7 +41,9 @@ class GeometryWidget : public QWidget
 public:
     /** @brief Sets up the UI and connects it.
     * @param monitor Project monitor
+    * @param timecode Timecode needed by timecode display widget
     * @param clipPos Position of the clip in timeline
+    * @param isEffect true if used in an effect, false if used in a transition
     * @param parent (optional) Parent widget */
     GeometryWidget(Monitor *monitor, Timecode timecode, int clipPos, bool isEffect, QWidget* parent = 0);
     virtual ~GeometryWidget();
@@ -57,6 +60,8 @@ public slots:
     void setupParam(const QDomElement elem, int minframe, int maxframe);
     /** @brief Updates position of the local timeline to @param relTimelinePos.  */
     void slotSyncPosition(int relTimelinePos);
+    /** @brief Switches from normal monitor to monitor scene according to @param show. */
+    void slotShowScene(bool show = true);
 
 private:
     Ui::GeometryWidget_UI m_ui;
@@ -70,10 +75,11 @@ private:
     int m_outPoint;
     bool m_isEffect;
     MonitorScene *m_scene;
-    QGraphicsRectItem *m_rect;
+    OnMonitorRectItem *m_rect;
     KeyframeHelper *m_timeline;
     /** Stores the different settings in the MLT geometry format. */
     Mlt::Geometry *m_geometry;
+    bool m_showScene;
 
 private slots:
     /** @brief Updates controls according to position.
@@ -119,6 +125,9 @@ private slots:
     /** @brief Resizes the rect by @param value (in perecent) compared to the frame size. */
     void slotResize(int value);
 
+    /** @brief Sets the opacity to @param value. */
+    void slotSetOpacity(int value);
+
     /** @brief Moves the rect to the left frame border (x position = 0). */
     void slotMoveLeft();
     /** @brief Centers the rect horizontally. */
@@ -132,6 +141,9 @@ private slots:
     /** @brief Moves the rect to the bottom frame border (y position = frame height - rect height). */
     void slotMoveBottom();
 
+    /** @brief Enables/Disables syncing with the timeline according to @param sync. */
+    void slotSetSynchronize(bool sync);
+
 signals:
     void parameterChanged();
     void checkMonitorPosition(int);