Warning, file /utilities/telly-skout/src/channelsproxymodel.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // SPDX-FileCopyrightText: 2022 Plata Hill <plata.hill@kdemail.net> 0002 // SPDX-License-Identifier: LGPL-2.1-or-later 0003 0004 #pragma once 0005 0006 #include <QSortFilterProxyModel> 0007 0008 #include "types.h" 0009 0010 class ChannelsProxyModel : public QSortFilterProxyModel 0011 { 0012 Q_OBJECT 0013 0014 Q_PROPERTY(bool onlyFavorites READ onlyFavorites WRITE setOnlyFavorites NOTIFY onlyFavoritesChanged) 0015 Q_PROPERTY(QString group READ group WRITE setGroup NOTIFY groupChanged) 0016 0017 public: 0018 explicit ChannelsProxyModel(QObject *parent = nullptr); 0019 ~ChannelsProxyModel() override; 0020 0021 bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override; 0022 0023 bool onlyFavorites() const; 0024 void setOnlyFavorites(const bool &onlyFavorites); 0025 0026 const QString &group() const; 0027 void setGroup(const QString &group); 0028 0029 Q_SIGNALS: 0030 void onlyFavoritesChanged(); 0031 void groupChanged(); 0032 0033 private: 0034 bool m_onlyFavorites; 0035 GroupId m_group; 0036 };