cumbia-qtcontrols 1.x
Qt widgets on top of the cumbia C++ library
|
abstract class defining an interface for cumbia-qtcontrols writers More...
#include <cucontrolswriter_abs.h>
Public Member Functions | |
CuControlsWriterA (Cumbia *c, CuDataListener *l) | |
virtual | ~CuControlsWriterA () |
virtual QString | target () const =0 |
returns the name of the target | |
virtual void | clearTarget ()=0 |
virtual void | setTarget (const QString &s)=0 |
connect the specified target to the control system engine. | |
virtual void | execute ()=0 |
execute the target specified with setTarget | |
virtual void | sendData (const CuData &d)=0 |
send data to the writer | |
virtual void | getData (CuData &d_ino) const =0 |
get data from the writer | |
CuVariant | getArgs () const |
returns the arguments set with setArgs | |
void | setArgs (const CuVariant &args) |
sets the value that can be used as input argument | |
Cumbia * | getCumbia () const |
returns a pointer to the Cumbia implementation that was passed to the class constructor | |
CuDataListener * | getDataListener () const |
return the CuDataListener that was specified in the constructor. | |
CuData | getConfiguration () const |
returns the CuData previously saved with saveConfiguration | |
void | saveConfiguration (const CuData &da) |
when writer configuration is fetched (e.g. from a database), it can be saved in order to avoid database calls during the execution | |
abstract class defining an interface for cumbia-qtcontrols writers
This abstract class defines an interface for writers. cumbia-qtcontrols writers do not know about the engine used to connect and write to the control system.
The method getCumbia returns a pointer to the Cumbia engine currently used by the writer. getDataListener returns a pointer to the CuDataListener that is listening for updates (usually, write errors). The CuDataListener and the Cumbia engine are passed to CuControlsWriterA in the constructor. The setArgs and getArgs methods set and return a CuVariant that can be used to provide input arguments for the write operations.
All the other methods are pure virtual ones that must be implemented by the subclass.
|
inline |
the class constructor initialises the writer.
c | a pointer to the Cumbia instance in use. |
l | a CuDataListener that will receive updates. |
|
inlinevirtual |
|
pure virtual |
|
pure virtual |
execute the target specified with setTarget
Subclasses will execute the write operation in this method, according to the control system specific engine
Referenced by QuCheckBox::checkboxClicked(), QuApplyNumeric::execute(), QuButton::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), and QuWriter::onUpdate().
|
inline |
returns the arguments set with setArgs
|
inline |
returns the CuData previously saved with saveConfiguration
Writers will typically load configuration from a database at creation time and store it across following execute calls.
|
inline |
returns a pointer to the Cumbia implementation that was passed to the class constructor
|
pure virtual |
get data from the writer
d_ino | a bundle of key/value pairs defining the data to send to the writer and containing the results filled by the writer once the function returns |
Referenced by CuContext::getData().
|
inline |
return the CuDataListener that was specified in the constructor.
|
inline |
when writer configuration is fetched (e.g. from a database), it can be saved in order to avoid database calls during the execution
da | configuration data |
Referenced by QuApplyNumeric::onUpdate(), and QuButton::onUpdate().
|
pure virtual |
send data to the writer
d | a bundle of key/value pairs defining the data to send to the writer |
Referenced by CuContext::sendData(), and CuContext::sendData().
|
inline |
sets the value that can be used as input argument
Referenced by QuCheckBox::checkboxClicked(), QuApplyNumeric::execute(), QuButton::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), QuWriter::execute(), and QuWriter::onUpdate().
|
pure virtual |
connect the specified target to the control system engine.
s | the name of the target. The syntax depends on the engine. |
Subclasses can check the parameter to ensure that its form is valid.
Referenced by CuEngineSwap::replace(), QuCheckBox::setSource(), QmlWriterBackend::setTarget(), QuApplyNumeric::setTarget(), QuButton::setTarget(), QuComboBox::setTarget(), QuDoubleSpinBox::setTarget(), QuLineEdit::setTarget(), QuSpinBox::setTarget(), and QuWriter::setTarget().
|
pure virtual |
returns the name of the target
If wildcards were used in setTarget, target will return the complete target, with the substitutions.
Referenced by CuContext::disposeWriter(), CuContext::findWriter(), CuEngineSwap::replace(), QmlWriterBackend::setTarget(), QmlWriterBackend::target(), QuApplyNumeric::target(), QuComboBox::target(), QuDoubleSpinBox::target(), QuLineEdit::target(), QuSpinBox::target(), and QuWriter::target().