Mantid
Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
MantidQt::API::QScienceSpinBox Class Reference

#include <QScienceSpinBox.h>

Inheritance diagram for MantidQt::API::QScienceSpinBox:

Public Slots

void stepDown ()
 
void stepUp ()
 

Signals

void valueChangedFromArrows ()
 

Public Member Functions

int decimals () const
 
 QScienceSpinBox (QWidget *parent=nullptr)
 
void setDecimals (int value)
 
void setLogSteps (bool logSteps)
 
QString textFromValue (double value) const override
 text to be displayed in spinbox More...
 
double valueFromText (const QString &text) const override
 

Private Member Functions

void fixup (QString &input) const override
 
void initLocalValues (QWidget *parent)
 
bool isIntermediateValue (const QString &str) const
 
double round (double value) const
 Round. More...
 
void stepBy (int steps) override
 
QString stripped (const QString &t, int *pos) const
 
QValidator::State validate (QString &text, int &pos) const override
 
QVariant validateAndInterpret (QString &input, int &pos, QValidator::State &state) const
 

Private Attributes

QChar delimiter
 
int dispDecimals
 
bool m_logSteps
 Will step in a log way (multiplicatively) More...
 
QChar thousand
 
QDoubleValidator * v
 

Detailed Description

Definition at line 21 of file QScienceSpinBox.h.

Constructor & Destructor Documentation

◆ QScienceSpinBox()

MantidQt::API::QScienceSpinBox::QScienceSpinBox ( QWidget *  parent = nullptr)

Definition at line 73 of file QScienceSpinBox.cpp.

References initLocalValues(), setDecimals(), and v.

Member Function Documentation

◆ decimals()

int MantidQt::API::QScienceSpinBox::decimals ( ) const

Definition at line 100 of file QScienceSpinBox.cpp.

References dispDecimals.

Referenced by isIntermediateValue().

◆ fixup()

void MantidQt::API::QScienceSpinBox::fixup ( QString &  input) const
overrideprivate

Definition at line 170 of file QScienceSpinBox.cpp.

References thousand.

◆ initLocalValues()

void MantidQt::API::QScienceSpinBox::initLocalValues ( QWidget *  parent)
private

Definition at line 88 of file QScienceSpinBox.cpp.

References delimiter, and thousand.

Referenced by QScienceSpinBox().

◆ isIntermediateValue()

bool MantidQt::API::QScienceSpinBox::isIntermediateValue ( const QString &  str) const
private

determine minimum possible values on left and right of Decimal-char

determine left and right long values (left and right of delimiter)

Definition at line 174 of file QScienceSpinBox.cpp.

References decimals(), delimiter, MantidQt::API::isIntermediateValueHelper(), left, QSBDEBUG, and right.

Referenced by validateAndInterpret().

◆ round()

double MantidQt::API::QScienceSpinBox::round ( double  value) const
private

Round.

Parameters
valueValue to round.
Returns
rounded value

Definition at line 156 of file QScienceSpinBox.cpp.

References dispDecimals, and value.

◆ setDecimals()

void MantidQt::API::QScienceSpinBox::setDecimals ( int  value)

Definition at line 102 of file QScienceSpinBox.cpp.

References dispDecimals, and value.

Referenced by QScienceSpinBox().

◆ setLogSteps()

void MantidQt::API::QScienceSpinBox::setLogSteps ( bool  logSteps)

Definition at line 112 of file QScienceSpinBox.cpp.

References m_logSteps.

◆ stepBy()

void MantidQt::API::QScienceSpinBox::stepBy ( int  steps)
overrideprivate

Definition at line 105 of file QScienceSpinBox.cpp.

References stepDown(), and stepUp().

◆ stepDown

void MantidQt::API::QScienceSpinBox::stepDown ( )
slot

Definition at line 114 of file QScienceSpinBox.cpp.

References m_logSteps, value, and valueChangedFromArrows().

Referenced by stepBy().

◆ stepUp

void MantidQt::API::QScienceSpinBox::stepUp ( )
slot

Definition at line 122 of file QScienceSpinBox.cpp.

References m_logSteps, value, and valueChangedFromArrows().

Referenced by stepBy().

◆ stripped()

QString MantidQt::API::QScienceSpinBox::stripped ( const QString &  t,
int *  pos 
) const
private

Definition at line 503 of file QScienceSpinBox.cpp.

Referenced by validateAndInterpret().

◆ textFromValue()

QString MantidQt::API::QScienceSpinBox::textFromValue ( double  value) const
override

text to be displayed in spinbox

Definition at line 133 of file QScienceSpinBox.cpp.

References dispDecimals, thousand, and value.

◆ validate()

QValidator::State MantidQt::API::QScienceSpinBox::validate ( QString &  text,
int &  pos 
) const
overrideprivate

Definition at line 163 of file QScienceSpinBox.cpp.

References validateAndInterpret().

◆ validateAndInterpret()

QVariant MantidQt::API::QScienceSpinBox::validateAndInterpret ( QString &  input,
int &  pos,
QValidator::State &  state 
) const
private

return 'cachedText' if input = cachedText, or input Empty

Definition at line 290 of file QScienceSpinBox.cpp.

References delimiter, isIntermediateValue(), QSBDEBUG, stripped(), and thousand.

Referenced by validate(), and valueFromText().

◆ valueChangedFromArrows

void MantidQt::API::QScienceSpinBox::valueChangedFromArrows ( )
signal

Referenced by stepDown(), and stepUp().

◆ valueFromText()

double MantidQt::API::QScienceSpinBox::valueFromText ( const QString &  text) const
override

Definition at line 144 of file QScienceSpinBox.cpp.

References validateAndInterpret().

Member Data Documentation

◆ delimiter

QChar MantidQt::API::QScienceSpinBox::delimiter
private

Definition at line 36 of file QScienceSpinBox.h.

Referenced by initLocalValues(), isIntermediateValue(), and validateAndInterpret().

◆ dispDecimals

int MantidQt::API::QScienceSpinBox::dispDecimals
private

Definition at line 35 of file QScienceSpinBox.h.

Referenced by decimals(), round(), setDecimals(), and textFromValue().

◆ m_logSteps

bool MantidQt::API::QScienceSpinBox::m_logSteps
private

Will step in a log way (multiplicatively)

Definition at line 39 of file QScienceSpinBox.h.

Referenced by setLogSteps(), stepDown(), and stepUp().

◆ thousand

QChar MantidQt::API::QScienceSpinBox::thousand
private

Definition at line 36 of file QScienceSpinBox.h.

Referenced by fixup(), initLocalValues(), textFromValue(), and validateAndInterpret().

◆ v

QDoubleValidator* MantidQt::API::QScienceSpinBox::v
private

Definition at line 37 of file QScienceSpinBox.h.

Referenced by QScienceSpinBox().


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