Changeset View
Changeset View
Standalone View
Standalone View
src/modulemanager.h
- This file was copied to src/module.h.
Show All 27 Lines | |||||
28 | #include "context.h" | 28 | #include "context.h" | ||
29 | // Properties need fully qualified classes even with pointers. | 29 | // Properties need fully qualified classes even with pointers. | ||
30 | #include "client.h" | 30 | #include "client.h" | ||
31 | 31 | | |||
32 | class GConfItem; | 32 | class GConfItem; | ||
33 | 33 | | |||
34 | namespace QPulseAudio | 34 | namespace QPulseAudio | ||
35 | { | 35 | { | ||
36 | class Module; | 36 | class GConfModule; | ||
37 | 37 | | |||
38 | class Q_DECL_EXPORT ModuleManager : public QObject | 38 | class Q_DECL_EXPORT ModuleManager : public QObject | ||
39 | { | 39 | { | ||
40 | Q_OBJECT | 40 | Q_OBJECT | ||
41 | Q_PROPERTY(bool combineSinks READ combineSinks WRITE setCombineSinks NOTIFY combineSinksChanged) | 41 | Q_PROPERTY(bool combineSinks READ combineSinks WRITE setCombineSinks NOTIFY combineSinksChanged) | ||
42 | Q_PROPERTY(bool switchOnConnect READ switchOnConnect WRITE setSwitchOnConnect NOTIFY switchOnConnectChanged) | 42 | Q_PROPERTY(bool switchOnConnect READ switchOnConnect WRITE setSwitchOnConnect NOTIFY switchOnConnectChanged) | ||
43 | Q_PROPERTY(QStringList loadedModules READ loadedModules NOTIFY loadedModulesChanged) | ||||
43 | public: | 44 | public: | ||
44 | ModuleManager(QObject *parent = nullptr); | 45 | ModuleManager(QObject *parent = nullptr); | ||
45 | ~ModuleManager(); | 46 | ~ModuleManager(); | ||
46 | bool combineSinks() const; | 47 | bool combineSinks() const; | ||
47 | void setCombineSinks(bool combineSinks); | 48 | void setCombineSinks(bool combineSinks); | ||
48 | bool switchOnConnect() const; | 49 | bool switchOnConnect() const; | ||
49 | void setSwitchOnConnect(bool switchOnConnect); | 50 | void setSwitchOnConnect(bool switchOnConnect); | ||
51 | QStringList loadedModules() const; | ||||
50 | 52 | | |||
51 | Q_SIGNALS: | 53 | Q_SIGNALS: | ||
52 | void combineSinksChanged(); | 54 | void combineSinksChanged(); | ||
53 | void switchOnConnectChanged(); | 55 | void switchOnConnectChanged(); | ||
56 | void loadedModulesChanged(); | ||||
54 | 57 | | |||
55 | private: | 58 | private: | ||
56 | Module *m_combineSinks; | 59 | void updateLoadedModules(); | ||
57 | Module *m_switchOnConnect; | 60 | | ||
58 | Module *m_deviceManager; | 61 | GConfModule *m_combineSinks; | ||
62 | GConfModule *m_switchOnConnect; | ||||
63 | GConfModule *m_deviceManager; | ||||
64 | QStringList m_loadedModules; | ||||
59 | }; | 65 | }; | ||
60 | 66 | | |||
61 | } // QPulseAudio | 67 | } // QPulseAudio | ||
62 | 68 | | |||
63 | #endif // STREAM_H | 69 | #endif // STREAM_H |