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

a widget to set a value and write it More...

#include <eapplynumeric.h>

Inheritance diagram for EApplyNumeric:
Inheritance graph
[legend]

Public Slots

virtual void applyValue ()
 
void clearModified ()
 
virtual void setFont (const QFont &)
 
void disable ()
 

Signals

void clicked (double)
 
void valueChanged (double value)
 signal emitted when the displayed value changes on the TApplyNumeric. More...
 

Public Member Functions

 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 ()
 

Properties

double value
 
double maximum
 
double minimum
 
int integerDigits
 
int decimalDigits
 
Qt::Orientation buttonPos
 
QString buttonText
 
QFont numericFont
 
bool applyButtonActive
 

Detailed Description

a widget to set a value and write it

this widget includes a ENumeric and a EApplyButton, it connects the signal valueChanged(double) of the former with the slot valueModified(double) of the latter

it emits the signal clicked(double) when the button is clicked

Constructor & Destructor Documentation

◆ EApplyNumeric()

EApplyNumeric::EApplyNumeric ( QWidget *  parent,
int  i = 3,
int  d = 1,
Qt::Orientation  pos = Qt::Horizontal 
)

References buttonPos.

◆ ~EApplyNumeric()

EApplyNumeric::~EApplyNumeric ( )
inline

Member Function Documentation

◆ applyButtonActive()

bool EApplyNumeric::applyButtonActive ( )
inline

returns the behaviour of the Apply button after a change in the value of the numeric widget

Returns
true if the Apply button becomes red after a value change on the numeric widget.
false if the Apply button does not change after a value change on the numeric widget.
See also
setApplyButtonActive

◆ applyValue

void EApplyNumeric::applyValue ( )
virtualslot

References clicked(), and ENumeric::value.

◆ buttonPosition()

Qt::Orientation EApplyNumeric::buttonPosition ( ) const
inline

returns wheter the button is on the right side of the numeric widget or at the bottom

Returns
Horizontal or Vertical

References buttonPos.

◆ buttonText()

QString EApplyNumeric::buttonText ( ) const
inline

returns the text displyed in the button

Returns
text displayed

◆ clearModified

void EApplyNumeric::clearModified ( )
inlineslot

◆ clicked

void EApplyNumeric::clicked ( double  )
signal

signal emitted when the button is clicked, the parameter is the value displayed by the widget

Referenced by applyValue().

◆ decDigits()

int EApplyNumeric::decDigits ( ) const
inline

returns number of decimal digits displayed

Returns
d number of digits

References ENumeric::decDigits().

◆ digitsFontScaleEnabled()

bool EApplyNumeric::digitsFontScaleEnabled ( )

◆ disable

void EApplyNumeric::disable ( )
inlineslot

◆ getButton()

QWidget * EApplyNumeric::getButton ( ) const
inline

◆ intDigits()

int EApplyNumeric::intDigits ( ) const
inline

returns number of integer digits displayed

Returns
i number of digits

References ENumeric::intDigits().

◆ isModified()

bool EApplyNumeric::isModified ( )

returns the state of the ApplyNumeric.

Returns
true if the value was modified since last click
false if the value has never been modified after last Apply click.

◆ maximum()

double EApplyNumeric::maximum ( ) const
inline

returns the maximum value of the widget

Returns
max val

References ENumeric::maximum.

◆ minimum()

double EApplyNumeric::minimum ( ) const
inline

returns the minimum value of the widget

Returns
min val

References ENumeric::minimum.

◆ minimumSizeHint()

QSize EApplyNumeric::minimumSizeHint ( ) const

◆ numericFont()

QFont EApplyNumeric::numericFont ( ) const
inline

◆ setApplyButtonActive()

void EApplyNumeric::setApplyButtonActive ( bool  en)
inline

changes the behaviour of the Apply button.

Normally, when the value on the numeric widget changes, the button becomes red, to highlight that the value has changed since the last click on the Apply button itself.

Parameters
enif true the button becomes red when the value changes if false, the value change on the numeric widget does not make the apply button change its color.

Observation: disabling this property does not mean that the Apply button is disabled too. If clicked, it will still apply the value displayed in the numeric widget.

Note: introduced in qtcontrols version 4.x.

◆ setButtonPosition()

void EApplyNumeric::setButtonPosition ( Qt::Orientation  pos)
inline

sets whether the button is on the right side of the numeric widget or at the bottom

Parameters
posHorizontal or Vertical

References buttonPos.

◆ setButtonText()

void EApplyNumeric::setButtonText ( const QString &  s)
inline

sets text displayed in the button

Parameters
stext to be displayed

◆ setDecDigits()

void EApplyNumeric::setDecDigits ( int  d)
inline

sets number of decimal digits to be displayed

Parameters
dnumber of digits

References ENumeric::setDecDigits().

Referenced by QuApplyNumeric::onUpdate().

◆ setDigitsFontScaleEnabled()

void EApplyNumeric::setDigitsFontScaleEnabled ( bool  en)

◆ setFont

void EApplyNumeric::setFont ( const QFont &  f)
virtualslot

◆ setIntDigits()

void EApplyNumeric::setIntDigits ( int  i)
inline

sets number of integer digits to be displayed

Parameters
inumber of digits

References ENumeric::setIntDigits().

Referenced by QuApplyNumeric::onUpdate().

◆ setMaximum()

void EApplyNumeric::setMaximum ( double  v)
inline

sets the maximum value of the widget

Parameters
vmax val

References ENumeric::setMaximum().

Referenced by QuApplyNumeric::onUpdate().

◆ setMinimum()

void EApplyNumeric::setMinimum ( double  v)
inline

sets the minimum value of the widget

Parameters
vmin val

References ENumeric::setMinimum().

Referenced by QuApplyNumeric::onUpdate().

◆ setNumericFont()

void EApplyNumeric::setNumericFont ( const QFont  f)
inline

◆ setValue()

void EApplyNumeric::setValue ( double  v)
inline

sets value displayed by the widget

Parameters
vthe value to be displayed

References ENumeric::setValue().

Referenced by QuApplyNumeric::onUpdate().

◆ sizeHint()

QSize EApplyNumeric::sizeHint ( ) const

References ENumeric::sizeHint().

◆ updateMaxMinAuto()

void EApplyNumeric::updateMaxMinAuto ( )

◆ value()

double EApplyNumeric::value ( ) const
inline

returns the value displayed by the widget

Returns
the value displayed

References ENumeric::value.

◆ valueChanged

void EApplyNumeric::valueChanged ( double  value)
signal

signal emitted when the displayed value changes on the TApplyNumeric.

Parameters
valuethe new value

Property Documentation

◆ applyButtonActive

bool EApplyNumeric::applyButtonActive
readwrite

◆ buttonPos

Qt::Orientation EApplyNumeric::buttonPos
readwrite

◆ buttonText

QString EApplyNumeric::buttonText
readwrite

◆ decimalDigits

int EApplyNumeric::decimalDigits
readwrite

◆ integerDigits

int EApplyNumeric::integerDigits
readwrite

◆ maximum

double EApplyNumeric::maximum
readwrite

◆ minimum

double EApplyNumeric::minimum
readwrite

◆ numericFont

QFont EApplyNumeric::numericFont
readwrite

◆ value

double EApplyNumeric::value
readwrite

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