PulseAudio Qt Bindings

pulseobject.h
1 /*
2  SPDX-FileCopyrightText: 2014-2015 Harald Sitter <[email protected]>
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 
14 namespace PulseAudioQt
15 {
16 class Context;
17 
18 template<typename Type, typename PAInfo>
19 class MapBase;
20 
21 /**
22  * Base class for most PulseAudio objects.
23  */
24 class 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 
31 public:
32  ~PulseObject();
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 
47 Q_SIGNALS:
48  /**
49  * Emitted when any of the \ref properties changed.
50  */
51  void propertiesChanged();
52 
53  void nameChanged();
54 
55 protected:
56  /** @private */
57  explicit PulseObject(QObject *parent);
58 
59  /** @private */
60  class PulseObjectPrivate *const d;
61 
62 private:
63  // Ensure that we get properly parented.
64  PulseObject();
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 };
73 
74 } // PulseAudioQt
75 
76 #endif // PULSEOBJECT_H
Base class for most PulseAudio objects.
Definition: pulseobject.h:24
The primary namespace of PulseAudioQt.
Definition: card.cpp:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:13:16 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.