Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/systemtray.h
Show All 24 Lines | |||||
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 | class PlasmoidModel; | 32 | class PlasmoidModel; | ||
33 | class EntryModel; | ||||
33 | 34 | | |||
34 | class SystemTray : public Plasma::Containment | 35 | class SystemTray : public Plasma::Containment | ||
35 | { | 36 | { | ||
36 | Q_OBJECT | 37 | Q_OBJECT | ||
37 | Q_PROPERTY(QAbstractItemModel* availablePlasmoids READ availablePlasmoids CONSTANT) | | |||
38 | Q_PROPERTY(QStringList allowedPlasmoids READ allowedPlasmoids WRITE setAllowedPlasmoids NOTIFY allowedPlasmoidsChanged) | 38 | Q_PROPERTY(QStringList allowedPlasmoids READ allowedPlasmoids WRITE setAllowedPlasmoids NOTIFY allowedPlasmoidsChanged) | ||
39 | Q_PROPERTY(QStringList defaultPlasmoids READ defaultPlasmoids CONSTANT) | 39 | Q_PROPERTY(QStringList defaultPlasmoids READ defaultPlasmoids CONSTANT) | ||
40 | Q_PROPERTY(QAbstractListModel* entryModel READ entryModel) | ||||
40 | 41 | | |||
41 | public: | 42 | public: | ||
42 | SystemTray( QObject *parent, const QVariantList &args ); | 43 | SystemTray( QObject *parent, const QVariantList &args ); | ||
43 | ~SystemTray() override; | 44 | ~SystemTray() override; | ||
44 | 45 | | |||
45 | void init() override; | 46 | void init() override; | ||
46 | 47 | | |||
47 | void restoreContents(KConfigGroup &group) override; | 48 | void restoreContents(KConfigGroup &group) override; | ||
48 | void restorePlasmoids(); | 49 | void restorePlasmoids(); | ||
49 | 50 | | |||
50 | QStringList defaultPlasmoids() const; | 51 | QStringList defaultPlasmoids() const; | ||
51 | 52 | | |||
52 | QAbstractItemModel* availablePlasmoids(); | 53 | QAbstractListModel* entryModel(); | ||
53 | 54 | | |||
54 | QStringList allowedPlasmoids() const; | 55 | QStringList allowedPlasmoids() const; | ||
55 | void setAllowedPlasmoids(const QStringList &allowed); | 56 | void setAllowedPlasmoids(const QStringList &allowed); | ||
56 | 57 | | |||
57 | //Creates an applet *if not already existing* | 58 | //Creates an applet *if not already existing* | ||
58 | void newTask(const QString &task); | 59 | void newTask(const QString &task); | ||
59 | 60 | | |||
60 | //cleans all instances of a given applet | 61 | //cleans all instances of a given applet | ||
▲ Show 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | |||||
114 | 115 | | |||
115 | private: | 116 | private: | ||
116 | void initDBusActivatables(); | 117 | void initDBusActivatables(); | ||
117 | QStringList m_defaultPlasmoids; | 118 | QStringList m_defaultPlasmoids; | ||
118 | QHash<QString /*plugin name*/, KPluginInfo> m_systrayApplets; | 119 | QHash<QString /*plugin name*/, KPluginInfo> m_systrayApplets; | ||
119 | QHash<QString /*plugin name*/, QRegExp /*DBus Service*/> m_dbusActivatableTasks; | 120 | QHash<QString /*plugin name*/, QRegExp /*DBus Service*/> m_dbusActivatableTasks; | ||
120 | 121 | | |||
121 | QStringList m_allowedPlasmoids; | 122 | QStringList m_allowedPlasmoids; | ||
122 | PlasmoidModel *m_availablePlasmoidsModel; | 123 | EntryModel *m_entryModel; | ||
123 | QHash<QString, int> m_knownPlugins; | 124 | QHash<QString, int> m_knownPlugins; | ||
124 | QHash<QString, int> m_dbusServiceCounts; | 125 | QHash<QString, int> m_dbusServiceCounts; | ||
125 | }; | 126 | }; | ||
126 | 127 | | |||
127 | #endif | 128 | #endif |