Workspace 6.21.5
Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
ScientificDoubleSpinBox Class Reference

#include <DataAnalysis/Widgets/scientificdoublespinbox.h>

Inherits QAbstractSpinBox.

Public Slots

void setValue (double)
 

Signals

void valueChanged (double)
 

Public Member Functions

 ScientificDoubleSpinBox (QWidget *parent=nullptr)
 
 ~ScientificDoubleSpinBox () override
 
void contextMenuEvent (QContextMenuEvent *event) override
 
double getMaximumValue ()
 
double getMinimumValue ()
 
int getNumDecimals () const
 
int getStepMagnitude ()
 
double getValue () const
 
void setMaximumValue (double maximum)
 
void setMinimumValue (double minimum)
 
void setNumDecimals (int num)
 
void setStepMagnitude (int magnitude)
 
void setValue (double value, bool updateData)
 

Protected Member Functions

void stepBy (int steps) override
 
QAbstractSpinBox::StepEnabled stepEnabled () const override
 
QString textFromValue (double value) const
 
double valueFromText (const QString &text) const
 

Properties

int decimals
 
double maximum
 
double minimum
 
int stepMagnitude
 
double value
 

Detailed Description

A double spin box widget which displays numbers in scientific notation

Constructor & Destructor Documentation

◆ ScientificDoubleSpinBox()

ScientificDoubleSpinBox ( QWidget *  parent = nullptr)

◆ ~ScientificDoubleSpinBox()

~ScientificDoubleSpinBox ( )
overridedefault

Member Function Documentation

◆ contextMenuEvent()

void contextMenuEvent ( QContextMenuEvent *  event)
override

Show the settings window when a user right clicks on the spinbox

◆ getMaximumValue()

double getMaximumValue ( )
inline

◆ getMinimumValue()

double getMinimumValue ( )
inline

◆ getNumDecimals()

int getNumDecimals ( ) const
inline

◆ getStepMagnitude()

int getStepMagnitude ( )
inline

◆ getValue()

double getValue ( ) const

Return the current value

◆ setMaximumValue()

void setMaximumValue ( double  maximum)
inline

◆ setMinimumValue()

void setMinimumValue ( double  minimum)
inline

◆ setNumDecimals()

void setNumDecimals ( int  num)
inline

◆ setStepMagnitude()

void setStepMagnitude ( int  magnitude)
inline

◆ setValue() [1/2]

void setValue ( double  value,
bool  updateData 
)

Set the text displayed in the spinbox given a numerical value

Parameters
value- new value that the widget will display
updateData- specifies whether or not an editingFinished() signal should be emitted after new value is set

◆ setValue [2/2]

void setValue ( double  value)
slot

Set the text displayed in the spinbox given a numerical value

Parameters
value- new value that the widget will display

◆ stepBy()

void stepBy ( int  steps)
overrideprotected

Adjust the value when the user clicks on the step up/down

◆ stepEnabled()

QAbstractSpinBox::StepEnabled stepEnabled ( ) const
overrideprotected

Enabled/disable steps when necessary

◆ textFromValue()

QString textFromValue ( double  value) const
protected

Convert a value to text in scientific notation

◆ valueChanged

void valueChanged ( double  )
signal

◆ valueFromText()

double valueFromText ( const QString &  text) const
protected

Convert a value from text

Property Documentation

◆ decimals

int decimals
readwrite

◆ maximum

double maximum
readwrite

◆ minimum

double minimum
readwrite

◆ stepMagnitude

int stepMagnitude
readwrite

◆ value

double value
readwrite