]> git.sesse.net Git - kdenlive/blobdiff - src/effectstack/collapsibleeffect.h
const'ify
[kdenlive] / src / effectstack / collapsibleeffect.h
index 59cf59561758c329a023bf467c90917fe6e56327..de675b48a23a177b295944bd39dccd01668ae073 100644 (file)
 #ifndef COLLAPSIBLEEFFECT_H
 #define COLLAPSIBLEEFFECT_H
 
+#include "parametercontainer.h"
 #include "abstractcollapsiblewidget.h"
 #include "timecode.h"
-#include "keyframeedit.h"
+
 
 #include <QDomElement>
 #include <QToolButton>
 
-class QFrame;
 class QLabel;
 
-class Monitor;
-class GeometryWidget;
-
-struct EffectMetaInfo {
-    MltVideoProfile profile;
-    Timecode timecode;
-    Monitor *monitor;
-    QPoint frameSize;
-    bool trackMode;
-};
-
-enum WIPE_DIRECTON { UP = 0, DOWN = 1, LEFT = 2, RIGHT = 3, CENTER = 4 };
-
-struct wipeInfo {
-    WIPE_DIRECTON start;
-    WIPE_DIRECTON end;
-    int startTransparency;
-    int endTransparency;
-};
-
-class MySpinBox : public QSpinBox
-{
-    Q_OBJECT
-
-public:
-    MySpinBox(QWidget * parent = 0);
-    
-protected:
-    virtual void focusInEvent(QFocusEvent*);
-    virtual void focusOutEvent(QFocusEvent*);
-};
-
-class ParameterContainer : public QObject
-{
-    Q_OBJECT
-
-public:
-    ParameterContainer(QDomElement effect, ItemInfo info, EffectMetaInfo *metaInfo, QWidget * parent = 0);
-    ~ParameterContainer();
-    void updateTimecodeFormat();
-    void updateProjectFormat(MltVideoProfile profile, Timecode t);
-    void updateParameter(const QString &key, const QString &value);
-
-private slots:
-    void slotCollectAllParameters();
-    void slotStartFilterJobAction();
-
-private:
-        /** @brief Updates parameter @param name according to new value of dependency.
-    * @param name Name of the parameter which will be updated
-    * @param type Type of the parameter which will be updated
-    * @param value Value of the dependency parameter */
-    void meetDependency(const QString& name, QString type, QString value);
-    wipeInfo getWipeInfo(QString value);
-    QString getWipeString(wipeInfo info);
-    
-    int m_in;
-    int m_out;
-    QList<QWidget*> m_uiItems;
-    QMap<QString, QWidget*> m_valueItems;
-    Timecode m_timecode;
-    KeyframeEdit *m_keyframeEditor;
-    GeometryWidget *m_geometryWidget;
-    EffectMetaInfo *m_metaInfo;
-    QDomElement m_effect;
-    QVBoxLayout *m_vbox;
-
-signals:
-    void parameterChanged(const QDomElement, const QDomElement, int);
-    void syncEffectsPos(int);
-    void effectStateChanged(bool);
-    void checkMonitorPosition(int);
-    void seekTimeline(int);
-    void showComments(bool);    
-    /** @brief Start an MLT filter job on this clip. */
-    void startFilterJob(QString filterName, QString filterParams, QString finalFilterName, QString consumer, QString consumerParams, QString properties);
-    
-};
 
 /**)
  * @class CollapsibleEffect
@@ -123,7 +45,6 @@ class CollapsibleEffect : public AbstractCollapsibleWidget
 public:
     CollapsibleEffect(QDomElement effect, QDomElement original_effect, ItemInfo info, EffectMetaInfo *metaInfo, bool lastEffect, QWidget * parent = 0);
     ~CollapsibleEffect();
-    static QMap<QString, QImage> iconCache;
     QLabel *title;
        
     void setupWidget(ItemInfo info, EffectMetaInfo *metaInfo);
@@ -145,16 +66,20 @@ public:
     bool isActive() const;
     /** @brief Should the wheel event be sent to parent widget for scrolling. */
     bool filterWheelEvent;
-    /** @brief Return the stylesheet required for effect parameters. */
-    static const QString getStyleSheet();
     /** @brief Parent group was collapsed, update. */
     void groupStateChanged(bool collapsed);
     /** @brief Show / hide up / down buttons. */
     void adjustButtons(int ix, int max);
+    /** @brief Returns true of this effect requires an on monitor adjustable effect scene. */
+    bool needsMonitorEffectScene() const;
+    /** @brief Set clip in / out points. */
+    void setRange(int inPoint , int outPoint);
+    /** @brief Import keyframes from a clip's data. */
+    void setKeyframes(const QString data, int maximum);
 
 public slots:
     void slotSyncEffectsPos(int pos);
-    void slotEnable(bool enable, bool updateMainStatus = true);
+    void slotDisable(bool disable, bool emitInfo = true);
     void slotResetEffect();
 
 private slots:
@@ -169,6 +94,8 @@ private slots:
     void slotUnGroup();
     /** @brief A sub effect parameter was changed */
     void slotUpdateRegionEffectParams(const QDomElement /*old*/, const QDomElement /*e*/, int /*ix*/);
+    /** @brief Dis/enable effect before processing an operation (color picker) */
+    void slotDisableEffect(bool disable);
 
 private:
     ParameterContainer *m_paramWidget;
@@ -177,8 +104,6 @@ private:
     QDomElement m_original_effect;
     QList <QDomElement> m_subEffects;
     bool m_lastEffect;
-    int m_in;
-    int m_out;
     QMenu *m_menu;
     QPoint m_clickPoint;
     EffectInfo m_info;
@@ -199,13 +124,13 @@ protected:
 signals:
     void parameterChanged(const QDomElement, const QDomElement, int);
     void syncEffectsPos(int);
-    void effectStateChanged(bool, int ix = -1, bool updateMainStatus = true);
+    void effectStateChanged(bool, int ix, bool effectNeedsMonitorScene);
     void deleteEffect(const QDomElement);
     void activateEffect(int);
     void checkMonitorPosition(int);
     void seekTimeline(int);
     /** @brief Start an MLT filter job on this clip. */
-    void startFilterJob(QString filterName, QString filterParams, QString finalFilterName, QString consumer, QString consumerParams, QString properties);
+    void startFilterJob(QString filterName, QString filterParams, QString consumer, QString consumerParams, const QMap <QString, QString>extraParams);
     /** @brief An effect was reset, trigger param reload. */
     void resetEffect(int ix);
     /** @brief Ask for creation of a group. */
@@ -213,6 +138,7 @@ signals:
     void unGroup(CollapsibleEffect *);
     void createRegion(int, KUrl);
     void deleteGroup(QDomDocument);
+    void importClipKeyframes();
 };