#ifndef COLLAPSIBLEEFFECT_H
#define COLLAPSIBLEEFFECT_H
-
-#include "ui_collapsiblewidget_ui.h"
-
#include "abstractcollapsiblewidget.h"
#include "timecode.h"
#include "keyframeedit.h"
#include <QToolButton>
class QFrame;
+class QLabel;
+
class Monitor;
class GeometryWidget;
~ParameterContainer();
void updateTimecodeFormat();
void updateProjectFormat(MltVideoProfile profile, Timecode t);
+ void updateParameter(const QString &key, const QString &value);
private slots:
void slotCollectAllParameters();
* @author Jean-Baptiste Mardelle
*/
-class CollapsibleEffect : public AbstractCollapsibleWidget, public Ui::CollapsibleWidget_UI
+class CollapsibleEffect : public AbstractCollapsibleWidget
{
Q_OBJECT
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);
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);
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();
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;
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);
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);
};