Class: DataSource
Prev
Next

Class: DataSource

An object that represents a data file that is understood by Kst.

Inherits: Object

Collection class: DataSourceCollection

Constructors:

Methods:

Properties:

DataSource ( string url [, string type] )

  • string url - The filename or URL to load.

  • string type - The name of the data source plugin to use. [OPTIONAL]

Creates a new DataSource object. If the url cannot be opened and read, isValid will be false.

boolean isValidField ( string field )

  • string field - A field name to check for.

Returns if the field is valid or not.

StringArray fieldList ( )

Generates a list of the fields available from this source.

void reset ( )

Resets the data source.

StringArray matrixList ( )

Generates a list of the matrices available from this source.

number samplesPerFrame ( string field )

  • string field - A field name to get the number of samples per frame for. This is the same for every field in some sources, but different in others.

The number of samples per frame for this field or source.

number frameCount ( [string field] )

  • string field - An optional field name to get the number of frames for. This is the same for every field in some sources, but different in others. [OPTIONAL]

Gets the number of frames for the source, or the given field if it is specified.

boolean setConfiguration ( string setting, string setting )

  • string setting - Gives the setting name to set the value of.

  • string setting - Gives the value of the setting.

Sets a configuration setting of the data source.

string configuration ( string setting )

  • string setting - Gives the setting name to retrive the value of.

Gets a configuration setting of the data source.

string units ( string field )

  • string field - Gives the field name to retrieve the units of.

Gets the units associated with a field of the data source.

boolean valid [Read-Only]

True if the data source is valid.

boolean empty [Read-Only]

True if the data source is empty.

boolean completeFieldList [Read-Only]

True if the field list is complete.

string fileName [Read-Only]

Name of the file.

string fileType [Read-Only]

The type (format) of the file, such as ASCII.

string source [Read-Only]

The name of the data source.

StringArray metaData [Read-Only]

Any metadata associated with the data source. This is an associative array of form metaData["key"] = "value".

Prev
Next
Home


Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team