Changeset View
Changeset View
Standalone View
Standalone View
src/core/krecursivefilterproxymodel.h
Show All 14 Lines | 1 | /* | |||
---|---|---|---|---|---|
15 | along with this library; see the file COPYING.LIB. If not, write to the | 15 | along with this library; see the file COPYING.LIB. If not, write to the | ||
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
17 | 02110-1301, USA. | 17 | 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef KRECURSIVEFILTERPROXYMODEL_H | 20 | #ifndef KRECURSIVEFILTERPROXYMODEL_H | ||
21 | #define KRECURSIVEFILTERPROXYMODEL_H | 21 | #define KRECURSIVEFILTERPROXYMODEL_H | ||
22 | 22 | | |||
23 | #include <QSortFilterProxyModel> | | |||
24 | | ||||
25 | #include "kitemmodels_export.h" | 23 | #include "kitemmodels_export.h" | ||
kossebau: Being a duplicate now, this include can be removed. | |||||
26 | 24 | | |||
25 | #if KITEMMODELS_ENABLE_DEPRECATED_SINCE(5, 65) | ||||
26 | #include <QSortFilterProxyModel> | ||||
27 | | ||||
27 | class KRecursiveFilterProxyModelPrivate; | 28 | class KRecursiveFilterProxyModelPrivate; | ||
28 | 29 | | |||
29 | /** | 30 | /** | ||
30 | @class KRecursiveFilterProxyModel krecursivefilterproxymodel.h KRecursiveFilterProxyModel | 31 | @class KRecursiveFilterProxyModel krecursivefilterproxymodel.h KRecursiveFilterProxyModel | ||
31 | 32 | | |||
32 | @brief Implements recursive filtering of models | 33 | @brief Implements recursive filtering of models | ||
33 | 34 | | |||
34 | Until Qt 5.10, QSortFilterProxyModel did not recurse when invoking a filtering stage, so that | 35 | Until Qt 5.10, QSortFilterProxyModel did not recurse when invoking a filtering stage, so that | ||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | |||||
82 | 83 | | |||
83 | Note that using this proxy model is additional overhead compared to QSortFilterProxyModel as every index in the | 84 | Note that using this proxy model is additional overhead compared to QSortFilterProxyModel as every index in the | ||
84 | model must be visited and queried. | 85 | model must be visited and queried. | ||
85 | 86 | | |||
86 | @author Stephen Kelly <steveire@gmail.com> | 87 | @author Stephen Kelly <steveire@gmail.com> | ||
87 | 88 | | |||
88 | @since 4.5 | 89 | @since 4.5 | ||
89 | 90 | | |||
91 | @deprecated since 5.65, use QSortFilterProxyModel::setRecursiveFilteringEnabled(true) instead. See detailed description. | ||||
kossebau: Perhaps refer to above related comments as well. | |||||
90 | */ | 92 | */ | ||
91 | class KITEMMODELS_EXPORT KRecursiveFilterProxyModel : public QSortFilterProxyModel | 93 | class KITEMMODELS_EXPORT KRecursiveFilterProxyModel : public QSortFilterProxyModel | ||
92 | { | 94 | { | ||
93 | Q_OBJECT | 95 | Q_OBJECT | ||
94 | public: | 96 | public: | ||
95 | /** | 97 | /** | ||
96 | Constructor | 98 | Constructor | ||
97 | */ | 99 | */ | ||
100 | KITEMMODELS_DEPRECATED_VERSION(5, 65, "Use QSortFilterProxyModel directly and QSortFilterProxyModel::setRecursiveFilteringEnabled(true)") | ||||
More helpful would be perhaps "Use QSortFilterProxyModel directly and QSortFilterProxyModel::setRecursiveFilteringEnabled(true)" kossebau: More helpful would be perhaps "Use QSortFilterProxyModel directly and QSortFilterProxyModel… | |||||
98 | explicit KRecursiveFilterProxyModel(QObject *parent = nullptr); | 101 | explicit KRecursiveFilterProxyModel(QObject *parent = nullptr); | ||
99 | 102 | | |||
100 | /** | 103 | /** | ||
101 | Destructor | 104 | Destructor | ||
102 | */ | 105 | */ | ||
103 | ~KRecursiveFilterProxyModel() override; | 106 | ~KRecursiveFilterProxyModel() override; | ||
104 | 107 | | |||
105 | /** @reimp */ | 108 | /** @reimp */ | ||
Show All 25 Lines | 128 | private: | |||
131 | Q_PRIVATE_SLOT(d_func(), void sourceRowsInserted(const QModelIndex &source_parent, int start, int end)) | 134 | Q_PRIVATE_SLOT(d_func(), void sourceRowsInserted(const QModelIndex &source_parent, int start, int end)) | ||
132 | Q_PRIVATE_SLOT(d_func(), void sourceRowsAboutToBeRemoved(const QModelIndex &source_parent, int start, int end)) | 135 | Q_PRIVATE_SLOT(d_func(), void sourceRowsAboutToBeRemoved(const QModelIndex &source_parent, int start, int end)) | ||
133 | Q_PRIVATE_SLOT(d_func(), void sourceRowsRemoved(const QModelIndex &source_parent, int start, int end)) | 136 | Q_PRIVATE_SLOT(d_func(), void sourceRowsRemoved(const QModelIndex &source_parent, int start, int end)) | ||
134 | //@endcond | 137 | //@endcond | ||
135 | }; | 138 | }; | ||
136 | 139 | | |||
137 | #endif | 140 | #endif | ||
138 | 141 | | |||
142 | #endif |
Being a duplicate now, this include can be removed.