Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/systemtray.h
Show All 23 Lines | |||||
24 | #include <QAbstractItemModel> | 24 | #include <QAbstractItemModel> | ||
25 | #include <QRegExp> | 25 | #include <QRegExp> | ||
26 | 26 | | |||
27 | #include <Plasma/Containment> | 27 | #include <Plasma/Containment> | ||
28 | 28 | | |||
29 | class QDBusPendingCallWatcher; | 29 | class QDBusPendingCallWatcher; | ||
30 | class QDBusConnection; | 30 | class QDBusConnection; | ||
31 | class QQuickItem; | 31 | class QQuickItem; | ||
32 | namespace Plasma { | ||||
33 | class Service; | ||||
34 | } | ||||
32 | class PlasmoidModel; | 35 | class PlasmoidModel; | ||
36 | class StatusNotifierModel; | ||||
37 | class SystemTrayModel; | ||||
33 | 38 | | |||
34 | class SystemTray : public Plasma::Containment | 39 | class SystemTray : public Plasma::Containment | ||
35 | { | 40 | { | ||
36 | Q_OBJECT | 41 | Q_OBJECT | ||
42 | Q_PROPERTY(QAbstractItemModel* systemTrayModel READ systemTrayModel CONSTANT) | ||||
37 | Q_PROPERTY(QAbstractItemModel* availablePlasmoids READ availablePlasmoids CONSTANT) | 43 | Q_PROPERTY(QAbstractItemModel* availablePlasmoids READ availablePlasmoids CONSTANT) | ||
38 | Q_PROPERTY(QStringList allowedPlasmoids READ allowedPlasmoids WRITE setAllowedPlasmoids NOTIFY allowedPlasmoidsChanged) | 44 | Q_PROPERTY(QStringList allowedPlasmoids READ allowedPlasmoids WRITE setAllowedPlasmoids NOTIFY allowedPlasmoidsChanged) | ||
39 | Q_PROPERTY(QStringList defaultPlasmoids READ defaultPlasmoids CONSTANT) | 45 | Q_PROPERTY(QStringList defaultPlasmoids READ defaultPlasmoids CONSTANT) | ||
40 | 46 | | |||
41 | public: | 47 | public: | ||
42 | SystemTray( QObject *parent, const QVariantList &args ); | 48 | SystemTray( QObject *parent, const QVariantList &args ); | ||
43 | ~SystemTray() override; | 49 | ~SystemTray() override; | ||
44 | 50 | | |||
45 | void init() override; | 51 | void init() override; | ||
46 | 52 | | |||
47 | void restoreContents(KConfigGroup &group) override; | 53 | void restoreContents(KConfigGroup &group) override; | ||
48 | void restorePlasmoids(); | 54 | void restorePlasmoids(); | ||
49 | 55 | | |||
56 | QAbstractItemModel* systemTrayModel(); | ||||
57 | | ||||
50 | QStringList defaultPlasmoids() const; | 58 | QStringList defaultPlasmoids() const; | ||
51 | 59 | | |||
52 | QAbstractItemModel* availablePlasmoids(); | 60 | QAbstractItemModel* availablePlasmoids(); | ||
53 | 61 | | |||
54 | QStringList allowedPlasmoids() const; | 62 | QStringList allowedPlasmoids() const; | ||
55 | void setAllowedPlasmoids(const QStringList &allowed); | 63 | void setAllowedPlasmoids(const QStringList &allowed); | ||
56 | 64 | | |||
57 | //Creates an applet *if not already existing* | 65 | //Creates an applet *if not already existing* | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | |||||
115 | private: | 123 | private: | ||
116 | void initDBusActivatables(); | 124 | void initDBusActivatables(); | ||
117 | QStringList m_defaultPlasmoids; | 125 | QStringList m_defaultPlasmoids; | ||
118 | QHash<QString /*plugin name*/, KPluginMetaData> m_systrayApplets; | 126 | QHash<QString /*plugin name*/, KPluginMetaData> m_systrayApplets; | ||
119 | QHash<QString /*plugin name*/, QRegExp /*DBus Service*/> m_dbusActivatableTasks; | 127 | QHash<QString /*plugin name*/, QRegExp /*DBus Service*/> m_dbusActivatableTasks; | ||
120 | 128 | | |||
121 | QStringList m_allowedPlasmoids; | 129 | QStringList m_allowedPlasmoids; | ||
122 | PlasmoidModel *m_availablePlasmoidsModel; | 130 | PlasmoidModel *m_availablePlasmoidsModel; | ||
131 | StatusNotifierModel *m_statusNotifierModel; | ||||
132 | SystemTrayModel *m_systemTrayModel; | ||||
123 | QHash<QString, int> m_knownPlugins; | 133 | QHash<QString, int> m_knownPlugins; | ||
124 | QHash<QString, int> m_dbusServiceCounts; | 134 | QHash<QString, int> m_dbusServiceCounts; | ||
125 | }; | 135 | }; | ||
126 | 136 | | |||
127 | #endif | 137 | #endif |