SHAPER  9.12.0
ModuleBase_LabelValue Class Reference

Implementation of model widget for a label control. More...

Inheritance diagram for ModuleBase_LabelValue:
Inheritance graph

Public Member Functions

 ModuleBase_LabelValue (QWidget *theParent, const QString &theText, const QString &theToolTip="", const QString &theIcon="", int thePrecision=-12)
 Constructor. More...
 
void setValue (const double theValue)
 Fills the label value with the given value. More...
 
double value () const
 Returns double value. More...
 

Protected Attributes

QLabelmyLabel
 A label information control. More...
 
QLabelmyLabelValue
 A label value control. More...
 
double myValue
 A cashed value to avoid a string conversion. More...
 
int myPrecision
 Precision value. More...
 

Detailed Description

Implementation of model widget for a label control.

Constructor & Destructor Documentation

◆ ModuleBase_LabelValue()

ModuleBase_LabelValue::ModuleBase_LabelValue ( QWidget theParent,
const QString &  theText,
const QString &  theToolTip = "",
const QString &  theIcon = "",
int  thePrecision = -12 
)

Constructor.

Parameters
theParentthe parent object
theTexta text value
theToolTipa tool tip value
theIcona icon value

Member Function Documentation

◆ setValue()

void ModuleBase_LabelValue::setValue ( const double  theValue)

Fills the label value with the given value.

Parameters
theValuea value

◆ value()

double ModuleBase_LabelValue::value ( ) const
inline

Returns double value.

Returns
the value

Field Documentation

◆ myLabel

QLabel* ModuleBase_LabelValue::myLabel
protected

A label information control.

◆ myLabelValue

QLabel* ModuleBase_LabelValue::myLabelValue
protected

A label value control.

◆ myValue

double ModuleBase_LabelValue::myValue
protected

A cashed value to avoid a string conversion.

◆ myPrecision

int ModuleBase_LabelValue::myPrecision
protected

Precision value.