v2.0.0
Loading...
Searching...
No Matches
DISPLIB::ScaleControl Class Reference

Composite slider + spinbox widget for picking a (possibly logarithmic) scale value. More...

#include <scalecontrol.h>

Public Slots

void setValue (double dScale)

Signals

void valueChanged (double dScale)

Public Member Functions

 ScaleControl (const char *label)
 ScaleControl (const char *label, QWidget *parent)
 ScaleControl (const char *label, QWidget *parent, double min, double max)
Ui::ScaleControlWidget * getUI ()
double value () const
void setMaxSensitivityPoint (double s)
void setSensitivity (double s)
void setRange (double min, double max)
void setDecimals (int d)
void invertSlider (bool inverted)

Detailed Description

Composite slider + spinbox widget for picking a (possibly logarithmic) scale value.

Supports linear and log10 mapping, configurable min / max and an optional inverted direction; building block of ScalingView and several other settings panels.

Definition at line 63 of file scalecontrol.h.

Inheritance diagram for DISPLIB::ScaleControl:
Inheritance graph

Constructor & Destructor Documentation

◆ ScaleControl() [1/3]

ScaleControl::ScaleControl ( const char * label)
explicit

Constructs a ScaleControl object who's Qlabel element will be set.

Parameters
[in]labelText for the Qlabel.

Definition at line 34 of file scalecontrol.cpp.

◆ ScaleControl() [2/3]

ScaleControl::ScaleControl ( const char * label,
QWidget * parent )
explicit

Constructs a ScaleControl object who's Qlabel element will be set, and sets the parent of the underlying QWidget.

Parameters
[in]labelText for the Qlabel.
[in]parentParent of widget.

Definition at line 40 of file scalecontrol.cpp.

◆ ScaleControl() [3/3]

ScaleControl::ScaleControl ( const char * label,
QWidget * parent,
double min,
double max )
explicit

Constructs a ScaleControl object who's Qlabel element will be set, and sets the parent of the underlying QWidget. The min and max values for the control will also be initialized.

Parameters
[in]labelText for the Qlabel.
[in]parentParent of widget.
[in]minMin value of the control.
[in]maxMax value of the control.

Definition at line 47 of file scalecontrol.cpp.

Member Function Documentation

◆ getUI()

Ui::ScaleControlWidget * ScaleControl::getUI ( )

getUI Return a pointer to the GUI of the ScaleControl.

Returns
Pointer to the ScaleControlWidget.

Definition at line 103 of file scalecontrol.cpp.

◆ invertSlider()

void ScaleControl::invertSlider ( bool inverted)

Invert the effect of sliding the control slider to the right. Slider right decreases the control value.

Parameters
[in]inverted(True = Invert the slider effect).

Definition at line 152 of file scalecontrol.cpp.

◆ setDecimals()

void ScaleControl::setDecimals ( int d)

Set the number of decimals to show in the spinbox of the control.

Parameters
[in]dNumber of decimals to show in the spinbox.

Definition at line 171 of file scalecontrol.cpp.

◆ setMaxSensitivityPoint()

void ScaleControl::setMaxSensitivityPoint ( double s)

Set the value of the maximum sensitivity point for the non-linear sensitivity curve of the sensor.

Parameters
[in]sMaximum sensitivity value.

Definition at line 117 of file scalecontrol.cpp.

◆ setRange()

void ScaleControl::setRange ( double min,
double max )

Set the range of the Scalecontrol object. Tha it the maximum and minimum values allowed.

Parameters
[in]minMinimum value to be allowed for the Scalecontrol.
[in]maxMaximum value to be allowed for the Scalecontrol.

Definition at line 139 of file scalecontrol.cpp.

◆ setSensitivity()

void ScaleControl::setSensitivity ( double s)

Set the sensitivity value of the non-linear mapping between the control slider and the control value.

Parameters
[in]sSensitivity, between [0, 1].

Definition at line 128 of file scalecontrol.cpp.

◆ setValue

void ScaleControl::setValue ( double dScale)
slot

Set the value of the control.

Parameters
[in]dScaleValue to set the control to.

Definition at line 110 of file scalecontrol.cpp.

◆ value()

double ScaleControl::value ( ) const

Return the value of the control

Returns
value of the control.

Definition at line 242 of file scalecontrol.cpp.

◆ valueChanged

void DISPLIB::ScaleControl::valueChanged ( double dScale)
signal

Signal emitted when the value of the control changes.

Parameters
[in]dScaleThe new value of the control.

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