add export functionality for address book / receiving addresses
[novacoin.git] / src / qt / bitcoinamountfield.h
1 #ifndef BITCOINFIELD_H
2 #define BITCOINFIELD_H
3
4 #include <QWidget>
5
6 QT_BEGIN_NAMESPACE
7 class QLineEdit;
8 QT_END_NAMESPACE
9
10 // Coin amount entry widget with separate parts for whole
11 // coins and decimals.
12 class BitcoinAmountField: public QWidget
13 {
14     Q_OBJECT
15     Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged USER true);
16 public:
17     explicit BitcoinAmountField(QWidget *parent = 0);
18
19     void setText(const QString &text);
20     QString text() const;
21
22 signals:
23     void textChanged();
24
25 protected:
26     // Intercept '.' and ',' keys, if pressed focus a specified widget
27     bool eventFilter(QObject *object, QEvent *event);
28
29 private:
30     QLineEdit *amount;
31     QLineEdit *decimals;
32 };
33
34
35 #endif // BITCOINFIELD_H