PulseAudio Qt Bindings

module.cpp
1 /*
2  SPDX-FileCopyrightText: 2017 David Rosca <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
7 #include "module.h"
8 #include "debug.h"
9 #include "module_p.h"
10 
11 #include "context.h"
12 #include "indexedpulseobject_p.h"
13 
14 namespace PulseAudioQt
15 {
16 Module::Module(QObject *parent)
17  : IndexedPulseObject(parent)
18  , d(new ModulePrivate(this))
19 {
20 }
21 
22 ModulePrivate::ModulePrivate(Module *q)
23  : q(q)
24 {
25 }
26 
27 ModulePrivate::~ModulePrivate()
28 {
29 }
30 
31 void ModulePrivate::update(const pa_module_info *info)
32 {
33  q->IndexedPulseObject::d->updatePulseObject(info);
34  q->PulseObject::d->updateProperties(info);
35 
36  const QString infoArgument = QString::fromUtf8(info->argument);
37  if (m_argument != infoArgument) {
38  m_argument = infoArgument;
39  Q_EMIT q->argumentChanged();
40  }
41 }
42 
43 Module::~Module()
44 {
45  delete d;
46 }
47 
48 QString Module::argument() const
49 {
50  return d->m_argument;
51 }
52 
53 } // PulseAudioQt
QString fromUtf8(const char *str, int size)
The primary namespace of PulseAudioQt.
Definition: card.cpp:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jun 25 2022 06:12:40 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.