0
|
1 |
/*
|
|
2 |
* This file was generated by dbusidl2cpp version 0.4
|
|
3 |
* when processing input file org.kde.Phonon.AudioOutput.xml
|
|
4 |
*
|
|
5 |
* dbusidl2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
6 |
*
|
|
7 |
* This is an auto-generated file. This file has been hand-edited.
|
|
8 |
*/
|
|
9 |
|
|
10 |
#include "audiooutputadaptor_p.h"
|
|
11 |
#include "audiooutput.h"
|
|
12 |
#include <QtCore/QArgument>
|
|
13 |
#include <QtCore/QByteRef>
|
|
14 |
#include <QtCore/QList>
|
|
15 |
#include <QtCore/QMap>
|
|
16 |
#include <QtCore/QString>
|
|
17 |
#include <QtCore/QStringList>
|
|
18 |
#include <QtCore/QVariant>
|
|
19 |
#include "phononnamespace_p.h"
|
|
20 |
#include "objectdescription.h"
|
|
21 |
|
|
22 |
#ifndef QT_NO_DBUS
|
|
23 |
|
|
24 |
/*
|
|
25 |
* Implementation of adaptor class AudioOutputAdaptor
|
|
26 |
*/
|
|
27 |
|
|
28 |
QT_BEGIN_NAMESPACE
|
|
29 |
|
|
30 |
namespace Phonon
|
|
31 |
{
|
|
32 |
|
|
33 |
AudioOutputAdaptor::AudioOutputAdaptor(QObject *parent)
|
|
34 |
: QDBusAbstractAdaptor(parent)
|
|
35 |
{
|
|
36 |
// constructor
|
|
37 |
setAutoRelaySignals(true);
|
|
38 |
}
|
|
39 |
|
|
40 |
AudioOutputAdaptor::~AudioOutputAdaptor()
|
|
41 |
{
|
|
42 |
// destructor
|
|
43 |
}
|
|
44 |
|
|
45 |
double AudioOutputAdaptor::volume() const
|
|
46 |
{
|
|
47 |
// get the value of property volume
|
|
48 |
return qvariant_cast<qreal>(parent()->property("volume"));
|
|
49 |
}
|
|
50 |
|
|
51 |
void AudioOutputAdaptor::setVolume(double value)
|
|
52 |
{
|
|
53 |
// set the value of property volume
|
|
54 |
parent()->setProperty("volume", QVariant::fromValue(static_cast<qreal>(value)));
|
|
55 |
}
|
|
56 |
|
|
57 |
bool AudioOutputAdaptor::muted() const
|
|
58 |
{
|
|
59 |
return parent()->property("muted").toBool();
|
|
60 |
}
|
|
61 |
|
|
62 |
void AudioOutputAdaptor::setMuted(bool value)
|
|
63 |
{
|
|
64 |
parent()->setProperty("muted", value);
|
|
65 |
}
|
|
66 |
|
|
67 |
QString AudioOutputAdaptor::category()
|
|
68 |
{
|
|
69 |
// handle method call org.kde.Phonon.AudioOutput.category
|
|
70 |
return Phonon::categoryToString(static_cast<Phonon::AudioOutput *>(parent())->category());
|
|
71 |
}
|
|
72 |
|
|
73 |
QString AudioOutputAdaptor::name()
|
|
74 |
{
|
|
75 |
// handle method call org.kde.Phonon.AudioOutput.name
|
|
76 |
QString name;
|
|
77 |
//QMetaObject::invokeMethod(parent(), "name", Q_RETURN_ARG(QString, name));
|
|
78 |
|
|
79 |
// Alternative:
|
|
80 |
name = static_cast<Phonon::AudioOutput *>(parent())->name();
|
|
81 |
return name;
|
|
82 |
}
|
|
83 |
|
|
84 |
int AudioOutputAdaptor::outputDeviceIndex() const
|
|
85 |
{
|
|
86 |
return static_cast<Phonon::AudioOutput *>(parent())->outputDevice().index();
|
|
87 |
}
|
|
88 |
|
|
89 |
void AudioOutputAdaptor::setOutputDeviceIndex(int newAudioOutputDeviceIndex)
|
|
90 |
{
|
|
91 |
static_cast<Phonon::AudioOutput *>(parent())
|
|
92 |
->setOutputDevice(Phonon::AudioOutputDevice::fromIndex(newAudioOutputDeviceIndex));
|
|
93 |
}
|
|
94 |
|
|
95 |
} // namespace Phonon
|
|
96 |
|
|
97 |
QT_END_NAMESPACE
|
|
98 |
|
|
99 |
#include "moc_audiooutputadaptor_p.cpp"
|
|
100 |
|
|
101 |
#endif
|