]> git.sesse.net Git - kdenlive/blobdiff - src/monitorscene.h
Fix monitor scene never resetting scrollbars (scene rect always growing)
[kdenlive] / src / monitorscene.h
index cf04b624d5510437ef6652be251e5532112762f7..d850e5807c1a905418f4279bccfa4450996e6a8c 100644 (file)
@@ -42,16 +42,20 @@ public:
 
     /** @brief Makes the background frame fit again after the profile changed (and therefore the resolution might have changed). */
     void resetProfile();
+    
+    /** @brief Reset scene size. */
+    void cleanup();
+    
+    /** @brief Center view on frame border. */
+    void centerView();
 
 protected:
-    /** @brief Emits signal mousePressed to be used in onmonitor items. */
     virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
-    /** @brief Emits signal mouseMoveEvent to be used in onmonitor items. */
     virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-    /** @brief Emits signal mouseReleaseEvent to be used in onmonitor items. */
     virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
     /** @brief Adds a keyframe if scene is disabled. */
     virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
+    /** @brief Reimplemented to allow zooming using ctrl + mouse wheel. */
     virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
 
 public slots:
@@ -73,8 +77,6 @@ public slots:
 private slots:
     /** @brief Sets m_backgroundImage to @param image and requests updating the background item. */
     void slotSetBackgroundImage(const QImage &image);
-    /** @brief Sets the mouse curors to @param cursor for the scene. */
-    void slotSetCursor(const QCursor &cursor);
 
 private:
     Render *m_renderer;
@@ -85,14 +87,12 @@ private:
     QImage m_backgroundImage;
     bool m_enabled;
     qreal m_zoom;
+    bool m_groupMove;
+    QPointF m_lastPos;
 
 signals:
-    void actionFinished();
     void zoomChanged(int);
     void addKeyframe();
-    void mouseMoved(QGraphicsSceneMouseEvent *event);
-    void mousePressed(QGraphicsSceneMouseEvent *event);
-    void mouseReleased(QGraphicsSceneMouseEvent *event);
 };
 
 #endif