cumbia-qtcontrols 1.x
Qt widgets on top of the cumbia C++ library
Public Slots | Public Member Functions | Protected Member Functions | Properties | List of all members
QuApplyNumeric Class Reference

A widget to input a number and write it to a target linked to a control system engine. More...

#include <quapplynumeric.h>

Inheritance diagram for QuApplyNumeric:
Inheritance graph
[legend]

Public Slots

void setTarget (const QString &target)
 Set the name of the target that will be executed. More...
 
virtual void execute (double val)
 executes the target specified with setTarget, writing the value set on the widget. More...
 
void onAnimationValueChanged (const QVariant &v)
 
- Public Slots inherited from EApplyNumeric
virtual void applyValue ()
 
void clearModified ()
 
virtual void setFont (const QFont &)
 
void disable ()
 

Public Member Functions

 QuApplyNumeric (QWidget *parent, Cumbia *cumbia, const CuControlsWriterFactoryI &w_fac)
 Constructor with the parent widget, an engine specific Cumbia implementation and a CuControlsWriterFactoryI interface. More...
 
 QuApplyNumeric (QWidget *w, CumbiaPool *cumbia_pool, const CuControlsFactoryPool &fpool)
 Constructor with the parent widget, CumbiaPool and CuControlsFactoryPool More...
 
virtual ~QuApplyNumeric ()
 class destructor More...
 
QString target () const
 returns the target name. More...
 
void onUpdate (const CuData &d)
 configures the widget as soon as it is connected and records write errors. More...
 
CuContextgetContext () const
 returns a pointer to the context More...
 
- Public Member Functions inherited from EApplyNumeric
 EApplyNumeric (QWidget *parent, int i=3, int d=1, Qt::Orientation pos=Qt::Horizontal)
 
 ~EApplyNumeric ()
 
bool applyButtonActive ()
 returns the behaviour of the Apply button after a change in the value of the numeric widget More...
 
bool digitsFontScaleEnabled ()
 
void setDigitsFontScaleEnabled (bool en)
 
void setButtonPosition (Qt::Orientation pos)
 
Qt::Orientation buttonPosition () const
 
void setValue (double v)
 
double value () const
 
void setMaximum (double v)
 
double maximum () const
 
void setMinimum (double v)
 
double minimum () const
 
void setIntDigits (int i)
 
int intDigits () const
 
void setDecDigits (int d)
 
int decDigits () const
 
void setButtonText (const QString &s)
 
QString buttonText () const
 
bool isModified ()
 returns the state of the ApplyNumeric. More...
 
void setApplyButtonActive (bool en)
 changes the behaviour of the Apply button. More...
 
QFont numericFont () const
 
void setNumericFont (const QFont f)
 
QSize sizeHint () const
 
QSize minimumSizeHint () const
 
QWidget * getButton () const
 
void updateMaxMinAuto ()
 
- Public Member Functions inherited from CuContextI
virtual ~CuContextI ()
 
virtual CuContextgetContext () const =0
 Return a reference to the CuContext in use. More...
 

Protected Member Functions

void paintEvent (QPaintEvent *pe)
 

Properties

QString target
 
- Properties inherited from EApplyNumeric
double value
 
double maximum
 
double minimum
 
int integerDigits
 
int decimalDigits
 
Qt::Orientation buttonPos
 
QString buttonText
 
QFont numericFont
 
bool applyButtonActive
 

Additional Inherited Members

- Signals inherited from EApplyNumeric
void clicked (double)
 
void valueChanged (double value)
 signal emitted when the displayed value changes on the TApplyNumeric. More...
 

Detailed Description

A widget to input a number and write it to a target linked to a control system engine.

Constructor & Destructor Documentation

◆ QuApplyNumeric() [1/2]

QuApplyNumeric::QuApplyNumeric ( QWidget *  parent,
Cumbia *  cumbia,
const CuControlsWriterFactoryI w_fac 
)

Constructor with the parent widget, an engine specific Cumbia implementation and a CuControlsWriterFactoryI interface.

Please refer to md_src_cumbia_qtcontrols_widget_constructors documentation.

◆ QuApplyNumeric() [2/2]

QuApplyNumeric::QuApplyNumeric ( QWidget *  parent,
CumbiaPool *  cumbia_pool,
const CuControlsFactoryPool fpool 
)

Constructor with the parent widget, CumbiaPool and CuControlsFactoryPool

Please refer to md_src_cumbia_qtcontrols_widget_constructors documentation.

◆ ~QuApplyNumeric()

QuApplyNumeric::~QuApplyNumeric ( )
virtual

class destructor

Deletes the context used to link the widget to the writer.

Member Function Documentation

◆ execute

void QuApplyNumeric::execute ( double  val)
virtualslot

executes the target specified with setTarget, writing the value set on the widget.

The value set on the widget is written on the target when the apply button is clicked. This virtual method can be reimplemented on a subclass.

References QuAnimation::ElasticBottomLine, CuControlsWriterA::execute(), and CuControlsWriterA::setArgs().

◆ getContext()

CuContext * QuApplyNumeric::getContext ( ) const
virtual

returns a pointer to the context

Returns
a pointer to the CuContext

Implements CuContextI.

◆ onAnimationValueChanged

void QuApplyNumeric::onAnimationValueChanged ( const QVariant &  v)
slot

◆ onUpdate()

void QuApplyNumeric::onUpdate ( const CuData &  da)

◆ paintEvent()

void QuApplyNumeric::paintEvent ( QPaintEvent *  pe)
protected

◆ setTarget

void QuApplyNumeric::setTarget ( const QString &  target)
slot

Set the name of the target that will be executed.

Refer to md_src_cumbia_qtcontrols_widget_constructors documentation.

References CuControlsWriterA::setTarget(), and target.

◆ target()

QString QuApplyNumeric::target ( ) const

returns the target name.

Returns
the target name, or an empty string if setTarget hasn't been called yet.

Refer to md_src_cumbia_qtcontrols_widget_constructors documentation.

References CuControlsWriterA::target().

Property Documentation

◆ target

QString QuApplyNumeric::target
readwrite

Referenced by onUpdate(), and setTarget().


The documentation for this class was generated from the following files: