Plasma
datasource.cpp
101 * Besides causing a model reset more, unfortunately setRoleNames can be done a single time, so is not possible adding new roles after the
107 connect(m_dataEngine, &DataEngine::sourceAdded, this, &DataSource::updateSources, Qt::QueuedConnection);
110 connect(m_dataEngine, &DataEngine::sourceAdded, this, &DataSource::sourceAdded, Qt::QueuedConnection);
void append(const T &value)
void insert(const QString &key, const QVariant &value)
const T value(const Key &key) const const
void clear(const QString &key)
Q_INVOKABLE QObject * serviceForSource(const QString &source)
Definition: datasource.cpp:205
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
void sourceRemoved(const QString &source)
Emitted when a data source is removed.
QVariant fromValue(const T &value)
Q_EMITQ_EMIT
int interval
Polling interval in milliseconds when the data will be fetched again.
Definition: datasource.h:64
Plasma::Types::IntervalAlignment intervalAlignment
The interval to align polling to.
Definition: datasource.h:74
QHash::iterator erase(QHash::iterator pos)
int removeAll(const T &value)
bool contains(const QString &str, Qt::CaseSensitivity cs) const const
QHash::iterator find(const Key &key)
void clear()
virtual Q_INVOKABLE Service * serviceForSource(const QString &source)
Definition: dataengine.cpp:85
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Q_INVOKABLE void connectSource(const QString &source, QObject *visualization, uint pollingInterval=0, Plasma::Types::IntervalAlignment intervalAlignment=Types::NoAlignment) const
Connects a source to an object for data updates.
Definition: dataengine.cpp:109
Q_INVOKABLE void connectSource(const QString &source)
Connects a new source and adds it to the connectedSources list.
Definition: datasource.cpp:218
void destroyed(QObject *obj)
QStringList sources
Read-only list of all the sources available from the DataEngine (connected or not).
Definition: datasource.h:105
This class provides a generic API for write access to settings or services.
Definition: service.h:77
void sourceAdded(const QString &source)
Emitted when a new data source is created.
bool isEmpty() const const
QueuedConnection
Q_INVOKABLE void disconnectSource(const QString &source)
Disconnects from a DataEngine source and removes it from the connectedSources list.
Definition: datasource.cpp:232
void setObjectName(const QString &name)
bool contains(const Key &key) const const
Q_INVOKABLE void disconnectSource(const QString &source, QObject *visualization) const
Disconnects a source from an object that was receiving data updates.
Definition: dataengine.cpp:135
QHash::iterator end()
A class that makes it safe and easy to use DataEngines.
Definition: dataengineconsumer.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 30 2023 04:08:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 30 2023 04:08:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.