Vuo  2.3.2
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
VuoDoubleSpinBox Class Reference

Description

A spin box where the buttons can have a different minimum and maximum than the line edit.

Definition at line 15 of file VuoDoubleSpinBox.hh.

Public Member Functions

 VuoDoubleSpinBox (QWidget *parent, int precision)
 Creates a spin box where the buttons and line edit have no minimum and maximum. More...
 
void stepBy (int steps)
 Steps the spin box value up or down, clamping it to be within the buttons' minimum and maximum. More...
 
QString textFromValue (double value) const
 Implementation of the virtual function used by the spin box whenever it needs to display the given value. More...
 
void unsetLineEditBounds ()
 Unsets the minimum and maximum values that can be typed into the line edit. More...
 
void setButtonMinimum (double buttonMinimum)
 Sets the minimum value that can be entered using the buttons. More...
 
void setButtonMaximum (double buttonMaximum)
 Sets the maximum value that can be entered using the buttons. More...
 

Static Public Member Functions

static double sliderToDouble (int sliderMin, int sliderMax, double valueMin, double valueMax, int value)
 Convert an integer range value to a double value. More...
 
static int doubleToSlider (int sliderMin, int sliderMax, double valueMin, double valueMax, double value)
 Convert a double value to an integer range value. More...
 

Protected Member Functions

QAbstractSpinBox::StepEnabled stepEnabled () const
 Determines whether the up and/or down arrows are enabled. More...
 
virtual void hideEvent (QHideEvent *event)
 Don't emit value changed events when hiding event, otherwise Vuo will update and quickly revert the value. More...
 
virtual void focusOutEvent (QFocusEvent *event)
 Don't emit value changed events when focusing out due to window close, otherwise Vuo will update and quickly revert the value. More...
 

Constructor & Destructor Documentation

◆ VuoDoubleSpinBox()

VuoDoubleSpinBox::VuoDoubleSpinBox ( QWidget *  parent,
int  precision 
)

Creates a spin box where the buttons and line edit have no minimum and maximum.

Changed in Vuo 2.0.0:
Added precision argument.

Definition at line 17 of file VuoDoubleSpinBox.cc.

Member Function Documentation

◆ doubleToSlider()

int VuoDoubleSpinBox::doubleToSlider ( int  sliderMin,
int  sliderMax,
double  valueMin,
double  valueMax,
double  value 
)
static

Convert a double value to an integer range value.

Definition at line 117 of file VuoDoubleSpinBox.cc.

◆ focusOutEvent()

void VuoDoubleSpinBox::focusOutEvent ( QFocusEvent *  event)
protectedvirtual

Don't emit value changed events when focusing out due to window close, otherwise Vuo will update and quickly revert the value.

Definition at line 128 of file VuoDoubleSpinBox.cc.

◆ hideEvent()

void VuoDoubleSpinBox::hideEvent ( QHideEvent *  event)
protectedvirtual

Don't emit value changed events when hiding event, otherwise Vuo will update and quickly revert the value.

Definition at line 143 of file VuoDoubleSpinBox.cc.

◆ setButtonMaximum()

void VuoDoubleSpinBox::setButtonMaximum ( double  buttonMaximum)

Sets the maximum value that can be entered using the buttons.

Definition at line 100 of file VuoDoubleSpinBox.cc.

◆ setButtonMinimum()

void VuoDoubleSpinBox::setButtonMinimum ( double  buttonMinimum)

Sets the minimum value that can be entered using the buttons.

Definition at line 92 of file VuoDoubleSpinBox.cc.

◆ sliderToDouble()

double VuoDoubleSpinBox::sliderToDouble ( int  sliderMin,
int  sliderMax,
double  valueMin,
double  valueMax,
int  value 
)
static

Convert an integer range value to a double value.

Definition at line 108 of file VuoDoubleSpinBox.cc.

◆ stepBy()

void VuoDoubleSpinBox::stepBy ( int  steps)

Steps the spin box value up or down, clamping it to be within the buttons' minimum and maximum.

Definition at line 44 of file VuoDoubleSpinBox.cc.

◆ stepEnabled()

QAbstractSpinBox::StepEnabled VuoDoubleSpinBox::stepEnabled ( ) const
protected

Determines whether the up and/or down arrows are enabled.

Definition at line 30 of file VuoDoubleSpinBox.cc.

◆ textFromValue()

QString VuoDoubleSpinBox::textFromValue ( double  value) const

Implementation of the virtual function used by the spin box whenever it needs to display the given value.

Definition at line 70 of file VuoDoubleSpinBox.cc.

◆ unsetLineEditBounds()

void VuoDoubleSpinBox::unsetLineEditBounds ( )

Unsets the minimum and maximum values that can be typed into the line edit.

Definition at line 83 of file VuoDoubleSpinBox.cc.


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