QCSDataEngineLocal Class

User configurable data. More...

Header: #include <QCSDataEngineLocal>
Inherits: QCSDataEngine

Public Functions

QCSDataEngineLocal(QObject *parent = Q_NULLPTR)
virtual ~QCSDataEngineLocal()

Reimplemented Public Functions

virtual ObjectModel *allData()
virtual void close(QCSData *data)
virtual void create(QCSData *data)
virtual QString description()
virtual QString name()
virtual void setValue(QCSData *data, const QVariant value)

Additional Inherited Members

Detailed Description

User configurable data.

This data engine source has the form loc://<name>[.{"field":"value"}]. The trailing part after . is a JSON string. It could be used to configure the data and has the following fields:

FieldDescription
typeData type. Any of enum, string, int and double.
valueInitial value.
enumsArray of state strings for enum type.
precisionPrecision of a double typed value.

The data is not signaled as connected until it gets configured. If already configured, the second configurtion takes no effect.

loc://real.{"type": "double", "value": 3.14, "precision": 2}
loc://integer.{"type": "int", "value": 3}
loc://string.{"type": "string", "value": "string message"}
loc://enum.{"type": "enum", "enums": ["off", "on"], "value": 1}

Member Function Documentation

QCSDataEngineLocal::QCSDataEngineLocal(QObject *parent = Q_NULLPTR)

Default constructs an instance of QCSDataEngineLocal.

[virtual] QCSDataEngineLocal::~QCSDataEngineLocal()

Destroys the instance of QCSDataEngineLocal. The destructor is virtual.

[virtual] ObjectModel *QCSDataEngineLocal::allData()

Reimplemented from QCSDataEngine::allData().

[virtual] void QCSDataEngineLocal::close(QCSData *data)

Reimplemented from QCSDataEngine::close().

[virtual] void QCSDataEngineLocal::create(QCSData *data)

Reimplemented from QCSDataEngine::create().

[virtual] QString QCSDataEngineLocal::description()

Reimplemented from QCSDataEngine::description().

[virtual] QString QCSDataEngineLocal::name()

Reimplemented from QCSDataEngine::name().

Returns the source scheme loc.

[virtual] void QCSDataEngineLocal::setValue(QCSData *data, const QVariant value)

Reimplemented from QCSDataEngine::setValue().