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/parametercontainer.h"
27 #include <QDomElement>
28 #include <QVBoxLayout>
31 #include <QScrollArea>
35 class EffectStackEdit : public QScrollArea
39 explicit EffectStackEdit(Monitor *monitor, QWidget *parent = 0);
41 void updateProjectFormat(const MltVideoProfile &profile, const Timecode &t);
42 static QMap<QString, QImage> iconCache;
43 /** @brief Sets attribute @param name to @param value.
45 * Used to disable the effect, by setting disabled="1" */
46 void updateParameter(const QString &name, const QString &value);
47 void setFrameSize(const QPoint &p);
48 /** @brief Tells the parameters to update their timecode format according to KdenliveSettings. */
49 void updateTimecodeFormat();
50 /** @brief Returns true if this effect wants to keep track of current position in clip. */
51 bool effectNeedsSyncPosition() const;
53 /** @brief Install event filter so that scrolling with mouse wheel does not change parameter value. */
54 virtual bool eventFilter( QObject * o, QEvent * e );
55 /** @brief Returns true if this transition requires an on monitor scene. */
56 bool needsMonitorEffectScene() const;
57 /** @brief Set keyframes for this transition. */
58 void setKeyframes(const QString &data, int maximum);
61 EffectMetaInfo m_metaInfo;
62 QWidget *m_baseWidget;
63 ParameterContainer *m_paramWidget;
66 /** @brief Called when an effect is selected, builds the UI for this effect. */
67 void transferParamDesc(const QDomElement &d, ItemInfo info, bool isEffect = true);
69 /** @brief Pass position changes of the timeline cursor to the effects to keep their local timelines in sync. */
70 void slotSyncEffectsPos(int pos);
73 void parameterChanged(const QDomElement&, const QDomElement&, int);
74 void seekTimeline(int);
75 void displayMessage(const QString&, int);
76 void checkMonitorPosition(int);
77 void syncEffectsPos(int pos);
78 void showComments(bool show);
79 void effectStateChanged(bool enabled);
80 /** @brief Start an MLT filter job on this clip. */
81 void startFilterJob(const QString &filterName, const QString &filterParams, const QString &consumer, const QString &consumerParams, const QMap <QString, QString>&);
82 void importClipKeyframes(GRAPHICSRECTITEM = AVWIDGET);