/** @brief Raises @param dock if a clip is loaded. */
void raiseWindow(QWidget* dock);
- /** @brief Sets the add effect button's menu to @param menu. */
- void setMenu(QMenu *menu);
-
-
/** @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;
/** @brief Tells the effect editor to update its timecode format. */
void updateTimecodeFormat();
-
+
+ /** @brief Used to trigger drag effects. */
+ virtual bool eventFilter( QObject * o, QEvent * e );
+
+ CollapsibleEffect *getEffectByIndex(int ix);
+
+ /** @brief Delete currently selected effect. */
+ void deleteCurrentEffect();
+
+protected:
+ virtual void mouseMoveEvent(QMouseEvent * event);
+ virtual void mouseReleaseEvent(QMouseEvent * event);
+ virtual void resizeEvent ( QResizeEvent * event );
+
private:
Ui::EffectStack2_UI m_ui;
ClipItem* m_clipref;
QList <CollapsibleEffect*> m_effects;
EffectsList m_currentEffectList;
+
+ /** @brief Contains infos about effect like is it a track effect, which monitor displays it,... */
EffectMetaInfo m_effectMetaInfo;
+
+ /** @brief The last mouse click position, used to detect drag events. */
+ QPoint m_clickPoint;
/** @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 The effect currently being dragged, NULL if no drag happening. */
+ CollapsibleEffect *m_draggedEffect;
+
+ /** @brief The current number of groups. */
+ int m_groupIndex;
/** @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 clearLayout(QLayout *layout);
+ /** @brief Build the drag info and start it. */
+ void startDrag();
public slots:
/** @brief Sets the clip whose effect list should be managed.
void slotClipItemSelected(ClipItem* c, int ix);
void slotTrackItemSelected(int ix, const TrackInfo info);
-
- /** @brief Removes the selected effect. */
- void slotItemDel();
+
+ /** @brief Check if the mouse wheel events should be used for scrolling the widget view. */
+ void slotCheckWheelEventFilter();
private slots:
/** @brief Move an effect in the stack.
* @param index The effect index in the stack
* @param up true if we want to move effect up, false for down */
- void slotMoveEffect(int index, bool up);
+ void slotMoveEffectUp(int index, bool up);
/** @brief Delete an effect in the stack. */
- void slotDeleteEffect(const QDomElement effect, int index);
+ void slotDeleteEffect(const QDomElement effect);
/** @brief Pass position changes of the timeline cursor to the effects to keep their local timelines in sync. */
void slotRenderPos(int pos);
/** @brief Reset an effect to its default values. */
void slotResetEffect(int ix);
-
+
+ /** @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
+ */
+ void slotMoveEffect(int currentIndex, int newIndex, CollapsibleEffect* target);
+
+ /** @brief Remove effects from a group */
+ void slotUnGroup(CollapsibleEffect* group);
+
+ /** @brief Add en effect to selected clip */
+ void slotAddEffect(QDomElement effect);
+
+ /** @brief Enable / disable all effects for the clip */
+ void slotCheckAll(int state);
+
+ /** @brief Update check all button status */
+ void slotUpdateCheckAllButton();
+
+ /** @brief Display additionnal effect info */
+ void slotShowComments();
signals:
void removeEffect(ClipItem*, int, QDomElement);
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);
};
#endif