Toolbox Qt
Loading...
Searching...
No Matches
tbq::GaugeTargetStyle Class Reference

Allow to set style of a GaugeTarget widget. More...

Public Types

enum  GaugeElement {
  GAUGE_ZONE_BAR = 0 , GAUGE_ZONE_TOLERANCE , GAUGE_MARK_TARGET_CURSOR , GAUGE_MARK_TARGET_TEXT ,
  GAUGE_MARK_VALUE_CURSOR_OK , GAUGE_MARK_VALUE_CURSOR_KO , GAUGE_MARK_VALUE_TEXT_OK , GAUGE_MARK_VALUE_TEXT_KO ,
  GAUGE_NB_ELEMENTS
}
 

Public Member Functions

 GaugeTargetStyle ()
 Construct a gauge target style element.
 
QColor getColor (GaugeElement idElement) const
 Retrieve color of a gauge element.
 
int getMargins () const
 Retrieve margins used by the gauge.
 
double getMarkFactor () const
 Retrieve factor used for cursors marks.
 
void reset ()
 Reset style to default values.
 
void setColor (GaugeElement idElement, const QColor &color)
 Use to set color of a gauge element.
 
void setMargins (int margins)
 Use to set margins used by the gauge.
 
void setMarkFactor (double factor)
 Retrieve factor used for cursors marks.
 

Detailed Description

Allow to set style of a GaugeTarget widget.

See also
GaugeTarget

Constructor & Destructor Documentation

◆ GaugeTargetStyle()

tbq::GaugeTargetStyle::GaugeTargetStyle ( )

Construct a gauge target style element.

Contains default style of a gauge target.

See also
reset()

Member Function Documentation

◆ getColor()

QColor tbq::GaugeTargetStyle::getColor ( GaugeElement idElement) const

Retrieve color of a gauge element.

Parameters
[in]idElementElement ID to retrieve the color.
If unknown ID, color Qt::gray is returned.
Returns
Returns color associated to selected element.
See also
setColor()
getMargins(), getMarkFactor()

◆ getMargins()

int tbq::GaugeTargetStyle::getMargins ( ) const

Retrieve margins used by the gauge.

Returns
Returns margins used by the gauge.
See also
setMargins()
getColor(), getMarkFactor()

◆ getMarkFactor()

double tbq::GaugeTargetStyle::getMarkFactor ( ) const

Retrieve factor used for cursors marks.

Mark correspond to cursors (current value, target, etc...).
The factor (coefficient) is used to determine the size used by cursors

Returns
Returns factor used for marks elements.
See also
setMarkFactor()
getMargins(), getColor()

◆ setColor()

void tbq::GaugeTargetStyle::setColor ( GaugeElement idElement,
const QColor & color )

Use to set color of a gauge element.

Parameters
[in]idElementElement ID for which to set the color
[in]colorColor to use.
See also
getColor()
setMargins(), setMarkFactor()

◆ setMargins()

void tbq::GaugeTargetStyle::setMargins ( int margins)

Use to set margins used by the gauge.

Parameters
[in]marginsMargins to use in pixels.
If value is negative, margins will be set to 0.
See also
getMargins()
setColor(), setMarkFactor()

◆ setMarkFactor()

void tbq::GaugeTargetStyle::setMarkFactor ( double factor)

Retrieve factor used for cursors marks.

Mark correspond to cursors (current value, target, etc...).
The factor (coefficient) is used to determine the size used by cursors

Returns
Returns factor used for marks elements.
See also
setMarkFactor()
getMargins(), getColor()

Set factor used for cursors marks.

Mark correspond to cursors (current value, target, etc...).
The factor (coefficient) is used to determine the size used by cursors.

Parameters
[in]factorFactor coefficient to use for mark cursors.
Value will be clamped in range [0.0 ; 10.0]
See also
getMarkFactor()
setColor(), setMargins()

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