Mantid
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Attributes | List of all members
DoubleSpinBox Class Reference

A QDoubleSpinBox allowing to customize numbers display with respect to. More...

#include <DoubleSpinBox.h>

Inheritance diagram for DoubleSpinBox:

Signals

void activated (DoubleSpinBox *)
 Signal emitted when the spin box gains focus.
 
void valueChanged (double d)
 

Public Member Functions

void addSpecialTextMapping (const QString &text, double value)
 
int decimals ()
 
 DoubleSpinBox (const char format='g', QWidget *parent=nullptr)
 Constructor.
 
double getMaximum ()
 
double getMinimum ()
 
void setDecimals (int prec)
 
void setFormat (const char format, int prec=1)
 
void setMaximum (double max)
 
void setMinimum (double min)
 
void setRange (double min, double max)
 
void setSingleStep (double val)
 
bool setValue (double val)
 
QString textFromValue (double value) const
 
QValidator::State validate (QString &input, int &pos) const override
 
double value ()
 

Protected Member Functions

void focusInEvent (QFocusEvent *) override
 
void stepBy (int steps) override
 
StepEnabled stepEnabled () const override
 

Private Slots

void interpretText (bool notify=true)
 

Private Attributes

char d_format
 
double d_max_val
 
double d_min_val
 
int d_prec
 
double d_step
 
double d_value
 
std::map< QString, double > m_specialTextMappings
 

Detailed Description

A QDoubleSpinBox allowing to customize numbers display with respect to.

It allows the user to specify a custom display format.

Definition at line 31 of file DoubleSpinBox.h.

Constructor & Destructor Documentation

◆ DoubleSpinBox()

DoubleSpinBox::DoubleSpinBox ( const char  format = 'g',
QWidget *  parent = nullptr 
)

Constructor.

Parameters
formatformat used to display numbers: has the same meaning as in QLocale::toString ( double i, char f = 'g', int prec = 6 )
parentparent widget (only affects placement of the dialog)

Member Function Documentation

◆ activated

void DoubleSpinBox::activated ( DoubleSpinBox )
signal

Signal emitted when the spin box gains focus.

◆ addSpecialTextMapping()

void DoubleSpinBox::addSpecialTextMapping ( const QString &  text,
double  value 
)

◆ decimals()

int DoubleSpinBox::decimals ( )
inline

Definition at line 51 of file DoubleSpinBox.h.

◆ focusInEvent()

void DoubleSpinBox::focusInEvent ( QFocusEvent *  )
overrideprotected

◆ getMaximum()

double DoubleSpinBox::getMaximum ( )

◆ getMinimum()

double DoubleSpinBox::getMinimum ( )

◆ interpretText

void DoubleSpinBox::interpretText ( bool  notify = true)
privateslot

◆ setDecimals()

void DoubleSpinBox::setDecimals ( int  prec)
inline

Definition at line 52 of file DoubleSpinBox.h.

◆ setFormat()

void DoubleSpinBox::setFormat ( const char  format,
int  prec = 1 
)
inline

Definition at line 60 of file DoubleSpinBox.h.

◆ setMaximum()

void DoubleSpinBox::setMaximum ( double  max)

◆ setMinimum()

void DoubleSpinBox::setMinimum ( double  min)

◆ setRange()

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

◆ setSingleStep()

void DoubleSpinBox::setSingleStep ( double  val)

◆ setValue()

bool DoubleSpinBox::setValue ( double  val)

◆ stepBy()

void DoubleSpinBox::stepBy ( int  steps)
overrideprotected

◆ stepEnabled()

StepEnabled DoubleSpinBox::stepEnabled ( ) const
overrideprotected

◆ textFromValue()

QString DoubleSpinBox::textFromValue ( double  value) const

◆ validate()

QValidator::State DoubleSpinBox::validate ( QString &  input,
int &  pos 
) const
override

◆ value()

double DoubleSpinBox::value ( )

◆ valueChanged

void DoubleSpinBox::valueChanged ( double  d)
signal

Member Data Documentation

◆ d_format

char DoubleSpinBox::d_format
private

Definition at line 84 of file DoubleSpinBox.h.

◆ d_max_val

double DoubleSpinBox::d_max_val
private

Definition at line 86 of file DoubleSpinBox.h.

◆ d_min_val

double DoubleSpinBox::d_min_val
private

Definition at line 85 of file DoubleSpinBox.h.

◆ d_prec

int DoubleSpinBox::d_prec
private

Definition at line 89 of file DoubleSpinBox.h.

◆ d_step

double DoubleSpinBox::d_step
private

Definition at line 88 of file DoubleSpinBox.h.

◆ d_value

double DoubleSpinBox::d_value
private

Definition at line 87 of file DoubleSpinBox.h.

◆ m_specialTextMappings

std::map<QString, double> DoubleSpinBox::m_specialTextMappings
private

Definition at line 93 of file DoubleSpinBox.h.


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