Bitcoin
Signals | Public Member Functions | Protected Member Functions | Properties | Private Slots | Private Attributes | List of all members
BitcoinAmountField Class Reference

#include <bitcoinamountfield.h>

Inheritance diagram for BitcoinAmountField:

Signals

void valueChanged ()
 

Public Member Functions

 BitcoinAmountField (QWidget *parent=nullptr)
 
CAmount value (bool *value=nullptr) const
 
void setValue (const CAmount &value)
 
void SetAllowEmpty (bool allow)
 
void SetMinValue (const CAmount &value)
 
void SetMaxValue (const CAmount &value)
 
void setSingleStep (const CAmount &step)
 
void setReadOnly (bool fReadOnly)
 
void setValid (bool valid)
 
bool validate ()
 
void setDisplayUnit (int unit)
 
void clear ()
 
void setEnabled (bool fEnabled)
 
QWidget * setupTabChain (QWidget *prev)
 

Protected Member Functions

bool eventFilter (QObject *object, QEvent *event)
 

Properties

qint64 value
 

Private Slots

void unitChanged (int idx)
 

Private Attributes

AmountSpinBoxamount
 
QValueComboBoxunit
 

Detailed Description

Widget for entering bitcoin amounts.

Constructor & Destructor Documentation

◆ BitcoinAmountField()

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

Member Function Documentation

◆ clear()

void BitcoinAmountField::clear ( )

Make field empty and ready for new input.

◆ eventFilter()

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

Intercept focus-in event and ',' key presses

◆ SetAllowEmpty()

void BitcoinAmountField::SetAllowEmpty ( bool  allow)

If allow empty is set to false the field will be set to the minimum allowed value if left empty.

◆ setDisplayUnit()

void BitcoinAmountField::setDisplayUnit ( int  unit)

Change unit used to display amount.

◆ setEnabled()

void BitcoinAmountField::setEnabled ( bool  fEnabled)

Enable/Disable.

◆ SetMaxValue()

void BitcoinAmountField::SetMaxValue ( const CAmount value)

Set the maximum value in satoshis

◆ SetMinValue()

void BitcoinAmountField::SetMinValue ( const CAmount value)

Set the minimum value in satoshis

◆ setReadOnly()

void BitcoinAmountField::setReadOnly ( bool  fReadOnly)

Make read-only

◆ setSingleStep()

void BitcoinAmountField::setSingleStep ( const CAmount step)

Set single step in satoshis

◆ 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.

◆ setValid()

void BitcoinAmountField::setValid ( bool  valid)

Mark current value as invalid in UI.

◆ setValue()

void BitcoinAmountField::setValue ( const CAmount value)

◆ unitChanged

void BitcoinAmountField::unitChanged ( int  idx)
privateslot

◆ validate()

bool BitcoinAmountField::validate ( )

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

◆ value()

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

◆ valueChanged

void BitcoinAmountField::valueChanged ( )
signal

Member Data Documentation

◆ amount

AmountSpinBox* BitcoinAmountField::amount
private

◆ unit

QValueComboBox* BitcoinAmountField::unit
private

Property Documentation

◆ value

qint64 BitcoinAmountField::value
readwrite

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