X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Feffectstackview.h;h=11b0c58cc236fe45b4407d7bce27e70d71c91897;hb=8b2360b0b11a6918e8a468bd453ce9025121b915;hp=ebafffa34f3eea06a4a3a784c81c6c4bb7a179cd;hpb=57d603d727098446a3518aca5f43423a184dc50d;p=kdenlive diff --git a/src/effectstackview.h b/src/effectstackview.h index ebafffa3..11b0c58c 100644 --- a/src/effectstackview.h +++ b/src/effectstackview.h @@ -15,46 +15,114 @@ * * ***************************************************************************/ +/** + * @class EffectStackView + * @brief View part of the EffectStack + * @author Marco Gittler + */ + #ifndef EFFECTSTACKVIEW_H #define EFFECTSTACKVIEW_H #include "ui_effectstack_ui.h" #include "effectstackedit.h" + class EffectsList; class ClipItem; +class MltVideoProfile; +class Monitor; -class EffectStackView : public QWidget { +class EffectStackView : public QWidget +{ Q_OBJECT public: - EffectStackView(QWidget *parent = 0); - void raiseWindow(QWidget*); + EffectStackView(Monitor *monitor, QWidget *parent = 0); + virtual ~EffectStackView(); + + /** @brief Raises @param dock if a clip is loaded. */ + void raiseWindow(QWidget* dock); + + /** @brief Clears the list of effects and updates the buttons accordingly. */ void clear(); + /** @brief Sets the add effect button's menu to @param menu. */ + void setMenu(QMenu *menu); + + /** @brief Passes updates on @param profile and @param t on to the effect editor. */ + void updateProjectFormat(MltVideoProfile profile, Timecode t); + + /** @brief Tells the effect editor to update its timecode format. */ + void updateTimecodeFormat(); + private: - Ui::EffectStack_UI ui; - ClipItem* clipref; - QMap effectLists; - EffectStackEdit* effectedit; + Ui::EffectStack_UI m_ui; + ClipItem* m_clipref; + QMap m_effectLists; + EffectStackEdit* m_effectedit; + Monitor *m_monitor; + + /** @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); - //void updateButtonStatus(); public slots: - void slotClipItemSelected(ClipItem*); - void slotUpdateEffectParams(const QDomElement&, const QDomElement&); + /** @brief Sets the clip whose effect list should be managed. + * @param c Clip whose effect list should be managed + * @param ix Effect to preselect */ + void slotClipItemSelected(ClipItem* c, int ix); + + /** @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); + + /** @brief Removes the selected effect. */ + void slotItemDel(); private slots: - void slotItemSelectionChanged(); + /** @brief Updates buttons and the editor according to selected effect. + * @param update (optional) Set the clip's selected effect (display keyframes in timeline) */ + void slotItemSelectionChanged(bool update = true); + + /** @brief Moves the selected effect upwards. */ void slotItemUp(); + + /** @brief Moves the selected effect downwards. */ void slotItemDown(); - void slotItemDel(); - void slotNewEffect(); + + /** @brief Resets the selected effect to its default values. */ void slotResetEffect(); + + /** @brief Updates effect @param item if it was enabled or disabled. */ void slotItemChanged(QListWidgetItem *item); + + /** @brief Saves the selected effect's values to a custom effect. + * + * TODO: save all effects into one custom effect */ void slotSaveEffect(); + /** @brief Emits seekTimeline with position = clipstart + @param pos. */ + void slotSeekTimeline(int pos); + + /** @brief Makes the check all checkbox represent the check state of the effects. */ + void slotUpdateCheckAllButton(); + + /** @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 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); + signals: - void transferParamDesc(const QDomElement&, int , int); void removeEffect(ClipItem*, QDomElement); /** Parameters for an effect changed, update the filter in playlist */ void updateClipEffect(ClipItem*, QDomElement, QDomElement, int); @@ -67,7 +135,11 @@ signals: void changeEffectPosition(ClipItem*, 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); }; #endif