1 #ifndef DICTSLISTMODEL_H
2 #define DICTSLISTMODEL_H
4 #include <QAbstractListModel>
6 #include "DownloadDict.h"
9 class DictsListModel : public QAbstractListModel
14 NumberRole=Qt::UserRole + 1,
21 explicit DictsListModel(QList<DownloadDict> dicts, QObject *parent = 0);
22 int rowCount(const QModelIndex &) const;
23 QVariant data(const QModelIndex & index, int role) const;
24 QVariant headerData(int section, Qt::Orientation orientation, int role) const;
25 Qt::ItemFlags flags(const QModelIndex &index) const;
26 DownloadDict currentDict();
27 QList<DownloadDict> dictionaries();
30 void itemSelected(int index);
34 QList<DownloadDict> dicts;
38 #endif // DICTSLISTMODEL_H