Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/plugins/folder/mimetypesmodel.h
Show All 32 Lines | 30 | { | |||
---|---|---|---|---|---|
33 | Q_PROPERTY(QStringList checkedTypes READ checkedTypes WRITE setCheckedTypes NOTIFY checkedTypesChanged) | 33 | Q_PROPERTY(QStringList checkedTypes READ checkedTypes WRITE setCheckedTypes NOTIFY checkedTypesChanged) | ||
34 | 34 | | |||
35 | public: | 35 | public: | ||
36 | MimeTypesModel(QObject *parent = 0); | 36 | MimeTypesModel(QObject *parent = 0); | ||
37 | ~MimeTypesModel(); | 37 | ~MimeTypesModel(); | ||
38 | 38 | | |||
39 | QHash<int, QByteArray> roleNames() const override; | 39 | QHash<int, QByteArray> roleNames() const override; | ||
40 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; | 40 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; | ||
41 | bool setData(const QModelIndex &index, const QVariant &value, int role) Q_DECL_OVERRIDE; | ||||
41 | 42 | | |||
42 | Q_INVOKABLE void checkAll(); | 43 | Q_INVOKABLE void checkAll(); | ||
43 | Q_INVOKABLE void setRowChecked(int row, bool checked); | | |||
44 | 44 | | |||
45 | int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE { Q_UNUSED(parent) return m_mimeTypesList.size(); } | 45 | int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE { Q_UNUSED(parent) return m_mimeTypesList.size(); } | ||
46 | 46 | | |||
47 | QStringList checkedTypes() const; | 47 | QStringList checkedTypes() const; | ||
48 | void setCheckedTypes(const QStringList &list); | 48 | void setCheckedTypes(const QStringList &list); | ||
49 | 49 | | |||
50 | Q_SIGNALS: | 50 | Q_SIGNALS: | ||
51 | void checkedTypesChanged() const; | 51 | void checkedTypesChanged() const; | ||
Show All 11 Lines | 61 | { | |||
63 | 63 | | |||
64 | Q_PROPERTY(QStringList checkedTypes READ checkedTypes WRITE setCheckedTypes NOTIFY checkedTypesChanged) | 64 | Q_PROPERTY(QStringList checkedTypes READ checkedTypes WRITE setCheckedTypes NOTIFY checkedTypesChanged) | ||
65 | Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged) | 65 | Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged) | ||
66 | 66 | | |||
67 | public: | 67 | public: | ||
68 | FilterableMimeTypesModel(QObject *parent = 0); | 68 | FilterableMimeTypesModel(QObject *parent = 0); | ||
69 | ~FilterableMimeTypesModel(); | 69 | ~FilterableMimeTypesModel(); | ||
70 | 70 | | |||
71 | Q_INVOKABLE void setRowChecked(int row, bool checked); | | |||
72 | Q_INVOKABLE void checkAll(); | 71 | Q_INVOKABLE void checkAll(); | ||
73 | 72 | | |||
74 | QStringList checkedTypes() const; | 73 | QStringList checkedTypes() const; | ||
75 | void setCheckedTypes(const QStringList &list); | 74 | void setCheckedTypes(const QStringList &list); | ||
76 | 75 | | |||
77 | QString filter() const; | 76 | QString filter() const; | ||
78 | void setFilter(const QString &filter); | 77 | void setFilter(const QString &filter); | ||
79 | 78 | | |||
Show All 10 Lines |