C# Класс Plasma.DataEngine

Наследование: Qyoto.QObject, IDisposable
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
ForceImmediateUpdateOfAllVisualizations void
Init void
RemoveSource void
ScheduleSourcesUpdated void
ServiceForSource Service
SourceRequestEvent bool
TimerEvent void
UpdateAllSources void
UpdateSourceEvent bool
sources List

Открытые методы

Метод Описание
ConnectAllSources ( QObject visualization ) : void
ConnectAllSources ( QObject visualization, uint pollingInterval ) : void
ConnectAllSources ( QObject visualization, uint pollingInterval, Plasma intervalAlignment ) : void Connects all currently existing sources to an object for data updates. The object must have a slot with the following signature: SLOT("dataUpdated(string,Plasma.DataEngine.Data)") The data is a QHash of QVariants keyed by string names, allowing one data source to provide sets of related data. This method may be called multiple times for the same visualization without side-effects. This can be useful to change the pollingInterval. Note that this method does not automatically connect sources that may appear later on. Connecting and responding to the sourceAdded sigal is still required to achieve that. name="visualization" the object to connect the data source to name="pollingInterval" the frequency, in milliseconds, with which to check for updates; a value of 0 (the default) means to update only when there is new data spontaneously generated (e.g. by the engine); any other value results in periodic updates from this source. This value is per-visualization and can be handy for items that require constant updates such as scrolling graphs or clocks. If the data has not changed, no update will be sent. name="intervalAlignment" the number of ms to align the interval to
ConnectSource ( string source, QObject visualization ) : void
ConnectSource ( string source, QObject visualization, uint pollingInterval ) : void
ConnectSource ( string source, QObject visualization, uint pollingInterval, Plasma intervalAlignment ) : void Connects a source to an object for data updates. The object must have a slot with the following signature: dataUpdated(stringsourceName, const Plasma.DataEngine.Data &data) The data is a QHash of QVariants keyed by string names, allowing one data source to provide sets of related data. name="source" the name of the data source name="visualization" the object to connect the data source to name="pollingInterval" the frequency, in milliseconds, with which to check for updates; a value of 0 (the default) means to update only when there is new data spontaneously generated (e.g. by the engine); any other value results in periodic updates from this source. This value is per-visualization and can be handy for items that require constant updates such as scrolling graphs or clocks. If the data has not changed, no update will be sent. name="intervalAlignment" the number of ms to align the interval to
ContainerForSource ( string source ) : DataContainer Retrevies a pointer to the DataContainer for a given source. This method should not be used if possible. An exception is for script engines that can not provide a QMetaObject as required by connectSource for the initial call to dataUpdated. Using this method, such engines can provide their own connectSource API. name="source" the name of the source.
DataEngine ( ) : System
DataEngine ( QObject parent ) : System
DataEngine ( QObject parent, Kimono.KService service ) : System Constructor. name="parent" The parent object. name="service" pointer to the service that describes the engine
DataEngine ( QObject parent, List args ) : System
DisconnectSource ( string source, QObject visualization ) : void Disconnects a source to an object that was receiving data updates. name="source" the name of the data source name="visualization" the object to connect the data source to
Dispose ( ) : void
IsEmpty ( ) : bool Returns true if the data engine is empty, which is to say that it has no data sources currently.
MaxSourceCount ( ) : uint Returns the maximum number of sources this DataEngine will have at any given time.
Name ( ) : string Returns the engine name for the DataEngine
Package ( ) : Package Accessor for the associated Package object if any.
PluginName ( ) : string Returns the plugin name for the applet
Query ( string source ) : QVariant>.Dictionary Gets the Data associated with a data source. The data is a QHash of QVariants keyed by string names, allowing one data source to provide sets of related data. name="source" the data source to retrieve the data for

Защищенные методы

Метод Описание
AddSource ( Plasma source ) : void Adds an already constructed data source. The DataEngine takes ownership of the DataContainer object. The objectName of the source is used for the source name. name="source" the DataContainer to add to the DataEngine
ContainerDict ( ) : Plasma.DataContainer>.Dictionary
CreateProxy ( ) : void
DataEngine ( Type dummy ) : System
MinimumPollingInterval ( ) : int
RemoveAllData ( string source ) : void Removes all the data associated with a data source. name="source" the name of the data source
RemoveAllSources ( ) : void Removes all data sources
RemoveData ( string source, string key ) : void Removes a data entry from a source name="source" the name of the data source name="key" the data entry to remove
SetData ( string source, QVariant>.Dictionary data ) : void Adds a set of data to a data source. If the source doesn't exist then it is created. name="source" the name of the data source name="data" the data to add to the source
SetData ( string source, Qyoto.QVariant value ) : void Sets a value for a data source. If the source doesn't exist then it is created. name="source" the name of the data source name="value" the data to associated with the source
SetData ( string source, string key, Qyoto.QVariant value ) : void Sets a value for a data source. If the source doesn't exist then it is created. name="source" the name of the data source name="key" the key to use for the data name="value" the data to associated with the source
SetMaxSourceCount ( uint limit ) : void Sets an upper limit on the number of data sources to keep in this engine. If the limit is exceeded, then the oldest data source, as defined by last update, is dropped. name="limit" the maximum number of sources to keep active
SetMinimumPollingInterval ( int minimumMs ) : void Sets the minimum amount of time, in milliseconds, that must pass between successive updates of data. This can help prevent too many updates happening due to multiple update requests coming in, which can be useful for expensive (time- or resource-wise) update mechanisms. name="minimumMs" the minimum time lapse, in milliseconds, between updates. A value less than 0 means to never perform automatic updates, a value of 0 means update immediately on every update request, a value >0 will result in a minimum time lapse being enforced.
SetName ( string name ) : void Sets the engine name for the DataEngine
SetPollingInterval ( uint frequency ) : void Sets up an internal update tick for all data sources. On every update, updateSourceEvent will be called for each applicable source. name="frequency" the time, in milliseconds, between updates. A value of 0 will stop internally triggered updates.

