PlasmaCore
#include <datasource.h>

Public Types | |
enum | Change { NoChange = 0, DataEngineChanged = 1, SourcesChanged = 2 } |
typedef QHash< QString, QVariant > | Data |
Signals | |
void | connectedSourcesChanged () |
void | dataChanged () |
void | engineChanged () |
void | intervalChanged () |
void | newData (const QString &sourceName, const Plasma::DataEngine::Data &data) |
void | sourceAdded (const QString &source) |
void | sourceConnected (const QString &source) |
void | sourceDisconnected (const QString &source) |
void | sourceRemoved (const QString &source) |
void | sourcesChanged () |
Public Member Functions | |
DataSource (QObject *parent=0) | |
QStringList | connectedSources () const |
Q_INVOKABLE void | connectSource (const QString &source) |
QVariantHash | data () const |
Q_INVOKABLE void | disconnectSource (const QString &source) |
QString | engine () const |
int | interval () const |
Q_INVOKABLE Plasma::Service * | serviceForSource (const QString &source) |
void | setConnectedSources (const QStringList &s) |
void | setEngine (const QString &e) |
void | setInterval (const int interval) |
QStringList | sources () const |
bool | valid () const |
![]() | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Protected Slots | |
void | dataUpdated (const QString &sourceName, const Plasma::DataEngine::Data &data) |
void | removeSource (const QString &source) |
void | setupData () |
Properties | |
QStringList | connectedSources |
QVariantHash | data |
QString | dataEngine |
QString | engine |
int | interval |
QStringList | sources |
bool | valid |
![]() | |
objectName | |
Additional Inherited Members | |
![]() | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
![]() | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
![]() | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Detailed Description
Definition at line 42 of file datasource.h.
Member Typedef Documentation
typedef QHash<QString, QVariant> Plasma::DataSource::Data |
Definition at line 53 of file datasource.h.
Member Enumeration Documentation
Enumerator | |
---|---|
NoChange | |
DataEngineChanged | |
SourcesChanged |
Definition at line 46 of file datasource.h.
Constructor & Destructor Documentation
Plasma::DataSource::DataSource | ( | QObject * | parent = 0 | ) |
Definition at line 33 of file datasource.cpp.
Member Function Documentation
|
inline |
Definition at line 82 of file datasource.h.
|
signal |
void Plasma::DataSource::connectSource | ( | const QString & | source | ) |
|
inline |
Definition at line 96 of file datasource.h.
|
signal |
|
protectedslot |
Definition at line 139 of file datasource.cpp.
void Plasma::DataSource::disconnectSource | ( | const QString & | source | ) |
Disconnects from a DataEngine Source.
It also removes it from connectedSources
Definition at line 199 of file datasource.cpp.
|
inline |
Definition at line 75 of file datasource.h.
|
signal |
|
inline |
Definition at line 67 of file datasource.h.
|
signal |
|
signal |
|
protectedslot |
Definition at line 152 of file datasource.cpp.
Plasma::Service * Plasma::DataSource::serviceForSource | ( | const QString & | source | ) |
- Returns
- a Plasma::Service given a source name
- QString source source name we want a service of
Definition at line 172 of file datasource.cpp.
void Plasma::DataSource::setConnectedSources | ( | const QStringList & | s | ) |
Definition at line 41 of file datasource.cpp.
void Plasma::DataSource::setEngine | ( | const QString & | e | ) |
Definition at line 72 of file datasource.cpp.
void Plasma::DataSource::setInterval | ( | const int | interval | ) |
Definition at line 83 of file datasource.cpp.
|
protectedslot |
Definition at line 95 of file datasource.cpp.
|
signal |
|
signal |
|
signal |
|
signal |
|
inline |
Definition at line 89 of file datasource.h.
|
signal |
|
inline |
Definition at line 61 of file datasource.h.
Property Documentation
|
readwrite |
String array of all the source names connected to the DataEngine.
Definition at line 81 of file datasource.h.
|
read |
All the data fetched by this dataengine.
This is an hash of hashes. At the first level, there are the source names, at the secons, they keys set by the DataEngine
Definition at line 95 of file datasource.h.
|
readwrite |
Plugin name of the Plasma DataEngine.
Definition at line 73 of file datasource.h.
|
readwrite |
Definition at line 74 of file datasource.h.
|
readwrite |
Polling interval in milliseconds when the data will be fetched again.
If 0 no polling will be done.
Definition at line 66 of file datasource.h.
|
read |
Read only string array of all the sources available from the DataEngine (connected or not)
Definition at line 88 of file datasource.h.
|
read |
true if the connection to the Plasma DataEngine is valid
Definition at line 60 of file datasource.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:08:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.