Changeset View
Changeset View
Standalone View
Standalone View
src/plasma/private/dataengine_p.h
Show All 16 Lines | |||||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef DATAENGINE_P_H | 20 | #ifndef DATAENGINE_P_H | ||
21 | #define DATAENGINE_P_H | 21 | #define DATAENGINE_P_H | ||
22 | 22 | | |||
23 | #include <QElapsedTimer> | 23 | #include <QElapsedTimer> | ||
24 | 24 | | |||
25 | #include <kplugininfo.h> | 25 | #include <KPluginMetaData> | ||
26 | 26 | | |||
27 | namespace Plasma | 27 | namespace Plasma | ||
28 | { | 28 | { | ||
29 | 29 | | |||
30 | class Service; | 30 | class Service; | ||
31 | 31 | | |||
32 | class DataEnginePrivate | 32 | class DataEnginePrivate | ||
33 | { | 33 | { | ||
34 | public: | 34 | public: | ||
35 | DataEnginePrivate(DataEngine *e, const KPluginInfo &info, const QVariantList &args = QVariantList()); | 35 | DataEnginePrivate(DataEngine *e, const KPluginMetaData &info, const QVariantList &args = QVariantList()); | ||
36 | ~DataEnginePrivate(); | 36 | ~DataEnginePrivate(); | ||
37 | DataContainer *source(const QString &sourceName, bool createWhenMissing = true); | 37 | DataContainer *source(const QString &sourceName, bool createWhenMissing = true); | ||
38 | void connectSource(DataContainer *s, QObject *visualization, uint pollingInterval, | 38 | void connectSource(DataContainer *s, QObject *visualization, uint pollingInterval, | ||
39 | Plasma::Types::IntervalAlignment align, bool immediateCall = true); | 39 | Plasma::Types::IntervalAlignment align, bool immediateCall = true); | ||
40 | DataContainer *requestSource(const QString &sourceName, bool *newSource = nullptr); | 40 | DataContainer *requestSource(const QString &sourceName, bool *newSource = nullptr); | ||
41 | void internalUpdateSource(DataContainer *); | 41 | void internalUpdateSource(DataContainer *); | ||
42 | void setupScriptSupport(); | 42 | void setupScriptSupport(); | ||
43 | 43 | | |||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | |||||
85 | /** | 85 | /** | ||
86 | * Call this method when you call setData directly on a DataContainer instead | 86 | * Call this method when you call setData directly on a DataContainer instead | ||
87 | * of using the DataEngine::setData methods. | 87 | * of using the DataEngine::setData methods. | ||
88 | * If this method is not called, no dataUpdated(..) signals will be emitted! | 88 | * If this method is not called, no dataUpdated(..) signals will be emitted! | ||
89 | */ | 89 | */ | ||
90 | void scheduleSourcesUpdated(); | 90 | void scheduleSourcesUpdated(); | ||
91 | 91 | | |||
92 | DataEngine *q; | 92 | DataEngine *q; | ||
93 | KPluginInfo dataEngineDescription; | 93 | KPluginMetaData dataEngineDescription; | ||
94 | int refCount; | 94 | int refCount; | ||
95 | int checkSourcesTimerId; | 95 | int checkSourcesTimerId; | ||
96 | int updateTimerId; | 96 | int updateTimerId; | ||
97 | int minPollingInterval; | 97 | int minPollingInterval; | ||
98 | QElapsedTimer updateTimer; | 98 | QElapsedTimer updateTimer; | ||
99 | DataEngine::SourceDict sources; | 99 | DataEngine::SourceDict sources; | ||
100 | bool valid; | 100 | bool valid; | ||
101 | DataEngineScript *script; | 101 | DataEngineScript *script; | ||
102 | QString serviceName; | 102 | QString serviceName; | ||
103 | Package *package; | 103 | Package *package; | ||
104 | QString waitingSourceRequest; | 104 | QString waitingSourceRequest; | ||
105 | }; | 105 | }; | ||
106 | 106 | | |||
107 | } // Plasma namespace | 107 | } // Plasma namespace | ||
108 | 108 | | |||
109 | #endif // multiple inclusion guard | 109 | #endif // multiple inclusion guard |