Приватные методы

Метод Описание
ForceImmediateUpdateOfAllVisualizations ( ) : void
Init ( ) : void
RemoveSource ( string source ) : void
ScheduleSourcesUpdated ( ) : void
ServiceForSource ( string source ) : Service
SourceRequestEvent ( string source ) : bool
TimerEvent ( Qyoto.QTimerEvent arg1 ) : void
UpdateAllSources ( ) : void
UpdateSourceEvent ( string source ) : bool
sources ( ) : List

Описание методов

AddSource() защищенный Метод

Adds an already constructed data source. The DataEngine takes ownership of the DataContainer object. The objectName of the source is used for the source name. name="source" the DataContainer to add to the DataEngine
protected AddSource ( Plasma source ) : void
source Plasma
Результат void

ConnectAllSources() публичный Метод

public ConnectAllSources ( QObject visualization ) : void
visualization Qyoto.QObject
Результат void

ConnectAllSources() публичный Метод

public ConnectAllSources ( QObject visualization, uint pollingInterval ) : void
visualization Qyoto.QObject
pollingInterval uint
Результат void

ConnectAllSources() публичный Метод

Connects all currently existing sources to an object for data updates. The object must have a slot with the following signature: SLOT("dataUpdated(string,Plasma.DataEngine.Data)") The data is a QHash of QVariants keyed by string names, allowing one data source to provide sets of related data. This method may be called multiple times for the same visualization without side-effects. This can be useful to change the pollingInterval. Note that this method does not automatically connect sources that may appear later on. Connecting and responding to the sourceAdded sigal is still required to achieve that. name="visualization" the object to connect the data source to name="pollingInterval" the frequency, in milliseconds, with which to check for updates; a value of 0 (the default) means to update only when there is new data spontaneously generated (e.g. by the engine); any other value results in periodic updates from this source. This value is per-visualization and can be handy for items that require constant updates such as scrolling graphs or clocks. If the data has not changed, no update will be sent. name="intervalAlignment" the number of ms to align the interval to
public ConnectAllSources ( QObject visualization, uint pollingInterval, Plasma intervalAlignment ) : void
visualization Qyoto.QObject
pollingInterval uint
intervalAlignment Plasma
Результат void

ConnectSource() публичный Метод

public ConnectSource ( string source, QObject visualization ) : void
source string
visualization Qyoto.QObject
Результат void

ConnectSource() публичный Метод

public ConnectSource ( string source, QObject visualization, uint pollingInterval ) : void
source string
visualization Qyoto.QObject
pollingInterval uint
Результат void

ConnectSource() публичный Метод

Connects a source to an object for data updates. The object must have a slot with the following signature: dataUpdated(stringsourceName, const Plasma.DataEngine.Data &data) The data is a QHash of QVariants keyed by string names, allowing one data source to provide sets of related data. name="source" the name of the data source name="visualization" the object to connect the data source to name="pollingInterval" the frequency, in milliseconds, with which to check for updates; a value of 0 (the default) means to update only when there is new data spontaneously generated (e.g. by the engine); any other value results in periodic updates from this source. This value is per-visualization and can be handy for items that require constant updates such as scrolling graphs or clocks. If the data has not changed, no update will be sent. name="intervalAlignment" the number of ms to align the interval to
public ConnectSource ( string source, QObject visualization, uint pollingInterval, Plasma intervalAlignment ) : void
source string
visualization Qyoto.QObject
pollingInterval uint
intervalAlignment Plasma
Результат void

ContainerDict() защищенный Метод

protected ContainerDict ( ) : Plasma.DataContainer>.Dictionary
Результат Plasma.DataContainer>.Dictionary

ContainerForSource() публичный Метод

