From cdfb441777b9e1511d598e20aa357fb3a10e2771 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Sun, 20 Dec 2015 17:58:44 +0100 Subject: resources controller and listmodel --- framework/settings/resourcelistmodel.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 framework/settings/resourcelistmodel.h (limited to 'framework/settings/resourcelistmodel.h') diff --git a/framework/settings/resourcelistmodel.h b/framework/settings/resourcelistmodel.h new file mode 100644 index 00000000..de1b5a51 --- /dev/null +++ b/framework/settings/resourcelistmodel.h @@ -0,0 +1,26 @@ +#pragma once + +#include +#include +#include + +class ResourceListModel : public QIdentityProxyModel +{ + Q_OBJECT + +public: + ResourceListModel(QObject *parent = Q_NULLPTR); + ~ResourceListModel(); + + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + + enum Roles { + Id = Qt::UserRole + 1, + Type + }; + + QHash roleNames() const; + +private: + QSharedPointer m_model; +}; -- cgit v1.2.3