Plasma5Support
dataengine.h
147 connectAllSources(QObject *visualization, uint pollingInterval = 0, Plasma5Support::Types::IntervalAlignment intervalAlignment = Types::NoAlignment) const;
167 * @return The model associated to a source if any. The ownership of the model stays with the DataContainer.
Q_INVOKABLE void disconnectSource(const QString &source, QObject *visualization) const
Disconnects a source from an object that was receiving data updates.
Definition dataengine.cpp:97
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:116
void setModel(const QString &source, QAbstractItemModel *model)
Associates a model to a data source.
Definition dataengine.cpp:184
virtual Q_INVOKABLE Service * serviceForSource(const QString &source)
Definition dataengine.cpp:58
QAbstractItemModel * modelForSource(const QString &source)
Definition dataengine.cpp:199
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:286
QHash< QString, DataContainer * > containerDict() const
Definition dataengine.cpp:296
void forceImmediateUpdateOfAllVisualizations()
Forces an immediate update to all connected sources, even those with timeouts that haven't yet expire...
Definition dataengine.cpp:347
void setValid(bool valid)
Sets whether or not this engine is valid, e.g.
Definition dataengine.cpp:291
int minimumPollingInterval() const
Definition dataengine.cpp:231
void updateAllSources()
Immediately updates all existing sources when called.
Definition dataengine.cpp:333
DataEngine(const KPluginMetaData &plugin, QObject *parent=nullptr)
Constructor.
Definition dataengine.cpp:34
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:111
void removeData(const QString &source, const QString &key)
Removes a data entry from a source.
Definition dataengine.cpp:175
void addSource(DataContainer *source)
Adds an already constructed data source.
Definition dataengine.cpp:210
void timerEvent(QTimerEvent *event) override
Reimplemented from QObject.
Definition dataengine.cpp:301
Q_INVOKABLE void connectSource(const QString &source, QObject *visualization, uint pollingInterval=0, Plasma5Support::Types::IntervalAlignment intervalAlignment=Types::NoAlignment) const
Connects a source to an object for data updates.
Definition dataengine.cpp:68
void setData(const QString &source, const QVariant &value)
Sets a value for a data source.
Definition dataengine.cpp:121
Q_INVOKABLE DataContainer * containerForSource(const QString &source)
Retrieves a pointer to the DataContainer for a given source.
Definition dataengine.cpp:106
void setMinimumPollingInterval(int minimumMs)
Sets the minimum amount of time, in milliseconds, that must pass between successive updates of data.
Definition dataengine.cpp:226
Q_INVOKABLE void connectAllSources(QObject *visualization, uint pollingInterval=0, Plasma5Support::Types::IntervalAlignment intervalAlignment=Types::NoAlignment) const
Connects all currently existing sources to an object for data updates.
Definition dataengine.cpp:90
void removeAllData(const QString &source)
Removes all the data associated with a data source.
Definition dataengine.cpp:166
void setPollingInterval(uint frequency)
Sets up an internal update tick for all data sources.
Definition dataengine.cpp:236
void sourceAdded(const QString &source)
Emitted when a new data source is created.
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:356
void sourceRemoved(const QString &source)
Emitted when a data source is removed.
bool isValid() const
Returns true if this engine is valid, otherwise returns false.
Definition dataengine.cpp:281
This class provides a generic API for write access to settings or services.
Definition service.h:78
QObject(QObject *parent)
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
virtual bool event(QEvent *e)
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:48:25 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:48:25 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.