X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Feffectstackview.h;h=89055a2360374e03a9e691fa12cbe4c4903e6cb2;hb=a5b0bcb8bb9674224ac6476d52c19d9b4f1ded92;hp=20d2a2440ad40313b30d5cace3813781fd708e43;hpb=e7dcc38423c07ce3f0538263e809da00bb849ff5;p=kdenlive diff --git a/src/effectstackview.h b/src/effectstackview.h index 20d2a244..89055a23 100644 --- a/src/effectstackview.h +++ b/src/effectstackview.h @@ -30,13 +30,14 @@ class EffectsList; class ClipItem; class MltVideoProfile; +class Monitor; class EffectStackView : public QWidget { Q_OBJECT public: - EffectStackView(QWidget *parent = 0); + EffectStackView(Monitor *monitor, QWidget *parent = 0); virtual ~EffectStackView(); /** @brief Raises @param dock if a clip is loaded. */ @@ -54,12 +55,28 @@ public: /** @brief Tells the effect editor to update its timecode format. */ void updateTimecodeFormat(); + /** @brief return the index of the track displayed in effect stack + ** @param ok set to true if we are looking at a track's effects, otherwise false. */ + int isTrackMode(bool *ok) const; + private: Ui::EffectStack_UI m_ui; + Monitor *m_monitor; ClipItem* m_clipref; QMap m_effectLists; + EffectsList m_currentEffectList; EffectStackEdit* m_effectedit; + /** @brief Effectstackview can show the effects of a clip or the effects of a track. + * true if showing track effects. */ + bool m_trackMode; + + /** @brief The track index of currently edited track. */ + int m_trackindex; + + /** If in track mode: Info of the edited track to be able to access its duration. */ + TrackInfo m_trackInfo; + /** @brief Sets the list of effects according to the clip's effect list. * @param ix Number of the effect to preselect */ void setupListView(int ix); @@ -70,12 +87,14 @@ public slots: * @param ix Effect to preselect */ void slotClipItemSelected(ClipItem* c, int ix); + void slotTrackItemSelected(int ix, const TrackInfo info); + /** @brief Emits updateClipEffect. * @param old Old effect information * @param e New effect information * * Connected to a parameter change in the editor */ - void slotUpdateEffectParams(const QDomElement old, const QDomElement e); + void slotUpdateEffectParams(const QDomElement &old, const QDomElement &e); /** @brief Removes the selected effect. */ void slotItemDel(); @@ -111,26 +130,37 @@ private slots: /** @brief Sets the check state of all effects according to @param state. */ void slotCheckAll(int state); - /** @brief Define the region filter for current effect. */ - void slotRegionChanged(); + /* @brief Define the region filter for current effect. + void slotRegionChanged();*/ + + /** @brief Checks whether the monitor scene has to be displayed. */ + void slotCheckMonitorPosition(int renderPos); + + /** @brief Pass position changes of the timeline cursor to the effects to keep their local timelines in sync. */ + void slotRenderPos(int pos); + + /** @brief Shows/Hides the comment box and emits showComments to notify the parameter widgets to do the same. */ + void slotShowComments(); signals: - void removeEffect(ClipItem*, QDomElement); + void removeEffect(ClipItem*, int, QDomElement); /** Parameters for an effect changed, update the filter in playlist */ - void updateClipEffect(ClipItem*, QDomElement, QDomElement, int); + void updateEffect(ClipItem*, int, QDomElement, QDomElement, int); /** An effect in stack was moved, we need to regenerate all effects for this clip in the playlist */ void refreshEffectStack(ClipItem *); /** Enable or disable an effect */ - void changeEffectState(ClipItem*, int, bool); + void changeEffectState(ClipItem*, int, int, bool); /** An effect in stack was moved */ - void changeEffectPosition(ClipItem*, int, int); + void changeEffectPosition(ClipItem*, int, int, int); /** an effect was saved, reload list */ void reloadEffects(); /** An effect with position parameter was changed, seek */ void seekTimeline(int); /** The region effect for current effect was changed */ void updateClipRegion(ClipItem*, int, QString); + void displayMessage(const QString&, int); + void showComments(bool show); }; #endif