11#include <QAbstractListModel>
13#include "pulseaudioqt_export.h"
21class AbstractModelPrivate;
22class SinkModelPrivate;
24class PULSEAUDIOQT_EXPORT AbstractModel :
public QAbstractListModel
32 Q_PROPERTY(
int count READ rowCount NOTIFY countChanged)
36 AbstractModel() =
delete;
37 ~AbstractModel()
override;
38 QHash<int, QByteArray> roleNames() const final override;
39 int rowCount(const QModelIndex &parent = QModelIndex()) const final override;
40 QVariant data(const QModelIndex &index,
int role = Qt::DisplayRole) const override;
41 bool setData(const QModelIndex &index, const QVariant &value,
int role) final override;
43 Q_INVOKABLE
int role(const QByteArray &roleName) const;
49 AbstractModel(const MapBaseQObject *map, QObject *parent);
50 void initRoleNames(const QMetaObject &qobjectMetaObject);
51 Context *context() const;
54 void propertyChanged();
57 void onDataAdded(
int index);
58 void onDataRemoved(
int index);
59 QMetaMethod propertyChangedMetaMethod() const;
61 std::unique_ptr<class AbstractModelPrivate> d;
64class PULSEAUDIOQT_EXPORT CardModel : public AbstractModel
68 CardModel(QObject *parent =
nullptr);
74class PULSEAUDIOQT_EXPORT SinkModel :
public AbstractModel
79 SortByDefaultRole = PulseObjectRole + 1
83 SinkModel(QObject *parent =
nullptr);
84 QVariant data(
const QModelIndex &index,
int role =
Qt::DisplayRole)
const override;
90class PULSEAUDIOQT_EXPORT SinkInputModel :
public AbstractModel
94 SinkInputModel(QObject *parent =
nullptr);
100class PULSEAUDIOQT_EXPORT SourceModel :
public AbstractModel
105 SortByDefaultRole = PulseObjectRole + 1
109 SourceModel(QObject *parent =
nullptr);
110 QVariant data(
const QModelIndex &index,
int role =
Qt::DisplayRole)
const override;
116class PULSEAUDIOQT_EXPORT SourceOutputModel :
public AbstractModel
120 SourceOutputModel(QObject *parent =
nullptr);
126class PULSEAUDIOQT_EXPORT StreamRestoreModel :
public AbstractModel
130 StreamRestoreModel(QObject *parent =
nullptr);
136class PULSEAUDIOQT_EXPORT ModuleModel :
public AbstractModel
140 ModuleModel(QObject *parent =
nullptr);
The primary namespace of PulseAudioQt.