File indexing completed on 2024-04-28 15:39:41

0001 // SPDX-FileCopyrightText: 2014-2022 Jesper K. Pedersen <blackie@kde.org>
0002 //
0003 // SPDX-License-Identifier: GPL-2.0-or-later
0004 
0005 #ifndef REMOTECONTROL_DISCOVERYMODEL_H
0006 #define REMOTECONTROL_DISCOVERYMODEL_H
0007 
0008 #include "ThumbnailModel.h"
0009 
0010 namespace RemoteControl
0011 {
0012 
0013 class DiscoverAction;
0014 
0015 class DiscoveryModel : public ThumbnailModel
0016 {
0017     Q_OBJECT
0018     Q_PROPERTY(int count READ count WRITE setCount NOTIFY countChanged)
0019 
0020 public:
0021     DiscoveryModel(QObject *parent);
0022     int count() const;
0023     void setImages(const QList<int> &images) override;
0024     void setCurrentSelection(const QList<int> &selection, const QList<int> &allImages);
0025     void setCurrentAction(DiscoverAction *action);
0026 
0027 public Q_SLOTS:
0028     void setCount(int arg);
0029     void resetImages();
0030 
0031 Q_SIGNALS:
0032     void countChanged();
0033 
0034 private:
0035     int m_count = 0;
0036     DiscoverAction *m_action = nullptr;
0037     QList<int> m_allImages;
0038 };
0039 
0040 } // namespace RemoteControl
0041 
0042 Q_DECLARE_METATYPE(RemoteControl::DiscoveryModel *);
0043 
0044 #endif // REMOTECONTROL_DISCOVERYMODEL_H