Changeset View
Changeset View
Standalone View
Standalone View
src/selectioncontroller.h
Show All 21 Lines | 1 | /* | |||
---|---|---|---|---|---|
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. | ||
23 | */ | 23 | */ | ||
24 | #ifndef AKREGATOR_SELECTIONCONTROLLER_H | 24 | #ifndef AKREGATOR_SELECTIONCONTROLLER_H | ||
25 | #define AKREGATOR_SELECTIONCONTROLLER_H | 25 | #define AKREGATOR_SELECTIONCONTROLLER_H | ||
26 | 26 | | |||
27 | #include "abstractselectioncontroller.h" | 27 | #include "abstractselectioncontroller.h" | ||
28 | 28 | | |||
29 | #include <QPointer> | 29 | #include <QPointer> | ||
30 | #include <QAbstractItemModel> | ||||
30 | 31 | | |||
31 | class QModelIndex; | 32 | class QModelIndex; | ||
32 | class QPoint; | 33 | class QPoint; | ||
33 | 34 | | |||
34 | class KJob; | 35 | class KJob; | ||
35 | 36 | | |||
36 | namespace Akregator { | 37 | namespace Akregator { | ||
37 | class ArticleListJob; | 38 | class ArticleListJob; | ||
39 | class FilterUnreadProxyModel; | ||||
38 | 40 | | |||
39 | class SelectionController : public AbstractSelectionController | 41 | class SelectionController : public AbstractSelectionController | ||
40 | { | 42 | { | ||
41 | Q_OBJECT | 43 | Q_OBJECT | ||
42 | 44 | | |||
43 | public: | 45 | public: | ||
44 | 46 | | |||
45 | explicit SelectionController(QObject *parent = nullptr); | 47 | explicit SelectionController(QObject *parent = nullptr); | ||
Show All 24 Lines | |||||
70 | void setFeedList(const QSharedPointer<FeedList> &list) override; | 72 | void setFeedList(const QSharedPointer<FeedList> &list) override; | ||
71 | 73 | | |||
72 | //impl | 74 | //impl | ||
73 | void setFolderExpansionHandler(Akregator::FolderExpansionHandler *handler) override; | 75 | void setFolderExpansionHandler(Akregator::FolderExpansionHandler *handler) override; | ||
74 | 76 | | |||
75 | public Q_SLOTS: | 77 | public Q_SLOTS: | ||
76 | 78 | | |||
77 | //impl | 79 | //impl | ||
80 | void settingsChanged() override; | ||||
81 | | ||||
82 | //impl | ||||
78 | void setFilters(const std::vector<QSharedPointer<const Akregator::Filters::AbstractMatcher> > &) override; | 83 | void setFilters(const std::vector<QSharedPointer<const Akregator::Filters::AbstractMatcher> > &) override; | ||
79 | 84 | | |||
80 | //impl | 85 | //impl | ||
81 | void forceFilterUpdate() override; | 86 | void forceFilterUpdate() override; | ||
82 | 87 | | |||
83 | private Q_SLOTS: | 88 | private Q_SLOTS: | ||
84 | 89 | | |||
85 | void selectedSubscriptionChanged(const QModelIndex &index); | 90 | void selectedSubscriptionChanged(const QModelIndex &index); | ||
86 | void articleSelectionChanged(); | 91 | void articleSelectionChanged(); | ||
87 | void articleIndexDoubleClicked(const QModelIndex &index); | 92 | void articleIndexDoubleClicked(const QModelIndex &index); | ||
88 | void subscriptionContextMenuRequested(const QPoint &point); | 93 | void subscriptionContextMenuRequested(const QPoint &point); | ||
89 | void articleHeadersAvailable(KJob *); | 94 | void articleHeadersAvailable(KJob *); | ||
90 | 95 | | |||
91 | private: | 96 | private: | ||
92 | 97 | | |||
93 | QSharedPointer<FeedList> m_feedList; | 98 | QSharedPointer<FeedList> m_feedList; | ||
94 | QPointer<QAbstractItemView> m_feedSelector; | 99 | QPointer<QAbstractItemView> m_feedSelector; | ||
95 | Akregator::ArticleLister *m_articleLister = nullptr; | 100 | Akregator::ArticleLister *m_articleLister = nullptr; | ||
96 | Akregator::SingleArticleDisplay *m_singleDisplay = nullptr; | 101 | Akregator::SingleArticleDisplay *m_singleDisplay = nullptr; | ||
97 | Akregator::SubscriptionListModel *m_subscriptionModel = nullptr; | 102 | Akregator::FilterUnreadProxyModel *m_subscriptionModel = nullptr; | ||
103 | QAbstractItemModel *m_currentModel = nullptr; | ||||
98 | Akregator::FolderExpansionHandler *m_folderExpansionHandler = nullptr; | 104 | Akregator::FolderExpansionHandler *m_folderExpansionHandler = nullptr; | ||
99 | Akregator::ArticleModel *m_articleModel = nullptr; | 105 | Akregator::ArticleModel *m_articleModel = nullptr; | ||
100 | QPointer<TreeNode> m_selectedSubscription; | 106 | QPointer<TreeNode> m_selectedSubscription; | ||
101 | QPointer<ArticleListJob> m_listJob; | 107 | QPointer<ArticleListJob> m_listJob; | ||
108 | | ||||
109 | void setCurrentSubscriptionModel(); | ||||
mlaurent: move just after private: please | |||||
102 | }; | 110 | }; | ||
103 | } // namespace Akregator | 111 | } // namespace Akregator | ||
104 | 112 | | |||
105 | #endif // AKREGATOR_SELECTIONCONTROLLER_H | 113 | #endif // AKREGATOR_SELECTIONCONTROLLER_H |
move just after private: please