]> git.sesse.net Git - kdenlive/blobdiff - src/customtrackview.h
Fix corruption when changing project's fps
[kdenlive] / src / customtrackview.h
index ca08d5070c54c318ecb29a87c5e21c88948f176c..f862dee7f58aec501fd6b028e68c4605961d8e29 100644 (file)
@@ -156,6 +156,8 @@ public:
     int selectedTrack() const;
     QStringList selectedClips() const;
     QList<ClipItem *> selectedClipItems() const;
+    /** @brief Checks wheter an item can be inserted (make sure it does not overlap another item) */
+    bool canBePastedTo(ItemInfo info, int type) const;
 
     /** @brief Selects a clip.
     * @param add Whether to select or deselect
@@ -267,6 +269,8 @@ public slots:
     * @param offsetList The list of points that should also snap (for example when movin a clip, start and end points should snap
     * @param skipSelectedItems if true, the selected item start and end points will not be added to snap list */
     void updateSnapPoints(AbstractClipItem *selected, QList <GenTime> offsetList = QList <GenTime> (), bool skipSelectedItems = false);
+    /** @brief Save a snapshot image of current timeline view */
+    void saveTimelinePreview(const QString path);
 
 protected:
     virtual void drawBackground(QPainter * painter, const QRectF & rect);
@@ -356,9 +360,8 @@ private:
 
     /** Get the index of the video track that is just below current track */
     int getPreviousVideoTrack(int track);
-    void updatePositionEffects(ClipItem * item, ItemInfo info);
+    void updatePositionEffects(ClipItem * item, ItemInfo info, bool standalone = true);
     bool insertDropClips(const QMimeData *data, const QPoint pos);
-    bool canBePastedTo(ItemInfo info, int type) const;
     bool canBePastedTo(QList <ItemInfo> infoList, int type) const;
     bool canBePasted(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const;
     bool canBeMoved(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const;
@@ -433,6 +436,13 @@ private:
      * In addition to update the duration in TrackInfo it updates effects with keyframes on the track. */
     void updateTrackDuration(int track, QUndoCommand *command);
 
+    /** @brief Adjusts effects after a clip resize.
+     * @param item The item that was resized
+     * @param oldInfo pre resize info
+     * @param fromStart false = resize from end
+     * @param command Used as a parent for EditEffectCommand */
+    void adjustEffects(ClipItem *item, ItemInfo oldInfo, QUndoCommand *command);
+
 private slots:
     void slotRefreshGuides();
     void slotEnableRefresh();