aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoinamountfield.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-07-29 14:36:35 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-07-29 14:36:35 +0200
commitee014e5b10f5f65820ff056311051ff49813b294 (patch)
treed9c0dd04b021c2c828bf55ba6ff33d93d07b5276 /src/qt/bitcoinamountfield.h
parentb5b1d1a66b9f418c9fb293cb1cc3eac09a711c4e (diff)
Full support for other units, add configuration option for default unit (used when displaying amounts)
Diffstat (limited to 'src/qt/bitcoinamountfield.h')
-rw-r--r--src/qt/bitcoinamountfield.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h
index 6e724d06ae..cc92159fed 100644
--- a/src/qt/bitcoinamountfield.h
+++ b/src/qt/bitcoinamountfield.h
@@ -5,7 +5,7 @@
QT_BEGIN_NAMESPACE
class QValidatedLineEdit;
-class QComboBox;
+class QValueComboBox;
QT_END_NAMESPACE
// Coin amount entry widget with separate parts for whole
@@ -13,7 +13,6 @@ QT_END_NAMESPACE
class BitcoinAmountField: public QWidget
{
Q_OBJECT
- //Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged USER true);
Q_PROPERTY(qint64 value READ value WRITE setValue NOTIFY textChanged USER true);
public:
explicit BitcoinAmountField(QWidget *parent = 0);
@@ -25,6 +24,9 @@ public:
void setValid(bool valid);
bool validate();
+ // Change current unit
+ void setDisplayUnit(int unit);
+
// Make field empty and ready for new input
void clear();
@@ -42,7 +44,7 @@ protected:
private:
QValidatedLineEdit *amount;
QValidatedLineEdit *decimals;
- QComboBox *unit;
+ QValueComboBox *unit;
int currentUnit;
void setText(const QString &text);