Plasma
7 #ifndef PLASMA_DATAENGINE_H
8 #define PLASMA_DATAENGINE_H
12 #include <QStringList>
14 #include <plasma/plasma_export.h>
15 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 94)
16 #include <KPluginInfo>
20 #include <KPluginFactory>
21 #include <KPluginMetaData>
22 #include <plasma/plasma.h>
23 #include <plasma/service.h>
30 class DataEngineScript;
33 class DataEnginePrivate;
60 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 67)
69 PLASMA_DEPRECATED_VERSION(5, 67,
"Use KPluginMetaData")
83 explicit DataEngine(
QObject *parent =
nullptr,
const QVariantList &args = QVariantList());
101 Q_INVOKABLE
virtual Service *serviceForSource(
const QString &source);
103 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 67)
109 PLASMA_DEPRECATED_VERSION(5, 67,
"Use metadata()")
142 Q_INVOKABLE
void connectSource(
const QString &source,
144 uint pollingInterval = 0,
184 Q_INVOKABLE
void disconnectSource(
const QString &source,
QObject *visualization)
const;
209 bool isValid()
const;
217 bool isEmpty()
const;
219 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 83)
225 PLASMA_DEPRECATED_VERSION(5, 83,
"Use kpackage API instead")
240 void sourceAdded(
const QString &source);
252 void sourceRemoved(
const QString &source);
275 virtual bool sourceRequestEvent(
const QString &source);
287 virtual bool updateSourceEvent(
const QString &source);
315 void setData(
const QString &source,
const QVariantMap &data);
322 void removeAllData(
const QString &source);
369 void setMinimumPollingInterval(
int minimumMs);
374 int minimumPollingInterval()
const;
384 void setPollingInterval(uint frequency);
389 void removeAllSources();
398 void setValid(
bool valid);
418 void setStorageEnabled(
const QString &source,
bool store);
425 void removeSource(
const QString &source);
430 void updateAllSources();
442 void forceImmediateUpdateOfAllVisualizations();
445 friend class DataEnginePrivate;
447 friend class DataEngineManager;
448 friend class PlasmoidServiceJob;
449 friend class NullEngine;
451 Q_PRIVATE_SLOT(d,
void internalUpdateSource(
DataContainer *source))
452 Q_PRIVATE_SLOT(d,
void sourceDestroyed(
QObject *
object))
453 Q_PRIVATE_SLOT(d,
void scheduleSourcesUpdated())
455 DataEnginePrivate *d;
460 #if PLASMA_ENABLE_DEPRECATED_SINCE(5, 88)
466 #define K_EXPORT_PLASMA_DATAENGINE(libname, classname) \
467 K_PLUGIN_FACTORY(factory, registerPlugin<classname>();)
470 #define K_EXPORT_PLASMA_DATAENGINE_WITH_JSON(libname, classname, jsonFile) \
471 K_PLUGIN_FACTORY_WITH_JSON(factory, jsonFile, registerPlugin<classname>();)
475 #endif // multiple inclusion guard
Provides a restricted interface for scripting a DataEngine.
Data provider for plasmoids (Plasma plugins)
Namespace for everything in libplasma.
This class provides a generic API for write access to settings or services.
A set of data exported via a DataEngine.
@ NoAlignment
No alignment.
IntervalAlignment
Possible timing alignments.
object representing an installed Plasma package
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 23 2023 04:10:36 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.