Changeset View
Changeset View
Standalone View
Standalone View
resources/imap/subscriptiondialog.h
Show All 17 Lines | 1 | /* | |||
---|---|---|---|---|---|
18 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 18 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
19 | 02110-1301, USA. | 19 | 02110-1301, USA. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef SUBSCRIPTIONDIALOG_H | 22 | #ifndef SUBSCRIPTIONDIALOG_H | ||
23 | #define SUBSCRIPTIONDIALOG_H | 23 | #define SUBSCRIPTIONDIALOG_H | ||
24 | 24 | | |||
25 | #include <QDialog> | 25 | #include <QDialog> | ||
26 | #include <QSortFilterProxyModel> | ||||
26 | 27 | | |||
27 | #include <krecursivefilterproxymodel.h> | | |||
28 | #include <kimap/listjob.h> | 28 | #include <kimap/listjob.h> | ||
29 | 29 | | |||
30 | #include <QMap> | 30 | #include <QMap> | ||
31 | 31 | | |||
32 | class QStandardItemModel; | 32 | class QStandardItemModel; | ||
33 | class QStandardItem; | 33 | class QStandardItem; | ||
34 | 34 | | |||
35 | class QLineEdit; | 35 | class QLineEdit; | ||
36 | class QCheckBox; | 36 | class QCheckBox; | ||
37 | class ImapAccount; | 37 | class ImapAccount; | ||
38 | class QTreeView; | 38 | class QTreeView; | ||
39 | class QPushButton; | 39 | class QPushButton; | ||
40 | 40 | | |||
41 | class SubscriptionFilterProxyModel : public KRecursiveFilterProxyModel | 41 | class SubscriptionFilterProxyModel : public QSortFilterProxyModel | ||
42 | { | 42 | { | ||
43 | Q_OBJECT | 43 | Q_OBJECT | ||
44 | public: | 44 | public: | ||
45 | explicit SubscriptionFilterProxyModel(QObject *parent = nullptr); | 45 | explicit SubscriptionFilterProxyModel(QObject *parent = nullptr); | ||
46 | 46 | | |||
47 | public Q_SLOTS: | 47 | public Q_SLOTS: | ||
48 | void setSearchPattern(const QString &pattern); | 48 | void setSearchPattern(const QString &pattern); | ||
49 | void setIncludeCheckedOnly(bool checkedOnly); | 49 | void setIncludeCheckedOnly(bool checkedOnly); | ||
50 | void setIncludeCheckedOnly(int checkedOnlyState); | 50 | void setIncludeCheckedOnly(int checkedOnlyState); | ||
51 | 51 | | |||
52 | protected: | 52 | protected: | ||
53 | bool acceptRow(int sourceRow, const QModelIndex &sourceParent) const override; | 53 | bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; | ||
54 | 54 | | |||
55 | private: | 55 | private: | ||
56 | QString m_pattern; | 56 | QString m_pattern; | ||
57 | bool m_checkedOnly = false; | 57 | bool m_checkedOnly = false; | ||
58 | }; | 58 | }; | ||
59 | 59 | | |||
60 | class SubscriptionDialog : public QDialog | 60 | class SubscriptionDialog : public QDialog | ||
61 | { | 61 | { | ||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |