• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kde-runtime API Reference
  • KDE Home
  • Contact Us
 

PlasmaCore

  • Plasma
  • DataSource
Public Types | Signals | Public Member Functions | Protected Slots | Properties | List of all members
Plasma::DataSource Class Reference

#include <datasource.h>

Inheritance diagram for Plasma::DataSource:
Inheritance graph
[legend]

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
 
- Public Member Functions inherited from QObject
 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 &regExp) 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
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
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)
 
- Protected Member Functions inherited from QObject
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)
 
- Static Protected Member Functions inherited from QObject
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

enum Plasma::DataSource::Change
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

QStringList Plasma::DataSource::connectedSources ( ) const
inline

Definition at line 82 of file datasource.h.

void Plasma::DataSource::connectedSourcesChanged ( )
signal
void Plasma::DataSource::connectSource ( const QString &  source)

Connect a new source.

It adds it to connectedSources

Definition at line 185 of file datasource.cpp.

QVariantHash Plasma::DataSource::data ( ) const
inline

Definition at line 96 of file datasource.h.

void Plasma::DataSource::dataChanged ( )
signal
void Plasma::DataSource::dataUpdated ( const QString &  sourceName,
const Plasma::DataEngine::Data &  data 
)
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.

QString Plasma::DataSource::engine ( ) const
inline

Definition at line 75 of file datasource.h.

void Plasma::DataSource::engineChanged ( )
signal
int Plasma::DataSource::interval ( ) const
inline

Definition at line 67 of file datasource.h.

void Plasma::DataSource::intervalChanged ( )
signal
void Plasma::DataSource::newData ( const QString &  sourceName,
const Plasma::DataEngine::Data &  data 
)
signal
void Plasma::DataSource::removeSource ( const QString &  source)
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.

void Plasma::DataSource::setupData ( )
protectedslot

Definition at line 95 of file datasource.cpp.

void Plasma::DataSource::sourceAdded ( const QString &  source)
signal
void Plasma::DataSource::sourceConnected ( const QString &  source)
signal
void Plasma::DataSource::sourceDisconnected ( const QString &  source)
signal
void Plasma::DataSource::sourceRemoved ( const QString &  source)
signal
QStringList Plasma::DataSource::sources ( ) const
inline

Definition at line 89 of file datasource.h.

void Plasma::DataSource::sourcesChanged ( )
signal
bool Plasma::DataSource::valid ( ) const
inline

Definition at line 61 of file datasource.h.

Property Documentation

QStringList Plasma::DataSource::connectedSources
readwrite

String array of all the source names connected to the DataEngine.

Definition at line 81 of file datasource.h.

QVariantHash Plasma::DataSource::data
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.

QString Plasma::DataSource::dataEngine
readwrite

Plugin name of the Plasma DataEngine.

Definition at line 73 of file datasource.h.

QString Plasma::DataSource::engine
readwrite

Definition at line 74 of file datasource.h.

int Plasma::DataSource::interval
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.

QStringList Plasma::DataSource::sources
read

Read only string array of all the sources available from the DataEngine (connected or not)

Definition at line 88 of file datasource.h.

bool Plasma::DataSource::valid
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:
  • datasource.h
  • datasource.cpp
This file is part of the KDE documentation.
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.

PlasmaCore

Skip menu "PlasmaCore"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kde-runtime API Reference

Skip menu "kde-runtime API Reference"
  • KCMShell
  • KNotify
  • Plasma Runtime
  •     PlasmaCore
  •     DragAndDrop
  •     PlasmaComponents
  •     PlasmaExtraComponents
  •     QtExtraComponents

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal