Class clove::Datasource¶
-
class
clove
::
Datasource
Base class for datasources.
Read the Manual for details.
Subclassed by clove::AsyncDatasource, clove::NativeDatasource, clove::ProxyDatasource
Public Functions
-
getValue
(ptr) Returns the value for a given node.
- Parameters
ptr
: The clove::DatasourceValuePointer.
-
getMetadata
(ptr) Returns an object of metadata information (like icons, status infos used for styling, …). Optional.
- Parameters
ptr
: The clove::DatasourceValuePointer.
-
changeValue
(ptr, value) Change the value for a given node.
This method is called from external places, e.g. when a user makes changes in a datasource-connected widget.
- Parameters
ptr
: The clove::DatasourceValuePointer.value
: The new value.
-
rowCount
(parent) Returns the number of rows for a given node.
- Parameters
parent
: The parent as clove::DatasourceValuePointer.
-
columnCount
(parent) Returns the number of columns for a given node.
- Parameters
parent
: The parent as clove::DatasourceValuePointer.
-
valuePointer
(irow, icol, parent) Constructs and returns a clove::DatasourceValuePointer for a given node.
- Parameters
irow
: The row index.icol
: The column index.parent
: The parent as clove::DatasourceValuePointer.
-
parent
(ptr) Returns the parent node for a given node.
- Parameters
ptr
: A node as clove::DatasourceValuePointer.
Returns a clove::DatasourceValuePointer resulting in the original one by navigation in depth.
- Parameters
ptr
: A node as clove::DatasourceValuePointer.direction
: The direction (+1 or -1).mayexpandfct
: Afunction(ptr)
which returnstrue
iff this node’s children are to be traversed.
-
OnDataInsert
Triggered when a node insertion takes place.
This is a clove.Event instance. See Manual for details.
-
OnDataRemove
Triggered when a node removal takes place.
This is a clove.Event instance. See Manual for details.
-
OnDataUpdate
Triggered when a node data update takes place.
This is a clove.Event instance. See Manual for details.
-