Changeset View
Changeset View
Standalone View
Standalone View
src/qml/plugin.cpp
Show All 22 Lines | |||||
23 | #include <QtQml> | 23 | #include <QtQml> | ||
24 | 24 | | |||
25 | #include "pulseaudio.h" | 25 | #include "pulseaudio.h" | ||
26 | #include "client.h" | 26 | #include "client.h" | ||
27 | #include "sink.h" | 27 | #include "sink.h" | ||
28 | #include "source.h" | 28 | #include "source.h" | ||
29 | #include "context.h" | 29 | #include "context.h" | ||
30 | #include "modulemanager.h" | 30 | #include "modulemanager.h" | ||
31 | #include "port.h" | ||||
31 | 32 | | |||
32 | #include "globalactioncollection.h" | 33 | #include "globalactioncollection.h" | ||
33 | #include "volumeosd.h" | 34 | #include "volumeosd.h" | ||
34 | #include "volumefeedback.h" | 35 | #include "volumefeedback.h" | ||
35 | 36 | | |||
36 | static QJSValue pulseaudio_singleton(QQmlEngine *engine, QJSEngine *scriptEngine) | 37 | static QJSValue pulseaudio_singleton(QQmlEngine *engine, QJSEngine *scriptEngine) | ||
37 | { | 38 | { | ||
38 | Q_UNUSED(engine) | 39 | Q_UNUSED(engine) | ||
Show All 9 Lines | |||||
48 | { | 49 | { | ||
49 | qmlRegisterType<QPulseAudio::CardModel>(uri, 0, 1, "CardModel"); | 50 | qmlRegisterType<QPulseAudio::CardModel>(uri, 0, 1, "CardModel"); | ||
50 | qmlRegisterType<QPulseAudio::SinkModel>(uri, 0, 1, "SinkModel"); | 51 | qmlRegisterType<QPulseAudio::SinkModel>(uri, 0, 1, "SinkModel"); | ||
51 | qmlRegisterType<QPulseAudio::SinkInputModel>(uri, 0, 1, "SinkInputModel"); | 52 | qmlRegisterType<QPulseAudio::SinkInputModel>(uri, 0, 1, "SinkInputModel"); | ||
52 | qmlRegisterType<QPulseAudio::SourceModel>(uri, 0, 1, "SourceModel"); | 53 | qmlRegisterType<QPulseAudio::SourceModel>(uri, 0, 1, "SourceModel"); | ||
53 | qmlRegisterType<QPulseAudio::ModuleManager>(uri, 0, 1, "ModuleManager"); | 54 | qmlRegisterType<QPulseAudio::ModuleManager>(uri, 0, 1, "ModuleManager"); | ||
54 | qmlRegisterType<QPulseAudio::SourceOutputModel>(uri, 0, 1, "SourceOutputModel"); | 55 | qmlRegisterType<QPulseAudio::SourceOutputModel>(uri, 0, 1, "SourceOutputModel"); | ||
55 | qmlRegisterType<QPulseAudio::StreamRestoreModel>(uri, 0, 1, "StreamRestoreModel"); | 56 | qmlRegisterType<QPulseAudio::StreamRestoreModel>(uri, 0, 1, "StreamRestoreModel"); | ||
57 | qmlRegisterUncreatableType<QPulseAudio::Port>(uri, 0, 1, "Port", QString()); | ||||
56 | qmlRegisterType<GlobalAction>(uri, 0, 1, "GlobalAction"); | 58 | qmlRegisterType<GlobalAction>(uri, 0, 1, "GlobalAction"); | ||
57 | qmlRegisterType<GlobalActionCollection>(uri, 0, 1, "GlobalActionCollection"); | 59 | qmlRegisterType<GlobalActionCollection>(uri, 0, 1, "GlobalActionCollection"); | ||
58 | qmlRegisterType<VolumeOSD>(uri, 0, 1, "VolumeOSD"); | 60 | qmlRegisterType<VolumeOSD>(uri, 0, 1, "VolumeOSD"); | ||
59 | qmlRegisterType<VolumeFeedback>(uri, 0, 1, "VolumeFeedback"); | 61 | qmlRegisterType<VolumeFeedback>(uri, 0, 1, "VolumeFeedback"); | ||
60 | qmlRegisterSingletonType(uri, 0, 1, "PulseAudio", pulseaudio_singleton); | 62 | qmlRegisterSingletonType(uri, 0, 1, "PulseAudio", pulseaudio_singleton); | ||
61 | 63 | | |||
62 | qmlRegisterType<QPulseAudio::Client>(); | 64 | qmlRegisterType<QPulseAudio::Client>(); | ||
63 | qmlRegisterType<QPulseAudio::Sink>(); | 65 | qmlRegisterType<QPulseAudio::Sink>(); | ||
64 | qmlRegisterType<QPulseAudio::Source>(); | 66 | qmlRegisterType<QPulseAudio::Source>(); | ||
65 | } | 67 | } |