12 /** Widget for entering bitcoin amounts.
14 class BitcoinAmountField: public QWidget
17 Q_PROPERTY(qint64 value READ value WRITE setValue NOTIFY textChanged USER true)
19 explicit BitcoinAmountField(QWidget *parent = 0);
21 qint64 value(bool *valid=0) const;
22 void setValue(qint64 value);
24 /** Mark current value as invalid in UI. */
25 void setValid(bool valid);
26 /** Perform input validation, mark field as invalid if entered value is not valid. */
29 /** Change unit used to display amount. */
30 void setDisplayUnit(int unit);
32 /** Make field empty and ready for new input. */
35 /** Qt messes up the tab chain by default in some cases (issue http://bugreports.qt.nokia.com/browse/QTBUG-10907),
36 in these cases we have to set it up manually.
38 QWidget *setupTabChain(QWidget *prev);
44 /** Intercept focus-in event and ',' keypresses */
45 bool eventFilter(QObject *object, QEvent *event);
48 QDoubleSpinBox *amount;
52 void setText(const QString &text);
56 void unitChanged(int idx);
61 #endif // BITCOINFIELD_H