Bitcoin ABC 0.30.5
P2P Digital Currency
Signals | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
AmountSpinBox Class Reference

QSpinBox that uses fixed-point numbers internally and uses our own formatting/parsing functions. More...

Inheritance diagram for AmountSpinBox:
[legend]
Collaboration diagram for AmountSpinBox:
[legend]

Signals

void valueChanged ()
 

Public Member Functions

 AmountSpinBox (QWidget *parent)
 
QValidator::State validate (QString &text, int &pos) const override
 
void fixup (QString &input) const override
 
Amount value (bool *valid_out=nullptr) const
 
void setValue (const Amount value)
 
void SetAllowEmpty (bool allow)
 
void SetMinValue (const Amount &value)
 
void SetMaxValue (const Amount &value)
 
void stepBy (int steps) override
 
void setDisplayUnit (int unit)
 
void setSingleStep (const Amount step)
 
QSize minimumSizeHint () const override
 

Protected Member Functions

bool event (QEvent *event) override
 
StepEnabled stepEnabled () const override
 

Private Member Functions

Amount parse (const QString &text, bool *valid_out=nullptr) const
 Parse a string into a number of base monetary units and return validity. More...
 

Private Attributes

int currentUnit {BitcoinUnits::base}
 
Amount singleStep {100000 * SATOSHI}
 
QSize cachedMinimumSizeHint
 
bool m_allow_empty {true}
 
Amount m_min_amount {Amount::zero()}
 
Amount m_max_amount {BitcoinUnits::maxMoney()}
 

Detailed Description

QSpinBox that uses fixed-point numbers internally and uses our own formatting/parsing functions.

Definition at line 22 of file bitcoinamountfield.cpp.

Constructor & Destructor Documentation

◆ AmountSpinBox()

AmountSpinBox::AmountSpinBox ( QWidget *  parent)
inlineexplicit

Definition at line 26 of file bitcoinamountfield.cpp.

Member Function Documentation

◆ event()

bool AmountSpinBox::event ( QEvent *  event)
inlineoverrideprotected

Definition at line 175 of file bitcoinamountfield.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fixup()

void AmountSpinBox::fixup ( QString &  input) const
inlineoverride

Definition at line 44 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

◆ minimumSizeHint()

QSize AmountSpinBox::minimumSizeHint ( ) const
inlineoverride

Definition at line 104 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

◆ parse()

Amount AmountSpinBox::parse ( const QString &  text,
bool *  valid_out = nullptr 
) const
inlineprivate

Parse a string into a number of base monetary units and return validity.

Note
Must return 0 if !valid.

Definition at line 160 of file bitcoinamountfield.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetAllowEmpty()

void AmountSpinBox::SetAllowEmpty ( bool  allow)
inline

Definition at line 74 of file bitcoinamountfield.cpp.

Here is the caller graph for this function:

◆ setDisplayUnit()

void AmountSpinBox::setDisplayUnit ( int  unit)
inline

Definition at line 88 of file bitcoinamountfield.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetMaxValue()

void AmountSpinBox::SetMaxValue ( const Amount value)
inline

Definition at line 78 of file bitcoinamountfield.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetMinValue()

void AmountSpinBox::SetMinValue ( const Amount value)
inline

Definition at line 76 of file bitcoinamountfield.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSingleStep()

void AmountSpinBox::setSingleStep ( const Amount  step)
inline

Definition at line 102 of file bitcoinamountfield.cpp.

Here is the caller graph for this function:

◆ setValue()

void AmountSpinBox::setValue ( const Amount  value)
inline

Definition at line 68 of file bitcoinamountfield.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stepBy()

void AmountSpinBox::stepBy ( int  steps)
inlineoverride

Definition at line 80 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

◆ stepEnabled()

StepEnabled AmountSpinBox::stepEnabled ( ) const
inlineoverrideprotected

Definition at line 190 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

◆ validate()

QValidator::State AmountSpinBox::validate ( QString &  text,
int &  pos 
) const
inlineoverride

Definition at line 33 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

◆ value()

Amount AmountSpinBox::value ( bool *  valid_out = nullptr) const
inline

Definition at line 64 of file bitcoinamountfield.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valueChanged

void AmountSpinBox::valueChanged ( )
signal
Here is the caller graph for this function:

Member Data Documentation

◆ cachedMinimumSizeHint

QSize AmountSpinBox::cachedMinimumSizeHint
mutableprivate

Definition at line 150 of file bitcoinamountfield.cpp.

◆ currentUnit

int AmountSpinBox::currentUnit {BitcoinUnits::base}
private

Definition at line 148 of file bitcoinamountfield.cpp.

◆ m_allow_empty

bool AmountSpinBox::m_allow_empty {true}
private

Definition at line 151 of file bitcoinamountfield.cpp.

◆ m_max_amount

Amount AmountSpinBox::m_max_amount {BitcoinUnits::maxMoney()}
private

Definition at line 153 of file bitcoinamountfield.cpp.

◆ m_min_amount

Amount AmountSpinBox::m_min_amount {Amount::zero()}
private

Definition at line 152 of file bitcoinamountfield.cpp.

◆ singleStep

Amount AmountSpinBox::singleStep {100000 * SATOSHI}
private

Definition at line 149 of file bitcoinamountfield.cpp.


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