7#include "pulseobject.h"
8#include "pulseobject_p.h"
13#include <QMetaProperty>
15using namespace Qt::StringLiterals;
19PulseObject::PulseObject(
QObject *parent)
21 , d(new PulseObjectPrivate(this))
25PulseObject::~PulseObject()
29PulseObjectPrivate::PulseObjectPrivate(PulseObject *q)
34PulseObjectPrivate::~PulseObjectPrivate()
38QString PulseObject::name()
const
45 QString name = d->m_properties.value(QStringLiteral(
"device.icon_name")).toString();
50 name = d->m_properties.value(QStringLiteral(
"media.icon_name")).toString();
55 name = d->m_properties.value(QStringLiteral(
"window.icon_name")).toString();
60 name = d->m_properties.value(QStringLiteral(
"application.icon_name")).toString();
65 name = d->m_properties.value(QStringLiteral(
"application.process.binary")).toString();
70 name = d->m_properties.value(QStringLiteral(
"application.name")).toString();
75 name = d->m_properties.value(QStringLiteral(
"pipewire.access.portal.app_id")).toString();
80 name = property(
"name").toString();
88QVariantMap PulseObject::properties()
const
90 return d->m_properties;
95QDebug operator<<(
QDebug dbg, PulseAudioQt::PulseObjectPrivate
const *d)
99 auto mo = d->q->metaObject();
102 auto superClass = mo;
103 while ((superClass = superClass->superClass())) {
107 dbg.
nospace().
noquote() <<
'\n' << mo->className() <<
'{' << superClasses.
join(u
", "_s) <<
'}';
112 for (
int i = 0; i < mo->propertyCount(); i++) {
113 auto property = mo->property(i);
114 auto propertyValue =
property.read(d->q);
115 if (propertyValue.canConvert<QVariantMap>()) {
116 dbg.
nospace() << indent <<
property.name() <<
":\n";
117 const auto properties = propertyValue.value<QVariantMap>();
119 auto &key = it.key();
120 auto &value = it.value();
121 dbg.
nospace() << indent << indent << key <<
": " << value <<
'\n';
124 dbg.
nospace() << indent <<
property.name() <<
": " << propertyValue <<
'\n';
The primary namespace of PulseAudioQt.
bool hasThemeIcon(const QString &name)
void append(QList< T > &&value)
QString fromLatin1(QByteArrayView str)
bool isEmpty() const const
QString join(QChar separator) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:50:05 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.