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