Bitcoin Core 28.99.0
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
 
CAmount value (bool *valid_out=nullptr) const
 
void setValue (const CAmount &value)
 
void SetAllowEmpty (bool allow)
 
void SetMinValue (const CAmount &value)
 
void SetMaxValue (const CAmount &value)
 
void stepBy (int steps) override
 
void setDisplayUnit (BitcoinUnit unit)
 
void setSingleStep (const CAmount &step)
 
QSize minimumSizeHint () const override
 

Protected Member Functions

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

Private Member Functions

CAmount 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

BitcoinUnit currentUnit {BitcoinUnit::BTC}
 
CAmount singleStep {CAmount(100000)}
 
QSize cachedMinimumSizeHint
 
bool m_allow_empty {true}
 
CAmount m_min_amount {CAmount(0)}
 
CAmount m_max_amount {BitcoinUnits::maxMoney()}
 

Detailed Description

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

Definition at line 24 of file bitcoinamountfield.cpp.

Constructor & Destructor Documentation

◆ AmountSpinBox()

AmountSpinBox::AmountSpinBox ( QWidget *  parent)
inlineexplicit

Definition at line 29 of file bitcoinamountfield.cpp.

Member Function Documentation

◆ event()

bool AmountSpinBox::event ( QEvent *  event)
inlineoverrideprotected

Definition at line 180 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 47 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

◆ minimumSizeHint()

QSize AmountSpinBox::minimumSizeHint ( ) const
inlineoverride

Definition at line 120 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

◆ parse()

CAmount 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 165 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 78 of file bitcoinamountfield.cpp.

Here is the caller graph for this function:

◆ setDisplayUnit()

void AmountSpinBox::setDisplayUnit ( BitcoinUnit  unit)
inline

Definition at line 102 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 CAmount value)
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:

◆ SetMinValue()

void AmountSpinBox::SetMinValue ( const CAmount value)
inline

Definition at line 83 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 CAmount step)
inline

Definition at line 115 of file bitcoinamountfield.cpp.

Here is the caller graph for this function:

◆ setValue()

void AmountSpinBox::setValue ( const CAmount value)
inline

Definition at line 72 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 93 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

◆ stepEnabled()

StepEnabled AmountSpinBox::stepEnabled ( ) const
inlineoverrideprotected

Definition at line 195 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 37 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

◆ value()

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

Definition at line 67 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 155 of file bitcoinamountfield.cpp.

◆ currentUnit

BitcoinUnit AmountSpinBox::currentUnit {BitcoinUnit::BTC}
private

Definition at line 153 of file bitcoinamountfield.cpp.

◆ m_allow_empty

bool AmountSpinBox::m_allow_empty {true}
private

Definition at line 156 of file bitcoinamountfield.cpp.

◆ m_max_amount

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

Definition at line 158 of file bitcoinamountfield.cpp.

◆ m_min_amount

CAmount AmountSpinBox::m_min_amount {CAmount(0)}
private

Definition at line 157 of file bitcoinamountfield.cpp.

◆ singleStep

CAmount AmountSpinBox::singleStep {CAmount(100000)}
private

Definition at line 154 of file bitcoinamountfield.cpp.


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