Retrevies a pointer to the DataContainer for a given source. This method should not be used if possible. An exception is for script engines that can not provide a QMetaObject as required by connectSource for the initial call to dataUpdated. Using this method, such engines can provide their own connectSource API. name="source" the name of the source.
public ContainerForSource ( string source ) : DataContainer
source string
Результат DataContainer

CreateProxy() защищенный Метод

protected CreateProxy ( ) : void
Результат void

DataEngine() публичный Метод

public DataEngine ( ) : System
Результат System

DataEngine() публичный Метод

public DataEngine ( QObject parent ) : System
parent Qyoto.QObject
Результат System

DataEngine() публичный Метод

Constructor. name="parent" The parent object. name="service" pointer to the service that describes the engine
public DataEngine ( QObject parent, Kimono.KService service ) : System
parent Qyoto.QObject
service Kimono.KService
Результат System

DataEngine() публичный Метод

public DataEngine ( QObject parent, List args ) : System
parent Qyoto.QObject
args List
Результат System

DataEngine() защищенный Метод

protected DataEngine ( Type dummy ) : System
dummy System.Type
Результат System

DisconnectSource() публичный Метод

Disconnects a source to an object that was receiving data updates. name="source" the name of the data source name="visualization" the object to connect the data source to
public DisconnectSource ( string source, QObject visualization ) : void
source string
visualization Qyoto.QObject
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

IsEmpty() публичный Метод

Returns true if the data engine is empty, which is to say that it has no data sources currently.
public IsEmpty ( ) : bool
Результат bool

MaxSourceCount() публичный Метод

Returns the maximum number of sources this DataEngine will have at any given time.
public MaxSourceCount ( ) : uint
Результат uint

MinimumPollingInterval() защищенный Метод

protected MinimumPollingInterval ( ) : int
Результат int

Name() публичный Метод

Returns the engine name for the DataEngine
public Name ( ) : string
Результат string

Package() публичный Метод

Accessor for the associated Package object if any.
public Package ( ) : Package
Результат Package

PluginName() публичный Метод

Returns the plugin name for the applet
public PluginName ( ) : string
Результат string

Query() публичный Метод

Gets the Data associated with a data source. The data is a QHash of QVariants keyed by string names, allowing one data source to provide sets of related data. name="source" the data source to retrieve the data for
public Query ( string source ) : QVariant>.Dictionary
source string
Результат QVariant>.Dictionary

RemoveAllData() защищенный Метод

Removes all the data associated with a data source. name="source" the name of the data source
protected RemoveAllData ( string source ) : void
source string
Результат void

RemoveAllSources() защищенный Метод

Removes all data sources
protected RemoveAllSources ( ) : void
Результат void

RemoveData() защищенный Метод

Removes a data entry from a source name="source" the name of the data source name="key" the data entry to remove
protected RemoveData ( string source, string key ) : void
source string
key string
Результат void

SetData() защищенный Метод

Adds a set of data to a data source. If the source doesn't exist then it is created. name="source" the name of the data source name="data" the data to add to the source
protected SetData ( string source, QVariant>.Dictionary data ) : void
source string
data QVariant>.Dictionary
Результат void

SetData() защищенный Метод

Sets a value for a data source. If the source doesn't exist then it is created. name="source" the name of the data source name="value" the data to associated with the source
protected SetData ( string source, Qyoto.QVariant value ) : void
source string
value Qyoto.QVariant
Результат void

SetData() защищенный Метод

Sets a value for a data source. If the source doesn't exist then it is created. name="source" the name of the data source name="key" the key to use for the data name="value" the data to associated with the source
protected SetData ( string source, string key, Qyoto.QVariant value ) : void
source string
key string
value Qyoto.QVariant
Результат void

SetMaxSourceCount() защищенный Метод

Sets an upper limit on the number of data sources to keep in this engine. If the limit is exceeded, then the oldest data source, as defined by last update, is dropped. name="limit" the maximum number of sources to keep active
protected SetMaxSourceCount ( uint limit ) : void
limit uint
Результат void

SetMinimumPollingInterval() защищенный Метод

Sets the minimum amount of time, in milliseconds, that must pass between successive updates of data. This can help prevent too many updates happening due to multiple update requests coming in, which can be useful for expensive (time- or resource-wise) update mechanisms. name="minimumMs" the minimum time lapse, in milliseconds, between updates. A value less than 0 means to never perform automatic updates, a value of 0 means update immediately on every update request, a value >0 will result in a minimum time lapse being enforced.
protected SetMinimumPollingInterval ( int minimumMs ) : void
minimumMs int
Результат void

SetName() защищенный Метод

Sets the engine name for the DataEngine
protected SetName ( string name ) : void
name string
Результат void

SetPollingInterval() защищенный Метод

Sets up an internal update tick for all data sources. On every update, updateSourceEvent will be called for each applicable source. name="frequency" the time, in milliseconds, between updates. A value of 0 will stop internally triggered updates.
protected SetPollingInterval ( uint frequency ) : void
frequency uint
Результат void