Bitcoin Core  0.15.99
P2P Digital Currency
Signals | Public Member Functions | Protected Member Functions | Properties | Private Slots | Private Attributes | List of all members
BitcoinAmountField Class Reference

Widget for entering bitcoin amounts. More...

#include <bitcoinamountfield.h>

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

Signals

void valueChanged ()
 

Public Member Functions

 BitcoinAmountField (QWidget *parent=0)
 
CAmount value (bool *value=0) const
 
void setValue (const CAmount &value)
 
void setSingleStep (const CAmount &step)
 Set single step in satoshis. More...
 
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 Slots

void unitChanged (int idx)
 

Private Attributes

AmountSpinBoxamount
 
QValueComboBoxunit
 

Detailed Description

Widget for entering bitcoin amounts.

Definition at line 20 of file bitcoinamountfield.h.

Constructor & Destructor Documentation

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

Definition at line 193 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

Member Function Documentation

void BitcoinAmountField::clear ( )

Make field empty and ready for new input.

Definition at line 223 of file bitcoinamountfield.cpp.

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

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

Definition at line 251 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

void BitcoinAmountField::setDisplayUnit ( int  unit)

Change unit used to display amount.

Definition at line 294 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

void BitcoinAmountField::setEnabled ( bool  fEnabled)

Enable/Disable.

Definition at line 229 of file bitcoinamountfield.cpp.

void BitcoinAmountField::setReadOnly ( bool  fReadOnly)

Make read-only.

Definition at line 278 of file bitcoinamountfield.cpp.

void BitcoinAmountField::setSingleStep ( const CAmount step)

Set single step in satoshis.

Definition at line 299 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

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 261 of file bitcoinamountfield.cpp.

void BitcoinAmountField::setValid ( bool  valid)

Mark current value as invalid in UI.

Definition at line 243 of file bitcoinamountfield.cpp.

Here is the caller graph for this function:

void BitcoinAmountField::setValue ( const CAmount value)

Definition at line 273 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

void BitcoinAmountField::unitChanged ( int  idx)
privateslot

Definition at line 283 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool BitcoinAmountField::validate ( )

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

Definition at line 235 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

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

Definition at line 268 of file bitcoinamountfield.cpp.

Here is the call graph for this function:

void BitcoinAmountField::valueChanged ( )
signal

Here is the caller graph for this function:

Member Data Documentation

AmountSpinBox* BitcoinAmountField::amount
private

Definition at line 67 of file bitcoinamountfield.h.

QValueComboBox* BitcoinAmountField::unit
private

Definition at line 68 of file bitcoinamountfield.h.

Property Documentation

qint64 BitcoinAmountField::value
readwrite

Definition at line 26 of file bitcoinamountfield.h.


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