PulseAudio Qt Bindings

pulseobject.h
1/*
2 SPDX-FileCopyrightText: 2014-2015 Harald Sitter <sitter@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef PULSEOBJECT_H
8#define PULSEOBJECT_H
9
10#include <QObject>
11
12#include "pulseaudioqt_export.h"
13
14namespace PulseAudioQt
15{
16class Context;
17
18template<typename Type, typename PAInfo>
19class MapBase;
20
21/**
22 * Base class for most PulseAudio objects.
23 */
24class PULSEAUDIOQT_EXPORT PulseObject : public QObject
25{
26 Q_OBJECT
27 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
28 Q_PROPERTY(QString iconName READ iconName CONSTANT)
29 Q_PROPERTY(QVariantMap properties READ properties NOTIFY propertiesChanged)
30
31public:
32 ~PulseObject() override;
33
34 QString name() const;
35
36 /**
37 * A freedesktop.org icon name that fits this object.
38 */
39 QString iconName() const;
40
41 /**
42 * A map of properties associated with this object.
43 * The set of available properties depends on the type of object.
44 */
45 QVariantMap properties() const;
46
47Q_SIGNALS:
48 /**
49 * Emitted when any of the \ref properties changed.
50 */
52
53 void nameChanged();
54
55protected:
56 /** @private */
57 explicit PulseObject(QObject *parent);
58
59 /** @private */
60 std::unique_ptr<class PulseObjectPrivate> d;
61
62private:
63 // Ensure that we get properly parented.
65 friend class IndexedPulseObjectPrivate;
66 friend class ClientPrivate;
67 friend class CardPrivate;
68 friend class ModulePrivate;
69 friend class VolumeObjectPrivate;
70 friend class ProfilePrivate;
71 friend class StreamRestorePrivate;
72 template<typename Type, typename PAInfo>
73 friend class MapBase;
74};
75
76} // PulseAudioQt
77
78#endif // PULSEOBJECT_H
Maps a specific index to a specific object pointer.
Definition pulseobject.h:19
Base class for most PulseAudio objects.
Definition pulseobject.h:25
void propertiesChanged()
Emitted when any of the properties changed.
The primary namespace of PulseAudioQt.
Definition card.cpp:17
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.