1 /***************************************************************************
2 effecstackview.h - description
5 copyright : (C) 2008 by Marco Gittler
6 email : g.marco@freenet.de
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
19 * @class EffectStackView
20 * @brief View part of the EffectStack
21 * @author Marco Gittler
24 #ifndef EFFECTSTACKVIEW_H
25 #define EFFECTSTACKVIEW_H
27 #include "ui_effectstack_ui.h"
28 #include "effectstackedit.h"
32 class MltVideoProfile;
35 class EffectStackView : public QWidget
40 EffectStackView(Monitor *monitor, QWidget *parent = 0);
41 virtual ~EffectStackView();
43 /** @brief Raises @param dock if a clip is loaded. */
44 void raiseWindow(QWidget* dock);
46 /** @brief Clears the list of effects and updates the buttons accordingly. */
49 /** @brief Sets the add effect button's menu to @param menu. */
50 void setMenu(QMenu *menu);
52 /** @brief Passes updates on @param profile and @param t on to the effect editor. */
53 void updateProjectFormat(MltVideoProfile profile, Timecode t);
55 /** @brief Tells the effect editor to update its timecode format. */
56 void updateTimecodeFormat();
59 Ui::EffectStack_UI m_ui;
61 QMap<QString, EffectsList*> m_effectLists;
62 EffectStackEdit* m_effectedit;
64 /** @brief Sets the list of effects according to the clip's effect list.
65 * @param ix Number of the effect to preselect */
66 void setupListView(int ix);
69 /** @brief Sets the clip whose effect list should be managed.
70 * @param c Clip whose effect list should be managed
71 * @param ix Effect to preselect */
72 void slotClipItemSelected(ClipItem* c, int ix);
74 /** @brief Emits updateClipEffect.
75 * @param old Old effect information
76 * @param e New effect information
78 * Connected to a parameter change in the editor */
79 void slotUpdateEffectParams(const QDomElement old, const QDomElement e);
81 /** @brief Removes the selected effect. */
85 /** @brief Updates buttons and the editor according to selected effect.
86 * @param update (optional) Set the clip's selected effect (display keyframes in timeline) */
87 void slotItemSelectionChanged(bool update = true);
89 /** @brief Moves the selected effect upwards. */
92 /** @brief Moves the selected effect downwards. */
95 /** @brief Resets the selected effect to its default values. */
96 void slotResetEffect();
98 /** @brief Updates effect @param item if it was enabled or disabled. */
99 void slotItemChanged(QListWidgetItem *item);
101 /** @brief Saves the selected effect's values to a custom effect.
103 * TODO: save all effects into one custom effect */
104 void slotSaveEffect();
106 /** @brief Emits seekTimeline with position = clipstart + @param pos. */
107 void slotSeekTimeline(int pos);
109 /** @brief Makes the check all checkbox represent the check state of the effects. */
110 void slotUpdateCheckAllButton();
112 /** @brief Sets the check state of all effects according to @param state. */
113 void slotCheckAll(int state);
115 /** @brief Define the region filter for current effect. */
116 void slotRegionChanged();
119 void removeEffect(ClipItem*, QDomElement);
120 /** Parameters for an effect changed, update the filter in playlist */
121 void updateClipEffect(ClipItem*, QDomElement, QDomElement, int);
122 /** An effect in stack was moved, we need to regenerate
123 all effects for this clip in the playlist */
124 void refreshEffectStack(ClipItem *);
125 /** Enable or disable an effect */
126 void changeEffectState(ClipItem*, int, bool);
127 /** An effect in stack was moved */
128 void changeEffectPosition(ClipItem*, int, int);
129 /** an effect was saved, reload list */
130 void reloadEffects();
131 /** An effect with position parameter was changed, seek */
132 void seekTimeline(int);
133 /** The region effect for current effect was changed */
134 void updateClipRegion(ClipItem*, int, QString);
135 void displayMessage(const QString&, int);