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" 32 class FilterController :
public QObject
37 explicit FilterController(QObject* parent = 0);
38 MetadataModel* metadataModel();
39 AttachedFiltersModel* attachedModel();
41 QmlMetadata* metadataForService(Mlt::Service *service);
44 void timerEvent(QTimerEvent*);
47 void currentFilterAboutToChange();
48 void currentFilterChanged(QmlFilter* filter, QmlMetadata* meta,
int index);
49 void statusChanged(QString);
52 void setProducer(Mlt::Producer *producer = 0);
53 void setCurrentFilter(
int attachedIndex);
56 void handleAttachedModelChange();
57 void handleAttachedModelAboutToReset();
58 void addMetadata(QmlMetadata*);
59 void handleAttachedRowsRemoved(
const QModelIndex & parent,
int first,
int last);
60 void handleAttachedRowsInserted(
const QModelIndex & parent,
int first,
int last);
61 void handleAttachDuplicateFailed(
int index);
64 void loadFilterMetadata();
66 QFuture<void> m_future;
67 QScopedPointer<QmlFilter> m_currentFilter;
68 MetadataModel m_metadataModel;
69 AttachedFiltersModel m_attachedModel;
70 int m_currentFilterIndex;
73 #endif // FILTERCONTROLLER_H