1 /***************************************************************************
2 effecstackedit.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 ***************************************************************************/
18 #ifndef EFFECTSTACKEDIT_H
19 #define EFFECTSTACKEDIT_H
21 #include "definitions.h"
23 #include "keyframeedit.h"
26 #include <QDomElement>
27 #include <QVBoxLayout>
30 #include <QScrollArea>
32 enum WIPE_DIRECTON { UP = 0, DOWN = 1, LEFT = 2, RIGHT = 3, CENTER = 4 };
37 int startTransparency;
45 class EffectStackEdit : public QScrollArea
49 EffectStackEdit(Monitor *monitor, QWidget *parent = 0);
51 void updateProjectFormat(MltVideoProfile profile, Timecode t);
52 static QMap<QString, QImage> iconCache;
53 /** @brief Sets attribute @param name to @param value.
55 * Used to disable the effect, by setting disabled="1" */
56 void updateParameter(const QString &name, const QString &value);
57 void setFrameSize(QPoint p);
58 /** @brief Tells the parameters to update their timecode format according to KdenliveSettings. */
59 void updateTimecodeFormat();
62 /** @brief Deletes all parameter widgets. */
64 wipeInfo getWipeInfo(QString value);
65 QString getWipeString(wipeInfo info);
66 /** @brief Updates parameter @param name according to new value of dependency.
67 * @param name Name of the parameter which will be updated
68 * @param type Type of the parameter which will be updated
69 * @param value Value of the dependency parameter */
70 void meetDependency(const QString& name, QString type, QString value);
73 QList<QWidget*> m_uiItems;
74 QWidget *m_baseWidget;
76 QMap<QString, QWidget*> m_valueItems;
77 MltVideoProfile m_profile;
82 KeyframeEdit *m_keyframeEditor;
84 GeometryWidget *m_geometryWidget;
87 /** @brief Called when an effect is selected, builds the UIĀ for this effect. */
88 void transferParamDesc(const QDomElement d, int pos, int in, int out, bool isEffect = true);
90 /** @brief Called whenever(?) some parameter is changed in the gui.
92 * Transfers all Dynamic gui parameter settings into m_params(??) */
93 void collectAllParameters();
95 /** @brief Pass position changes of the timeline cursor to the effects to keep their local timelines in sync. */
96 void slotSyncEffectsPos(int pos);
99 void parameterChanged(const QDomElement, const QDomElement);
100 void seekTimeline(int);
101 void displayMessage(const QString&, int);
102 void checkMonitorPosition(int);
103 void syncEffectsPos(int pos);
104 void showComments(bool show);
105 void effectStateChanged(bool enabled);