Class clove::FilterProxyDatasource

class clove::FilterProxyDatasource : public clove::ProxyDatasource

A clove::Datasource implementation which filters another clove::Datasource.

Public Functions

FilterProxyDatasource(datasource, rowfilterfct, colfilterfct)

Parameters
  • datasource: The source clove::Datasource.

  • rowfilterfct: A function(datasource, idx, parent) returning true if the filter accepts this row (optional).

  • colfilterfct: A function(datasource, idx, parent) returning true if the filter accepts this column (optional).

setRowFilter(rowfilterfct)

Sets the row filter function.

Parameters
  • rowfilterfct: The row filter function. See constructor for details.

setColumnFilter(colfilterfct)

Sets the column filter function.

Parameters
  • colfilterfct: The column filter function. See constructor for details.

setDatasource(datasource)

Sets the source datasource.

Parameters

proxyPointerToNativePointer(proxyptr)

Translates a clove::DatasourceValuePointer from this proxy datasource to a one for the source datasource.

Parameters
  • proxyptr: A value pointer.

nativePointerToProxyPointer(nativeptr)

Translates a clove::DatasourceValuePointer from the source datasource to a one for this proxy datasource.

Parameters
  • nativeptr: A value pointer.

refresh()

Refreshes the filtering.

Call this when the outer conditions changed and the filters must be applied again.

getValue(ptr)

Returns the value for a given node.

Parameters

getMetadata(ptr)

Returns an object of metadata information (like icons, status infos used for styling, …). Optional.

Parameters

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

rowCount(parent)

Returns the number of rows for a given node.

Parameters

columnCount(parent)

Returns the number of columns for a given node.

Parameters

valuePointer(irow, icol, parent)

Constructs and returns a clove::DatasourceValuePointer for a given node.

Parameters

parent(ptr)

Returns the parent node for a given node.

Parameters

valuePointerNavigateInDepth(ptr, direction, mayexpandfct)

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: A function(ptr) which returns true 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.

getRowHeader(irow, parent)

Returns the header configuration for a given row.

Parameters

getColumnHeader(irow, parent)

Returns the header configuration for a given column.

Parameters

rowHeadersVisible(parent)

If row headers are visible.

Parameters

columnHeadersVisible(parent)

If column headers are visible.

Parameters

OnHeaderDataInsert

Triggered when a new row or column of header data was inserted.

This is a clove.Event instance. See Manual for details.

OnHeaderDataRemove

Triggered when a row or column of header data was removed.

This is a clove.Event instance. See Manual for details.

OnHeaderDataUpdate

Triggered when header data were updated.

This is a clove.Event instance. See Manual for details.

OnHeaderVisibilityUpdated

Triggered when header visibilities changed.

This is a clove.Event instance. See Manual for details.