Plasma
dataengine.h
Go to the documentation of this file.
Provides a restricted interface for scripting a DataEngine.
Definition dataenginescript.h:42
Q_INVOKABLE Service * createDefaultService(QObject *parent=0)
Initializes and returns a new service from the name that was set with setDefaultService.
Definition dataengine.cpp:437
void sourceRemoved(const QString &source)
Emitted when a data source is removed.
void setValid(bool valid)
Sets whether or not this engine is valid, e.g.
Definition dataengine.cpp:352
virtual bool sourceRequestEvent(const QString &source)
When a source that does not currently exist is requested by the consumer, this method is called to gi...
Definition dataengine.cpp:165
void removeData(const QString &source, const QString &key)
Removes a data entry from a source.
Definition dataengine.cpp:238
void setPollingInterval(uint frequency)
Sets up an internal update tick for all data sources.
Definition dataengine.cpp:292
Q_INVOKABLE void connectAllSources(QObject *visualization, uint pollingInterval=0, Plasma::IntervalAlignment intervalAlignment=NoAlignment) const
Connects all currently existing sources to an object for data updates.
Definition dataengine.cpp:111
void setDefaultService(const QString &serviceName)
Should be set if there will be 1 main service.
Definition dataengine.cpp:432
bool isValid() const
Returns true if this engine is valid, otherwise returns false.
Definition dataengine.cpp:342
virtual bool updateSourceEvent(const QString &source)
Called by internal updating mechanisms to trigger the engine to refresh the data contained in a given...
Definition dataengine.cpp:174
void setData(const QString &source, const QVariant &value)
Sets a value for a data source.
Definition dataengine.cpp:184
QHashIterator< QString, QVariant > DataIterator
Definition dataengine.h:69
void removeAllData(const QString &source)
Removes all the data associated with a data source.
Definition dataengine.cpp:229
bool isEmpty() const
Returns true if the data engine is empty, which is to say that it has no data sources currently.
Definition dataengine.cpp:347
void addSource(DataContainer *source)
Adds an already constructed data source.
Definition dataengine.cpp:247
void setMinimumPollingInterval(int minimumMs)
Sets the minimum amount of time, in milliseconds, that must pass between successive updates of data.
Definition dataengine.cpp:282
Q_INVOKABLE DataContainer * containerForSource(const QString &source)
Retrieves a pointer to the DataContainer for a given source.
Definition dataengine.cpp:128
QHash< QString, DataContainer * > SourceDict
Definition dataengine.h:70
Q_INVOKABLE void disconnectSource(const QString &source, QObject *visualization) const
Disconnects a source from an object that was receiving data updates.
Definition dataengine.cpp:119
virtual void init()
This method is called when the DataEngine is started.
Definition dataengine.cpp:153
void setStorageEnabled(const QString &source, bool store)
Sets a source to be stored for easy retrieval when the real source of the data (usually a network con...
Definition dataengine.cpp:501
const Package * package() const
Accessor for the associated Package object if any.
Definition dataengine.cpp:476
void scheduleSourcesUpdated()
Call this method when you call setData directly on a DataContainer instead of using the DataEngine::s...
Definition dataengine.cpp:481
void setMaxSourceCount(uint limit)
Sets an upper limit on the number of data sources to keep in this engine.
Definition dataengine.cpp:262
int minimumPollingInterval() const
Definition dataengine.cpp:287
Q_INVOKABLE void connectSource(const QString &source, QObject *visualization, uint pollingInterval=0, Plasma::IntervalAlignment intervalAlignment=NoAlignment) const
Connects a source to an object for data updates.
Definition dataengine.cpp:89
Q_INVOKABLE DataEngine::Data query(const QString &source) const
Gets the Data associated with a data source.
Definition dataengine.cpp:133
void updateAllSources()
Immediately updates all existing sources when called.
Definition dataengine.cpp:394
void setName(const QString &name)
Sets the engine name for the DataEngine.
Definition dataengine.cpp:495
void forceImmediateUpdateOfAllVisualizations()
Forces an immediate update to all connected sources, even those with timeouts that haven't yet expire...
Definition dataengine.cpp:406
DataEngine(QObject *parent=0, KService::Ptr service=KService::Ptr(0))
Constructor.
Definition dataengine.cpp:50
uint maxSourceCount() const
Returns the maximum number of sources this DataEngine will have at any given time.
Definition dataengine.cpp:277
void sourceAdded(const QString &source)
Emitted when a new data source is created.
virtual Q_INVOKABLE Service * serviceForSource(const QString &source)
Definition dataengine.cpp:77
This class provides a generic API for write access to settings or services.
Definition service.h:92
<Plasma/Version>
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.