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"
24 #include "effectstack/collapsibleeffect.h"
27 #include <QDomElement>
28 #include <QVBoxLayout>
31 #include <QScrollArea>
37 class EffectStackEdit : public QScrollArea
41 EffectStackEdit(Monitor *monitor, QWidget *parent = 0);
43 void updateProjectFormat(MltVideoProfile profile, Timecode t);
44 static QMap<QString, QImage> iconCache;
45 /** @brief Sets attribute @param name to @param value.
47 * Used to disable the effect, by setting disabled="1" */
48 void updateParameter(const QString &name, const QString &value);
49 void setFrameSize(QPoint p);
50 /** @brief Tells the parameters to update their timecode format according to KdenliveSettings. */
51 void updateTimecodeFormat();
52 /** @brief Returns true if this effect wants to keep track of current position in clip. */
53 bool effectNeedsSyncPosition() const;
57 /** @brief Deletes all parameter widgets. */
59 /** @brief Updates parameter @param name according to new value of dependency.
60 * @param name Name of the parameter which will be updated
61 * @param type Type of the parameter which will be updated
62 * @param value Value of the dependency parameter */
63 void meetDependency(const QString& name, QString type, QString value);
66 QList<QWidget*> m_uiItems;
68 QMap<QString, QWidget*> m_valueItems;
71 KeyframeEdit *m_keyframeEditor;
73 GeometryWidget *m_geometryWidget;
74 EffectMetaInfo m_metaInfo;
75 QWidget *m_baseWidget;
76 ParameterContainer *m_paramWidget;
79 /** @brief Called when an effect is selected, builds the UIĀ for this effect. */
80 void transferParamDesc(const QDomElement &d, ItemInfo info, bool isEffect = true);
82 /** @brief Called whenever(?) some parameter is changed in the gui.
84 * Transfers all Dynamic gui parameter settings into m_params(??) */
85 void collectAllParameters();
87 /** @brief Pass position changes of the timeline cursor to the effects to keep their local timelines in sync. */
88 void slotSyncEffectsPos(int pos);
91 void slotStartFilterJobAction();
94 void parameterChanged(const QDomElement &, const QDomElement &, int);
95 void seekTimeline(int);
96 void displayMessage(const QString&, int);
97 void checkMonitorPosition(int);
98 void syncEffectsPos(int pos);
99 void showComments(bool show);
100 void effectStateChanged(bool enabled);
101 /** @brief Start an MLT filter job on this clip. */
102 void startFilterJob(const QString &filterName, const QString &filterParams, const QString &finalFilterName, const QString &consumer, const QString &consumerParams, const QString &properties);