Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

Widget for entering bitcoin amounts. More...

#include <bitcoinamountfield.h>

+ Inheritance diagram for BitcoinAmountField:
+ Collaboration diagram for BitcoinAmountField:

Signals

void valueChanged ()
 

Public Member Functions

 BitcoinAmountField (QWidget *parent=0)
 
CAmount value (bool *value=0) const
 
void setValue (const CAmount &value)
 
void setReadOnly (bool fReadOnly)
 Make read-only. More...
 
void setValid (bool valid)
 Mark current value as invalid in UI. More...
 
bool validate ()
 Perform input validation, mark field as invalid if entered value is not valid. More...
 
void setDisplayUnit (int unit)
 Change unit used to display amount. More...
 
void clear ()
 Make field empty and ready for new input. More...
 
void setEnabled (bool fEnabled)
 Enable/Disable. More...
 
QWidget * setupTabChain (QWidget *prev)
 Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907), in these cases we have to set it up manually. More...
 

Protected Member Functions

bool eventFilter (QObject *object, QEvent *event)
 Intercept focus-in event and ',' key presses. More...
 

Properties

qint64 value
 

Private Member Functions

void unitChanged (int idx)
 

Private Attributes

AmountLineEditamount
 
BitcoinUnitsunits
 

Detailed Description

Widget for entering bitcoin amounts.

Definition at line 22 of file bitcoinamountfield.h.

Constructor & Destructor Documentation

◆ BitcoinAmountField()

BitcoinAmountField::BitcoinAmountField ( QWidget *  parent = 0)
explicit

Definition at line 159 of file bitcoinamountfield.cpp.

References amount, units, and valueChanged().

Member Function Documentation

◆ clear()

void BitcoinAmountField::clear ( )

Make field empty and ready for new input.

Definition at line 184 of file bitcoinamountfield.cpp.

References amount.

◆ eventFilter()

bool BitcoinAmountField::eventFilter ( QObject *  object,
QEvent *  event 
)
protected

Intercept focus-in event and ',' key presses.

Definition at line 210 of file bitcoinamountfield.cpp.

References setValid().

◆ setDisplayUnit()

void BitcoinAmountField::setDisplayUnit ( int  unit)

Change unit used to display amount.

Definition at line 254 of file bitcoinamountfield.cpp.

References unitChanged().

◆ setEnabled()

void BitcoinAmountField::setEnabled ( bool  fEnabled)

Enable/Disable.

Definition at line 189 of file bitcoinamountfield.cpp.

References amount.

◆ setReadOnly()

void BitcoinAmountField::setReadOnly ( bool  fReadOnly)

Make read-only.

Definition at line 236 of file bitcoinamountfield.cpp.

References amount.

◆ setupTabChain()

QWidget * BitcoinAmountField::setupTabChain ( QWidget *  prev)

Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907), in these cases we have to set it up manually.

Definition at line 220 of file bitcoinamountfield.cpp.

References amount.

◆ setValid()

void BitcoinAmountField::setValid ( bool  valid)

Mark current value as invalid in UI.

Definition at line 202 of file bitcoinamountfield.cpp.

References amount, GUIUtil::getThemedStyleQString(), and GUIUtil::TS_INVALID.

Referenced by eventFilter(), and validate().

◆ setValue()

void BitcoinAmountField::setValue ( const CAmount value)

Definition at line 231 of file bitcoinamountfield.cpp.

References amount, AmountLineEdit::setValue(), and value.

◆ unitChanged()

void BitcoinAmountField::unitChanged ( int  idx)
private

◆ validate()

bool BitcoinAmountField::validate ( )

Perform input validation, mark field as invalid if entered value is not valid.

Definition at line 194 of file bitcoinamountfield.cpp.

References setValid(), and value.

◆ value()

CAmount BitcoinAmountField::value ( bool *  value = 0) const

Definition at line 226 of file bitcoinamountfield.cpp.

References amount, and AmountLineEdit::value().

◆ valueChanged

void BitcoinAmountField::valueChanged ( )
signal

Referenced by BitcoinAmountField().

Member Data Documentation

◆ amount

AmountLineEdit* BitcoinAmountField::amount
private

◆ units

BitcoinUnits* BitcoinAmountField::units
private

Definition at line 67 of file bitcoinamountfield.h.

Referenced by BitcoinAmountField(), and unitChanged().

Property Documentation

◆ value

qint64 BitcoinAmountField::value
readwrite

Definition at line 28 of file bitcoinamountfield.h.

Referenced by setValue(), and validate().


The documentation for this class was generated from the following files:
Released under the MIT license