Changeset View
Changeset View
Standalone View
Standalone View
src/allimagesmodel.h
Show All 26 Lines | 26 | { | |||
---|---|---|---|---|---|
27 | Q_OBJECT | 27 | Q_OBJECT | ||
28 | public: | 28 | public: | ||
29 | explicit AllImagesModel(QObject* parent = 0); | 29 | explicit AllImagesModel(QObject* parent = 0); | ||
30 | 30 | | |||
31 | enum Roles { | 31 | enum Roles { | ||
32 | FilePathRole = Qt::UserRole + 1 | 32 | FilePathRole = Qt::UserRole + 1 | ||
33 | }; | 33 | }; | ||
34 | 34 | | |||
35 | virtual QHash<int, QByteArray> roleNames() const; | 35 | QHash<int, QByteArray> roleNames() const override; | ||
36 | virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; | 36 | QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; | ||
37 | virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; | 37 | int rowCount(const QModelIndex& parent = QModelIndex()) const override; | ||
38 | 38 | | |||
39 | private Q_SLOTS: | 39 | private Q_SLOTS: | ||
40 | void slotPopulate(); | 40 | void slotPopulate(); | ||
41 | 41 | | |||
42 | private: | 42 | private: | ||
43 | QStringList m_images; | 43 | QStringList m_images; | ||
44 | }; | 44 | }; | ||
45 | 45 | | |||
46 | #endif | 46 | #endif |