X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Feffectstack%2Feffectstackview2.h;h=fce6c31708e06bfa2bec05b7a3b1d97e419e0bce;hb=c24658bd34221d735f0641c924b890e1a6be7101;hp=431af94b69e978ec4b84fce8fb642367df689fef;hpb=4f16ab3780bd444f7c85bc70e0df18bffcc8cba4;p=kdenlive diff --git a/src/effectstack/effectstackview2.h b/src/effectstack/effectstackview2.h index 431af94b..fce6c317 100644 --- a/src/effectstack/effectstackview2.h +++ b/src/effectstack/effectstackview2.h @@ -2,8 +2,8 @@ effecstackview2.h - description ------------------- begin : Feb 15 2008 - copyright : (C) 2008 by Marco Gittler - email : g.marco@freenet.de + copyright : (C) 2008 by Marco Gittler (g.marco@freenet.de) + copyright : (C) 2012 by Jean-Baptiste Mardelle (jb@kdenlive.org) ***************************************************************************/ /*************************************************************************** @@ -25,7 +25,6 @@ #define EFFECTSTACKVIEW2_H #include "ui_effectstack2_ui.h" -#include "effectstackedit.h" #include "collapsibleeffect.h" #include "collapsiblegroup.h" @@ -40,7 +39,7 @@ class EffectStackView2 : public QWidget Q_OBJECT public: - EffectStackView2(Monitor *monitor, QWidget *parent = 0); + explicit EffectStackView2(Monitor *monitor, QWidget *parent = 0); virtual ~EffectStackView2(); /** @brief Raises @param dock if a clip is loaded. */ @@ -54,7 +53,7 @@ public: void clear(); /** @brief Passes updates on @param profile and @param t on to the effect editor. */ - void updateProjectFormat(MltVideoProfile profile, Timecode t); + void updateProjectFormat(const MltVideoProfile &profile, const Timecode &t); /** @brief Tells the effect editor to update its timecode format. */ void updateTimecodeFormat(); @@ -66,11 +65,25 @@ public: /** @brief Delete currently selected effect. */ void deleteCurrentEffect(); + + /** @brief Palette was changed, update style. */ + void updatePalette(); + + /** @brief Process dropped xml effect. */ + void processDroppedEffect(QDomElement e, QDropEvent *event); + + /** @brief Return the stylesheet required for effect parameters. */ + static const QString getStyleSheet(); + + /** @brief Import keyframes from the clip metadata */ + void setKeyframes(const QString &data, int maximum); protected: - virtual void mouseMoveEvent(QMouseEvent * event); - virtual void mouseReleaseEvent(QMouseEvent * event); - virtual void resizeEvent ( QResizeEvent * event ); + void mouseMoveEvent(QMouseEvent * event); + void mouseReleaseEvent(QMouseEvent * event); + void resizeEvent ( QResizeEvent * event ); + void dragEnterEvent(QDragEnterEvent *event); + void dropEvent(QDropEvent *event); private: Ui::EffectStack2_UI m_ui; @@ -93,23 +106,36 @@ private: /** @brief The effect currently being dragged, NULL if no drag happening. */ CollapsibleEffect *m_draggedEffect; + /** @brief The effect currently being dragged, NULL if no drag happening. */ + CollapsibleGroup *m_draggedGroup; + /** @brief The current number of groups. */ int m_groupIndex; + + /** @brief The current effect may require an on monitor scene. */ + bool m_monitorSceneWanted; - /** @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); + /** @brief Sets the list of effects according to the clip's effect list. */ + void setupListView(); /** @brief Build the drag info and start it. */ void startDrag(); + + /** @brief Connect an effect to its signals. */ + void connectEffect(CollapsibleEffect *currentEffect); + /** @brief Connect a group to its signals. */ + void connectGroup(CollapsibleGroup *group); public slots: /** @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); + * @param c Clip whose effect list should be managed */ + void slotClipItemSelected(ClipItem* c); + + /** @brief Update the clip range (in-out points) + * @param c Clip whose effect list should be managed */ + void slotClipItemUpdate(); - void slotTrackItemSelected(int ix, const TrackInfo info); + void slotTrackItemSelected(int ix, const TrackInfo &info); /** @brief Check if the mouse wheel events should be used for scrolling the widget view. */ void slotCheckWheelEventFilter(); @@ -126,26 +152,29 @@ private slots: /** @brief Checks whether the monitor scene has to be displayed. */ void slotCheckMonitorPosition(int renderPos); - void slotUpdateEffectParams(const QDomElement old, const QDomElement e, int ix); + void slotUpdateEffectParams(const QDomElement &old, const QDomElement& e, int ix); /** @brief Move an effect in the stack. - * @param index The effect index in the stack + * @param indexes The list of effect index in the stack * @param up true if we want to move effect up, false for down */ - void slotMoveEffectUp(int index, bool up); + void slotMoveEffectUp(const QList &indexes, bool up); /** @brief Delete an effect in the stack. */ - void slotDeleteEffect(const QDomElement effect); + void slotDeleteEffect(const QDomElement &effect); + + /** @brief Delete all effect in a group. */ + void slotDeleteGroup(QDomDocument doc); /** @brief Pass position changes of the timeline cursor to the effects to keep their local timelines in sync. */ void slotRenderPos(int pos); /** @brief Called whenever an effect is enabled / disabled by user. */ - void slotUpdateEffectState(bool disable, int index); + void slotUpdateEffectState(bool disable, int index, bool needsMonitorEffectScene); void slotSetCurrentEffect(int ix); /** @brief Triggers a filter job on this clip. */ - void slotStartFilterJob(const QString&filterName, const QString&filterParams, const QString&finalFilterName, const QString&consumer, const QString&consumerParams, const QString&properties); + void slotStartFilterJob(const QString&filterName, const QString&filterParams, const QString&consumer, const QString&consumerParams, const QMap &extraParams); /** @brief Reset an effect to its default values. */ void slotResetEffect(int ix); @@ -153,18 +182,22 @@ private slots: /** @brief Create a group containing effect with ix index. */ void slotCreateGroup(int ix); - /** @brief Move an effect into a group. - ** @param ix the index of effect to move in stack layout - ** @param group the effect on which the effect was dropped - ** @param lastEffectIndex the last effect index in the group, effect will be inserted after that index + /** @brief Create a region effect with ix index. */ + void slotCreateRegion(int ix, KUrl url); + + /** @brief Move an effect. + ** @param currentIndexes the list of effect indexes to move in stack layout + ** @param newIndex the position where the effects will be moved + ** @param groupIndex the index of the group if any (-1 if none) + ** @param groupName the name of the group to paste the effect */ - void slotMoveEffect(int currentIndex, int newIndex, int groupIndex); + void slotMoveEffect(QList currentIndexes, int newIndex, int groupIndex, QString groupName = QString()); /** @brief Remove effects from a group */ void slotUnGroup(CollapsibleGroup* group); /** @brief Add en effect to selected clip */ - void slotAddEffect(QDomElement effect); + void slotAddEffect(const QDomElement &effect); /** @brief Enable / disable all effects for the clip */ void slotCheckAll(int state); @@ -174,28 +207,32 @@ private slots: /** @brief Display additionnal effect info */ void slotShowComments(); + + /** @brief An effect group was renamed, update effects info */ + void slotRenameGroup(CollapsibleGroup *group); signals: - void removeEffect(ClipItem*, int, QDomElement); + void removeEffect(ClipItem*, int, const QDomElement&); /** Parameters for an effect changed, update the filter in playlist */ - void updateEffect(ClipItem*, int, QDomElement, QDomElement, int); + void updateEffect(ClipItem*, int, const QDomElement&, const QDomElement &, int,bool); /** 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, int, bool); + void changeEffectState(ClipItem*, int, const QList &, bool); /** An effect in stack was moved */ - void changeEffectPosition(ClipItem*, int, int, int); + void changeEffectPosition(ClipItem*, int, const QList &, 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 updateClipRegion(ClipItem*, int, const QString&); void displayMessage(const QString&, int); void showComments(bool show); - void startFilterJob(ItemInfo info, const QString &clipId, const QString &filterName, const QString &filterParams, const QString&finalFilterName, const QString &consumer, const QString &consumerParams, const QString &properties); - void addEffect(ClipItem*,QDomElement); + void startFilterJob(const ItemInfo &info, const QString &clipId, const QString &filterName, const QString &filterParams, const QString &consumer, const QString &consumerParams, const QMap &extraParams); + void addEffect(ClipItem*,const QDomElement &); + void importClipKeyframes(GraphicsRectItem = AVWidget); }; #endif