X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Feffectstack%2Fcollapsibleeffect.h;h=b6766d7fb0536fae99cb955f16d748d4ddd0a093;hb=c3deed6356f5456096f600d1a6e2d82ebe2e1fff;hp=536adc9308426eef17e731671dce15c97093c0ef;hpb=a3f27380681aefa038ed1a8ff32c1f8fabf3943d;p=kdenlive diff --git a/src/effectstack/collapsibleeffect.h b/src/effectstack/collapsibleeffect.h index 536adc93..b6766d7f 100644 --- a/src/effectstack/collapsibleeffect.h +++ b/src/effectstack/collapsibleeffect.h @@ -21,9 +21,6 @@ #ifndef COLLAPSIBLEEFFECT_H #define COLLAPSIBLEEFFECT_H - -#include "ui_collapsiblewidget_ui.h" - #include "abstractcollapsiblewidget.h" #include "timecode.h" #include "keyframeedit.h" @@ -32,6 +29,8 @@ #include class QFrame; +class QLabel; + class Monitor; class GeometryWidget; @@ -73,6 +72,7 @@ public: ~ParameterContainer(); void updateTimecodeFormat(); void updateProjectFormat(MltVideoProfile profile, Timecode t); + void updateParameter(const QString &key, const QString &value); private slots: void slotCollectAllParameters(); @@ -116,7 +116,7 @@ signals: * @author Jean-Baptiste Mardelle */ -class CollapsibleEffect : public AbstractCollapsibleWidget, public Ui::CollapsibleWidget_UI +class CollapsibleEffect : public AbstractCollapsibleWidget { Q_OBJECT @@ -124,9 +124,12 @@ public: CollapsibleEffect(QDomElement effect, QDomElement original_effect, ItemInfo info, EffectMetaInfo *metaInfo, bool lastEffect, QWidget * parent = 0); ~CollapsibleEffect(); static QMap iconCache; + QLabel *title; + void setupWidget(ItemInfo info, EffectMetaInfo *metaInfo); void updateTimecodeFormat(); void setActive(bool activate); + /** @brief Install event filter so that scrolling with mouse wheel does not change parameter value. */ virtual bool eventFilter( QObject * o, QEvent * e ); /** @brief Update effect GUI to reflect parameted changes. */ void updateWidget(ItemInfo info, QDomElement effect, EffectMetaInfo *metaInfo); @@ -142,13 +145,15 @@ 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(QPalette p); + static const QString getStyleSheet(); + /** @brief Parent group was collapsed, update. */ + void groupStateChanged(bool collapsed); public slots: void slotSyncEffectsPos(int pos); - void slotEnable(bool enable); + void slotEnable(bool enable, bool updateMainStatus = true); + void slotResetEffect(); private slots: void slotSwitch(); @@ -157,9 +162,11 @@ private slots: void slotEffectUp(); void slotEffectDown(); void slotSaveEffect(); - void slotResetEffect(); void slotCreateGroup(); + void slotCreateRegion(); void slotUnGroup(); + /** @brief A sub effect parameter was changed */ + void slotUpdateRegionEffectParams(const QDomElement /*old*/, const QDomElement /*e*/, int /*ix*/); private: ParameterContainer *m_paramWidget; @@ -173,10 +180,14 @@ private: QMenu *m_menu; QPoint m_clickPoint; EffectInfo m_info; + /** @brief True if this is a region effect, which behaves in a special way, like a group. */ + bool m_regionEffect; + /** @brief Check if collapsed state changed and inform MLT. */ + void updateCollapsedState(); protected: virtual void mouseDoubleClickEvent ( QMouseEvent * event ); - virtual void mousePressEvent ( QMouseEvent * event ); + virtual void mouseReleaseEvent( QMouseEvent *event ); virtual void dragEnterEvent(QDragEnterEvent *event); virtual void dragLeaveEvent(QDragLeaveEvent *event); virtual void dropEvent(QDropEvent *event); @@ -184,23 +195,20 @@ protected: signals: void parameterChanged(const QDomElement, const QDomElement, int); void syncEffectsPos(int); - void effectStateChanged(bool, int ix = -1); + void effectStateChanged(bool, int ix = -1, bool updateMainStatus = true); void deleteEffect(const QDomElement); - void changeEffectPosition(int, bool); 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); - /** @brief An effect was saved, trigger effect list reload. */ - void reloadEffects(); /** @brief An effect was reset, trigger param reload. */ void resetEffect(int ix); /** @brief Ask for creation of a group. */ void createGroup(int ix); - void moveEffect(int current_pos, int new_pos, int groupIndex, QString groupName); void unGroup(CollapsibleEffect *); - void addEffect(QDomElement e); + void createRegion(int, KUrl); + void deleteGroup(QDomDocument); };