18#ifndef RESOURCEMODEL_H
19#define RESOURCEMODEL_H
21#include <MltProducer.h>
22#include <QAbstractItemModel>
24class ResourceModel :
public QAbstractItemModel
33 COLUMN_VID_DESCRIPTION,
34 COLUMN_AUD_DESCRIPTION,
38 explicit ResourceModel(QObject *parent = 0);
39 virtual ~ResourceModel();
40 void search(Mlt::Producer *producer);
41 void add(Mlt::Producer *producer,
const QString &location = QString());
42 QList<Mlt::Producer> getProducers(
const QModelIndexList &indices);
43 bool exists(
const QString &hash);
45 Mlt::Producer producer(
int index);
47 int rowCount(
const QModelIndex &parent)
const;
48 int columnCount(
const QModelIndex &parent)
const;
49 QVariant data(
const QModelIndex &index,
int role)
const;
50 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const;
51 QModelIndex index(
int row,
int column = 0,
const QModelIndex &parent = QModelIndex())
const;
52 QModelIndex parent(
const QModelIndex &index)
const;
55 QList<Mlt::Producer> m_producers;
56 QMap<QString, QString> m_locations;