11 /** Widget for entering bitcoin amounts.
13 class BitcoinAmountField: public QWidget
16 Q_PROPERTY(qint64 value READ value WRITE setValue NOTIFY textChanged USER true)
18 explicit BitcoinAmountField(QWidget *parent = 0);
20 qint64 value(bool *valid=0) const;
21 void setValue(qint64 value);
23 /** Mark current value as invalid in UI. */
24 void setValid(bool valid);
25 /** Perform input validation, mark field as invalid if entered value is not valid. */
28 /** Change unit used to display amount. */
29 void setDisplayUnit(int unit);
31 /** Make field empty and ready for new input. */
34 /** Qt messes up the tab chain by default in some cases (issue http://bugreports.qt.nokia.com/browse/QTBUG-10907),
35 in these cases we have to set it up manually.
37 QWidget *setupTabChain(QWidget *prev);
43 /** Intercept focus-in event and ',' keypresses */
44 bool eventFilter(QObject *object, QEvent *event);
47 QDoubleSpinBox *amount;
51 void setText(const QString &text);
55 void unitChanged(int idx);
60 #endif // BITCOINFIELD_H