19 #ifndef FILTERCONTROLLER_H 20 #define FILTERCONTROLLER_H 23 #include <QScopedPointer> 25 #include "models/metadatamodel.h" 26 #include "models/attachedfiltersmodel.h" 27 #include "qmltypes/qmlmetadata.h" 28 #include "qmltypes/qmlfilter.h" 33 class FilterController :
public QObject
38 explicit FilterController(QObject* parent = 0);
39 MetadataModel* metadataModel();
40 AttachedFiltersModel* attachedModel();
42 QmlMetadata* metadataForService(Mlt::Service *service);
45 void timerEvent(QTimerEvent*);
48 void currentFilterAboutToChange();
49 void currentFilterChanged(QmlFilter* filter, QmlMetadata* meta,
int index);
50 void statusChanged(QString);
51 void filterChanged(Mlt::Filter*);
54 void setProducer(Mlt::Producer *producer = 0);
55 void setCurrentFilter(
int attachedIndex,
bool isNew =
false);
58 void handleAttachedModelChange();
59 void handleAttachedModelAboutToReset();
60 void addMetadata(QmlMetadata*);
61 void handleAttachedRowsRemoved(
const QModelIndex & parent,
int first,
int last);
62 void handleAttachedRowsInserted(
const QModelIndex & parent,
int first,
int last);
63 void handleAttachDuplicateFailed(
int index);
64 void onQmlFilterChanged();
67 void loadFilterMetadata();
69 QFuture<void> m_future;
70 QScopedPointer<QmlFilter> m_currentFilter;
71 Mlt::Filter* m_mltFilter;
72 MetadataModel m_metadataModel;
73 AttachedFiltersModel m_attachedModel;
74 int m_currentFilterIndex;
77 #endif // FILTERCONTROLLER_H