Changeset View
Changeset View
Standalone View
Standalone View
src/kcolorschememanager_p.h
Show All 31 Lines | |||||
32 | { | 32 | { | ||
33 | Q_OBJECT | 33 | Q_OBJECT | ||
34 | public: | 34 | public: | ||
35 | explicit KColorSchemeModel(QObject *parent = nullptr); | 35 | explicit KColorSchemeModel(QObject *parent = nullptr); | ||
36 | ~KColorSchemeModel() override; | 36 | ~KColorSchemeModel() override; | ||
37 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; | 37 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; | ||
38 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; | 38 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; | ||
39 | 39 | | |||
40 | QIcon createPreview(const QString &path) const; | | |||
41 | | ||||
42 | private: | 40 | private: | ||
43 | void init(); | 41 | void init(); | ||
44 | mutable QVector<KColorSchemeModelData> m_data; | 42 | mutable QVector<KColorSchemeModelData> m_data; | ||
45 | }; | 43 | }; | ||
46 | 44 | | |||
47 | class KColorSchemeManagerPrivate | 45 | class KColorSchemeManagerPrivate | ||
48 | { | 46 | { | ||
49 | public: | 47 | public: | ||
50 | KColorSchemeManagerPrivate(); | 48 | KColorSchemeManagerPrivate(); | ||
51 | 49 | | |||
52 | QScopedPointer<KColorSchemeModel> model; | 50 | QScopedPointer<KColorSchemeModel> model; | ||
53 | }; | 51 | }; | ||
54 | 52 | | |||
55 | #endif | 53 | #endif |