Plasma
dataengine.cpp
Go to the documentation of this file.
58 d(new DataEnginePrivate(this, KPluginInfo(KService::serviceByStorageId(args.count() > 0 ? args[0].toString() : QString()))))
572 //kDebug() << "internal update source is delaying" << source->timeSinceLastUpdate() << minPollingInterval;
626 //kDebug() << "DataEngine " << q->objectName() << ": could not find DataContainer " << sourceName << ", creating";
648 //FIXME: at the moment a remote dataengine can only poll, a push mechanism will be needed instead
664 //kDebug() << "immediate call requested, we have:" << s->visualizationIsConnected(visualization);
void setDefaultService(const QString &serviceName)
Should be set if there will be 1 main service.
Definition: dataengine.cpp:432
void sourceRemoved(const QString &source)
Emitted when a data source is removed.
void disconnectVisualization(QObject *visualization)
Disconnects an object from this DataContainer.
Definition: datacontainer.cpp:264
uint maxSourceCount() const
Returns the maximum number of sources this DataEngine will have at any given time.
Definition: dataengine.cpp:277
QHash< QString, DataContainer * > SourceDict
Definition: dataengine.h:70
DataEngine(QObject *parent=0, KService::Ptr service=KService::Ptr(0))
Constructor.
Definition: dataengine.cpp:50
const Package * package() const
Accessor for the associated Package object if any.
Definition: dataengine.cpp:476
static Service * load(const QString &name, const QVariantList &args, QObject *parent=0)
Used to load a given service from a plugin.
Definition: service.cpp:75
void scheduleSourcesUpdated()
Call this method when you call setData directly on a DataContainer instead of using the DataEngine::s...
Definition: dataengine.cpp:481
Q_INVOKABLE DataContainer * containerForSource(const QString &source)
Retrieves a pointer to the DataContainer for a given source.
Definition: dataengine.cpp:128
void setMaxSourceCount(uint limit)
Sets an upper limit on the number of data sources to keep in this engine.
Definition: dataengine.cpp:262
void forceImmediateUpdateOfAllVisualizations()
Forces an immediate update to all connected sources, even those with timeouts that haven't yet expire...
Definition: dataengine.cpp:406
AppletScript * loadScriptEngine(const QString &language, Applet *applet)
Loads an Applet script engine for the given language.
Definition: scriptengine.cpp:206
virtual Q_INVOKABLE Service * serviceForSource(const QString &source)
Definition: dataengine.cpp:77
This class provides a generic API for write access to settings or services.
Definition: service.h:91
Q_INVOKABLE void disconnectSource(const QString &source, QObject *visualization) const
Disconnects a source from an object that was receiving data updates.
Definition: dataengine.cpp:119
void setName(const QString &name)
Sets the engine name for the DataEngine.
Definition: dataengine.cpp:495
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:347
const DataEngine::Data data() const
Returns the data for this DataContainer.
Definition: datacontainer.cpp:41
uint timeSinceLastUpdate() const
Returns how long ago, in msecs, that the data in this container was last updated. ...
Definition: datacontainer.cpp:316
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:501
void setValid(bool valid)
Sets whether or not this engine is valid, e.g.
Definition: dataengine.cpp:352
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:174
void forceImmediateUpdate()
Forces immediate update signals to all visualizations.
Definition: datacontainer.cpp:304
Q_INVOKABLE DataEngine::Data query(const QString &source) const
Gets the Data associated with a data source.
Definition: dataengine.cpp:133
void addSource(DataContainer *source)
Adds an already constructed data source.
Definition: dataengine.cpp:247
bool isValid() const
Returns true if this engine is valid, otherwise returns false.
Definition: dataengine.cpp:342
static QScriptValue toString(QScriptContext *ctx, QScriptEngine *eng)
Definition: easingcurve.cpp:57
Q_INVOKABLE Service * createDefaultService(QObject *parent=0)
Initializes and returns a new service from the name that was set with setDefaultService.
Definition: dataengine.cpp:437
virtual QStringList sources() const
void removeData(const QString &source, const QString &key)
Removes a data entry from a source.
Definition: dataengine.cpp:238
void removeAllData(const QString &source)
Removes all the data associated with a data source.
Definition: dataengine.cpp:229
void setData(const QString &key, const QVariant &value)
Set a value for a key.
Definition: datacontainer.cpp:46
Q_INVOKABLE void connectAllSources(QObject *visualization, uint pollingInterval=0, Plasma::IntervalAlignment intervalAlignment=NoAlignment) const
Connects all currently existing sources to an object for data updates.
Definition: dataengine.cpp:111
QString icon() const
void setData(const QString &source, const QVariant &value)
Sets a value for a data source.
Definition: dataengine.cpp:184
int minimumPollingInterval() const
Definition: dataengine.cpp:287
Q_INVOKABLE void connectSource(const QString &source, QObject *visualization, uint pollingInterval=0, Plasma::IntervalAlignment intervalAlignment=NoAlignment) const
Connects a source to an object for data updates.
Definition: dataengine.cpp:89
void setStorageEnabled(bool store)
sets this data container to be automatically stored.
Definition: datacontainer.cpp:147
void setPollingInterval(uint frequency)
Sets up an internal update tick for all data sources.
Definition: dataengine.cpp:292
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:165
PackageStructure::Ptr packageStructure(const QString &language, ComponentType type)
Loads an appropriate PackageStructure for the given language and type.
Definition: scriptengine.cpp:274
virtual void init()
This method is called when the DataEngine is started.
Definition: dataengine.cpp:153
void removeAllData()
Removes all data currently associated with this source.
Definition: datacontainer.cpp:68
QString filePath(const char *fileType, const QString &filename) const
Get the path to a given file.
Definition: package.cpp:213
void setMinimumPollingInterval(int minimumMs)
Sets the minimum amount of time, in milliseconds, that must pass between successive updates of data...
Definition: dataengine.cpp:282
void updateAllSources()
Immediately updates all existing sources when called.
Definition: dataengine.cpp:394
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.