Plasma5Support
dataengine.cpp
90void DataEngine::connectAllSources(QObject *visualization, uint pollingInterval, Plasma5Support::Types::IntervalAlignment intervalAlignment) const
219 QObject::connect(source, SIGNAL(updateRequested(DataContainer *)), this, SLOT(internalUpdateSource(DataContainer *)));
388 // qCDebug(LOG_PLASMA) << "internal update source is delaying" << source->timeSinceLastUpdate() << minPollingInterval;
429 // qCDebug(LOG_PLASMA) << "DataEngine " << q->objectName() << ": could not find DataContainer " << sourceName << ", creating";
434 QObject::connect(s, SIGNAL(updateRequested(DataContainer *)), q, SLOT(internalUpdateSource(DataContainer *)));
445 // qCDebug(LOG_PLASMA) << "connect source called" << s->objectName() << "with interval" << pollingInterval;
459 // qCDebug(LOG_PLASMA) << "immediate call requested, we have:" << s->visualizationIsConnected(visualization);
466 QMetaObject::invokeMethod(visualization, "dataUpdated", Q_ARG(QString, s->objectName()), Q_ARG(Plasma5Support::DataEngine::Data, s->data()));
468 QMetaObject::invokeMethod(visualization, "modelChanged", Q_ARG(QString, s->objectName()), Q_ARG(QAbstractItemModel *, s->d->model.data()));
void disconnectVisualization(QObject *visualization)
Disconnects an object from this DataContainer.
Definition datacontainer.cpp:296
void setModel(QAbstractItemModel *model)
Associates a model with this DataContainer.
Definition datacontainer.cpp:57
void setData(const QString &key, const QVariant &value)
Set a value for a key.
Definition datacontainer.cpp:35
const DataEngine::Data data() const
Returns the data for this DataContainer.
Definition datacontainer.cpp:30
void removeAllData()
Removes all data currently associated with this source.
Definition datacontainer.cpp:77
void becameUnused(const QString &source)
Emitted when the last visualization is disconnected.
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
virtual QVariant data(const QModelIndex &index, int role) const const=0
bool hasNext() const const
const Key & key() const const
Item next()
const T & value() const const
bool isEmpty() const const
bool invokeMethod(QObject *context, Functor &&function, FunctorReturnType *ret)
bool hasNext() const const
Item next()
void remove()
T & value()
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void deleteLater()
void destroyed(QObject *obj)
bool disconnect(const QMetaObject::Connection &connection)
virtual bool event(QEvent *e)
void killTimer(int id)
objectName
int startTimer(int interval, Qt::TimerType timerType)
virtual void timerEvent(QTimerEvent *event)
void clear()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.