6#include <PhosphorServicePipeWire/phosphorservicepipewire_export.h>
17#include <QAbstractListModel>
56class PHOSPHORSERVICEPIPEWIRE_EXPORT
PwNodeModel :
public QAbstractListModel
101 [[nodiscard]]
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
102 [[nodiscard]] QVariant
data(const QModelIndex& index,
int role) const override;
103 [[nodiscard]] QHash<
int, QByteArray>
roleNames() const override;
Owns the PipeWire main loop on a dedicated QThread and exposes connection state to the GUI thread via...
Definition PipeWireConnection.h:59
Role
Row 0, or null when the model is empty.
Definition PwNodeModel.h:82
@ IdRole
Definition PwNodeModel.h:84
@ MutedRole
Definition PwNodeModel.h:91
@ MediaClassRole
Definition PwNodeModel.h:88
@ DescriptionRole
Definition PwNodeModel.h:87
@ NodeRole
Definition PwNodeModel.h:83
@ NameRole
Definition PwNodeModel.h:85
@ ChannelCountRole
Definition PwNodeModel.h:89
@ VolumesRole
Definition PwNodeModel.h:90
@ NickRole
Definition PwNodeModel.h:86
PwNodeModel(QObject *parent=nullptr)
void setMediaClasses(const QStringList &classes)
Replace the media-class filter set.
PipeWireConnection * connection() const
PwNode * nodeAt(int row) const
The node at row, or null when row is out of range.
void setConnection(PipeWireConnection *connection)
Attach the model to a PipeWireConnection (or detach by passing nullptr).
QVariant data(const QModelIndex &index, int role) const override
friend class PwSinkModel
Definition PwNodeModel.h:179
QHash< int, QByteArray > roleNames() const override
friend class PwStreamModel
Definition PwNodeModel.h:181
int rowCount(const QModelIndex &parent=QModelIndex()) const override
friend class PwSourceModel
Definition PwNodeModel.h:180
friend class Private
Definition PwNodeModel.h:169
QStringList mediaClasses() const
PwNode * firstNode() const
void mediaClassesChanged()
One PipeWire audio node — a sink, source, output stream, or input stream.
Definition PwNode.h:49
PwSinkModel(QObject *parent=nullptr)
PwSourceModel(QObject *parent=nullptr)
PwStreamModel(QObject *parent=nullptr)
Definition PipeWireConnection.h:20