| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/core/feedsproxymodel.h`/ |
| 2 | |
| 3 | #ifndef FEEDSPROXYMODEL_H |
| 4 | #define FEEDSPROXYMODEL_Hcxx . . $ `src/librssguard/core/feedsproxymodel.h:4:9`! |
| 5 | |
| 6 | #include "services/abstract/rootitem.h"cxx . . $ `<file>/src/librssguard/services/abstract/rootitem.h`/ |
| 7 | |
| 8 | #include <QSortFilterProxyModel> |
| 9 | |
| 10 | class FeedsModelcxx . . $ FeedsModel#; |
| 11 | class FeedsViewcxx . . $ FeedsView#; |
| 12 | |
| 13 | class FeedsProxyModelcxx . . $ FeedsProxyModel# : public QSortFilterProxyModelcxx . . $ QSortFilterProxyModel# { |
| 14 | Q_OBJECTcxx . . $ FeedsProxyModel#qt_staticMetaObjectStaticContent. |
| 15 | |
| 16 | public: |
| 17 | // Enum which describes basic filtering schemes |
| 18 | // for feeds. |
| 19 | enum class FeedListFiltercxx . . $ FeedsProxyModel#FeedListFilter# { |
| 20 | NoFilteringcxx . . $ FeedsProxyModel#FeedListFilter#NoFiltering. = 1, |
| 21 | ShowUnreadcxx . . $ FeedsProxyModel#FeedListFilter#ShowUnread. = 2, |
| 22 | ShowEmptycxx . . $ FeedsProxyModel#FeedListFilter#ShowEmpty. = 4, |
| 23 | ShowNonEmptycxx . . $ FeedsProxyModel#FeedListFilter#ShowNonEmpty. = 8, |
| 24 | ShowWithNewArticlescxx . . $ FeedsProxyModel#FeedListFilter#ShowWithNewArticles. = 16, |
| 25 | ShowWithErrorcxx . . $ FeedsProxyModel#FeedListFilter#ShowWithError. = 32, |
| 26 | ShowSwitchedOffcxx . . $ FeedsProxyModel#FeedListFilter#ShowSwitchedOff. = 64, |
| 27 | ShowQuietcxx . . $ FeedsProxyModel#FeedListFilter#ShowQuiet. = 128, |
| 28 | ShowWithArticleFilterscxx . . $ FeedsProxyModel#FeedListFilter#ShowWithArticleFilters. = 256 |
| 29 | }; |
| 30 | |
| 31 | explicit FeedsProxyModelcxx . . $ FeedsProxyModel#FeedsProxyModel(b3533afc652abc62).(FeedsModelcxx . . $ FeedsModel#* source_model, QObjectcxx . . $ QObject#* parent = nullptr); |
| 32 | virtual ~cxx . . $ FeedsProxyModel#`~FeedsProxyModel`(ced63f7c635d850d).FeedsProxyModelcxx . . $ FeedsProxyModel#(); |
| 33 | |
| 34 | void setFeedListFiltercxx . . $ FeedsProxyModel#setFeedListFilter(613fd7fc3879d90b).(FeedListFiltercxx . . $ FeedsProxyModel#FeedListFilter# filter); |
| 35 | |
| 36 | virtual bool canDropMimeDatacxx . . $ FeedsProxyModel#canDropMimeData(b100e2dbbc763d6).(const QMimeDatacxx . . $ QMimeData#* data, |
| 37 | Qtcxx . . $ Qt/::DropActioncxx . . $ Qt/DropAction# action, |
| 38 | int row, |
| 39 | int column, |
| 40 | const QModelIndexcxx . . $ QModelIndex#& parent) const; |
| 41 | virtual bool dropMimeDatacxx . . $ FeedsProxyModel#dropMimeData(31b49f559b1ac94).(const QMimeDatacxx . . $ QMimeData#* data, |
| 42 | Qtcxx . . $ Qt/::DropActioncxx . . $ Qt/DropAction# action, |
| 43 | int row, |
| 44 | int column, |
| 45 | const QModelIndexcxx . . $ QModelIndex#& parent); |
| 46 | |
| 47 | virtual void sortcxx . . $ FeedsProxyModel#sort(11168df8d4e8286d).(int column, Qtcxx . . $ Qt/::SortOrdercxx . . $ Qt/SortOrder# order = Qtcxx . . $ Qt/::SortOrdercxx . . $ Qt/SortOrder#::AscendingOrdercxx . . $ Qt/AscendingOrder.); |
| 48 | |
| 49 | // Returns index list of items which "match" given value. |
| 50 | // Used for finding items according to entered title text. |
| 51 | virtual QModelIndexListcxx . . $ QModelIndexList# matchcxx . . $ FeedsProxyModel#match(b09c7f237809a9e2).(const QModelIndexcxx . . $ QModelIndex#& start, |
| 52 | int role, |
| 53 | const QVariantcxx . . $ QVariant#& value, |
| 54 | int hits, |
| 55 | Qtcxx . . $ Qt/::MatchFlagscxx . . $ Qt/MatchFlags# flags) const; |
| 56 | |
| 57 | // Maps list of indexes. |
| 58 | QModelIndexListcxx . . $ QModelIndexList# mapListToSourcecxx . . $ FeedsProxyModel#mapListToSource(a18e22b7fb4fea).(const QModelIndexListcxx . . $ QModelIndexList#& indexes) const; |
| 59 | |
| 60 | const RootItemcxx . . $ RootItem#* selectedItemcxx . . $ FeedsProxyModel#selectedItem(73c33a9645a79584).() const; |
| 61 | void setSelectedItemcxx . . $ FeedsProxyModel#setSelectedItem(e83c05a3b3498166).(const RootItemcxx . . $ RootItem#* selected_item); |
| 62 | |
| 63 | void setViewcxx . . $ FeedsProxyModel#setView(7c40662b447f73ea).(FeedsViewcxx . . $ FeedsView#* newView); |
| 64 | |
| 65 | bool sortAlphabeticallycxx . . $ FeedsProxyModel#sortAlphabetically(50ce9a9e25b4a850).() const; |
| 66 | void setSortAlphabeticallycxx . . $ FeedsProxyModel#setSortAlphabetically(b45ddcbc8423892c).(bool sort_alphabetically); |
| 67 | |
| 68 | signalscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:43:14`!: |
| 69 | void indexNotFilteredOutAnymorecxx . . $ FeedsProxyModel#indexNotFilteredOutAnymore(1ffafa588cd53a0f).(QModelIndexcxx . . $ QModelIndex# source_idx) const; |
| 70 | |
| 71 | // There was some drag/drop operation, notify view about this. |
| 72 | void requireItemValidationAfterDragDropcxx . . $ FeedsProxyModel#requireItemValidationAfterDragDrop(87a6de385263c395).(const QModelIndexcxx . . $ QModelIndex#& source_index); |
| 73 | |
| 74 | protected: |
| 75 | virtual bool lessThancxx . . $ FeedsProxyModel#lessThan(38842d0605fc2db).(const QModelIndexcxx . . $ QModelIndex#& left, const QModelIndexcxx . . $ QModelIndex#& right) const; |
| 76 | virtual bool filterAcceptsRowcxx . . $ FeedsProxyModel#filterAcceptsRow(5556b7879475181c).(int source_row, const QModelIndexcxx . . $ QModelIndex#& source_parent) const; |
| 77 | |
| 78 | private: |
| 79 | void initializeFilterscxx . . $ FeedsProxyModel#initializeFilters(49f6e7a06ebc5aa8).(); |
| 80 | |
| 81 | bool filterAcceptsRowInternalcxx . . $ FeedsProxyModel#filterAcceptsRowInternal(5556b7879475181c).(int source_row, const QModelIndexcxx . . $ QModelIndex#& source_parent) const; |
| 82 | |
| 83 | // Source model pointer. |
| 84 | FeedsModelcxx . . $ FeedsModel#* m_sourceModelcxx . . $ FeedsProxyModel#m_sourceModel.; |
| 85 | FeedsViewcxx . . $ FeedsView#* m_viewcxx . . $ FeedsProxyModel#m_view.; |
| 86 | const RootItemcxx . . $ RootItem#* m_selectedItemcxx . . $ FeedsProxyModel#m_selectedItem.; |
| 87 | bool m_sortAlphabeticallycxx . . $ FeedsProxyModel#m_sortAlphabetically.; |
| 88 | bool m_showNodeUnreadcxx . . $ FeedsProxyModel#m_showNodeUnread.; |
| 89 | bool m_showNodeProbescxx . . $ FeedsProxyModel#m_showNodeProbes.; |
| 90 | bool m_showNodeLabelscxx . . $ FeedsProxyModel#m_showNodeLabels.; |
| 91 | bool m_showNodeImportantcxx . . $ FeedsProxyModel#m_showNodeImportant.; |
| 92 | QListcxx . . $ QList#<RootItemcxx . . $ RootItem#::Kindcxx . . $ RootItem#Kind#> m_prioritiescxx . . $ FeedsProxyModel#m_priorities.; |
| 93 | QListcxx . . $ QList#<QPaircxx . . $ QPair#<int, QModelIndexcxx . . $ QModelIndex#>> m_hiddenIndicescxx . . $ FeedsProxyModel#m_hiddenIndices.; |
| 94 | |
| 95 | FeedListFiltercxx . . $ FeedsProxyModel#FeedListFilter# m_filtercxx . . $ FeedsProxyModel#m_filter.; |
| 96 | |
| 97 | // NOTE: The parameter type can be Category, Feed or Label only. |
| 98 | QMapcxx . . $ QMap#<FeedListFiltercxx . . $ FeedsProxyModel#FeedListFilter#, stdcxx . . $ std/::functioncxx . . $ std/function#<bool(const RootItemcxx . . $ RootItem#*)>> m_filterscxx . . $ FeedsProxyModel#m_filters.; |
| 99 | QListcxx . . $ QList#<FeedListFiltercxx . . $ FeedsProxyModel#FeedListFilter#> m_filterKeyscxx . . $ FeedsProxyModel#m_filterKeys.; |
| 100 | }; |
| 101 | |
| 102 | Q_DECLARE_METATYPEcxx . . $ qRegisterNormalizedMetaType(fe8ebadb8d6f88df).(FeedsProxyModel::FeedListFilter) |
| 103 | |
| 104 | #endif // FEEDSPROXYMODEL_H |