ssu
Loading...
Searching...
No Matches
ssufeaturemodel.h
Go to the documentation of this file.
1
7
8#ifndef _SSUFEATUREMODEL_H
9#define _SSUFEATUREMODEL_H
10
11#include <QAbstractListModel>
12
15
16class SsuFeatureModel: public QAbstractListModel
17{
18 Q_OBJECT
19 Q_PROPERTY(int count READ count NOTIFY countChanged)
20public:
21 enum Roles {
22 Name = Qt::UserRole,
23 Version
24 };
25
26 SsuFeatureModel(QObject *parent = 0);
27 SsuFeatureModel(QObject *parent, const QString &path);
28 ~SsuFeatureModel();
29
30 virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
31 virtual QVariant data(const QModelIndex &index, int role) const;
32
33public slots:
34 void reload();
35 int count() const;
36
37protected:
38 QHash<int, QByteArray> roleNames() const;
39 const QHash<QByteArray, QString> &featureAt(int index) const;
40
41signals:
42 void countChanged();
43
44private:
46 friend class FeatureModelTest;
47};
48
49#endif