X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcustomtrackview.h;h=cead1468a4cc72ccb849e6b39d461e4199cfc81f;hb=ebd5f85f5c5992383c9da4d08ec0671aed99309b;hp=8c19ac9f20de07406c0564d3bc4e9b69d6b6a002;hpb=21dba8a18e24c2e573a5fac7114c8d28cfd28932;p=kdenlive diff --git a/src/customtrackview.h b/src/customtrackview.h index 8c19ac9f..cead1468 100644 --- a/src/customtrackview.h +++ b/src/customtrackview.h @@ -22,6 +22,7 @@ #define CUSTOMTRACKVIEW_H #include +#include #include #include @@ -42,6 +43,7 @@ class AbstractClipItem; class AbstractGroupItem; class Transition; + class CustomTrackView : public QGraphicsView { Q_OBJECT @@ -252,6 +254,12 @@ public slots: * @param ix The track index */ void slotAddTrackEffect(const QDomElement effect, int ix); + /** @brief Update the list of snap points (sticky timeline hotspots). + * @param selected The currently selected clip if any + * @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 offsetList = QList (), bool skipSelectedItems = false); + protected: virtual void drawBackground(QPainter * painter, const QRectF & rect); //virtual void drawForeground ( QPainter * painter, const QRectF & rect ); @@ -288,7 +296,7 @@ private: QPoint m_clickEvent; QList m_searchPoints; QList m_guides; - void updateSnapPoints(AbstractClipItem *selected, QList offsetList = QList (), bool skipSelectedItems = false); + ClipItem *getClipItemAt(int pos, int track); ClipItem *getClipItemAt(GenTime pos, int track); ClipItem *getClipItemAtEnd(GenTime pos, int track); @@ -332,6 +340,11 @@ private: QMutex m_mutex; QWaitCondition m_producerNotReady; + KStatefulBrush m_activeTrackBrush; + + /** stores the state of the control modifier during mouse press. + * Will then be used to identify whether we resize a group or only one item of it. */ + bool m_controlModifier; /** Get the index of the video track that is just below current track */ int getPreviousVideoTrack(int track); @@ -392,6 +405,11 @@ private: /** @brief Gets the effect parameters that will be passed to Mlt. */ EffectsParameterList getEffectArgs(const QDomElement effect); + /** @brief Updates @param item's pan and zoom effect after resize or cut. + * @param item clip whose pan and zoom effect should be updated + * @param cutPos (optional) if clip was cut, cut position relative to the original's clip position */ + void updatePanZoom(ClipItem *item, GenTime cutPos = GenTime()); + private slots: void slotRefreshGuides(); void slotEnableRefresh(); @@ -424,6 +442,8 @@ signals: void documentModified(); void forceClipProcessing(const QString &); void showTrackEffects(int, TrackInfo); + /** @brief Update the track effect button that shows if a track has effects or not.*/ + void updateTrackEffectState(int); }; #endif