Changeset View
Changeset View
Standalone View
Standalone View
kcms/cursortheme/xcursor/thememodel.h
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | |||||
57 | */ | 57 | */ | ||
58 | class CursorThemeModel : public QAbstractTableModel | 58 | class CursorThemeModel : public QAbstractTableModel | ||
59 | { | 59 | { | ||
60 | Q_OBJECT | 60 | Q_OBJECT | ||
61 | 61 | | |||
62 | public: | 62 | public: | ||
63 | CursorThemeModel(QObject *parent = 0); | 63 | CursorThemeModel(QObject *parent = 0); | ||
64 | ~CursorThemeModel(); | 64 | ~CursorThemeModel(); | ||
65 | inline int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; | 65 | QHash<int, QByteArray> roleNames() const; | ||
66 | inline int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; | 66 | inline int columnCount(const QModelIndex &parent = QModelIndex()) const; | ||
67 | QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE; | 67 | inline int rowCount(const QModelIndex &parent = QModelIndex()) const; | ||
68 | QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE; | 68 | QVariant headerData(int section, Qt::Orientation orientation, int role) const; | ||
69 | void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) Q_DECL_OVERRIDE; | 69 | QVariant data(const QModelIndex &index, int role) const; | ||
70 | void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); | ||||
70 | 71 | | |||
71 | /// Returns the CursorTheme at @p index. | 72 | /// Returns the CursorTheme at @p index. | ||
72 | const CursorTheme *theme(const QModelIndex &index); | 73 | const CursorTheme *theme(const QModelIndex &index); | ||
73 | 74 | | |||
74 | /// Returns the index for the CursorTheme with the internal name @p name, | 75 | /// Returns the index for the CursorTheme with the internal name @p name, | ||
75 | /// or an invalid index if no matching theme can be found. | 76 | /// or an invalid index if no matching theme can be found. | ||
76 | QModelIndex findIndex(const QString &name); | 77 | QModelIndex findIndex(const QString &name); | ||
77 | 78 | | |||
Show All 37 Lines |