diff options
Diffstat (limited to 'src/qt/bitcoinamountfield.cpp')
-rw-r--r-- | src/qt/bitcoinamountfield.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp index d9d4e3b23d..6b083331d3 100644 --- a/src/qt/bitcoinamountfield.cpp +++ b/src/qt/bitcoinamountfield.cpp @@ -1,14 +1,17 @@ +// Copyright (c) 2011-2013 The Bitcoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #include "bitcoinamountfield.h" -#include "qvaluecombobox.h" #include "bitcoinunits.h" #include "guiconstants.h" +#include "qvaluecombobox.h" #include <QApplication> +#include <QDoubleSpinBox> #include <QHBoxLayout> #include <QKeyEvent> -#include <QDoubleSpinBox> - #include <qmath.h> // for qPow() BitcoinAmountField::BitcoinAmountField(QWidget *parent): @@ -130,9 +133,10 @@ void BitcoinAmountField::setValue(qint64 value) setText(BitcoinUnits::format(currentUnit, value)); } -void BitcoinAmountField::setReadOnly(bool fReadeOnly) +void BitcoinAmountField::setReadOnly(bool fReadOnly) { - // TODO ... + amount->setReadOnly(fReadOnly); + unit->setEnabled(!fReadOnly); } void BitcoinAmountField::unitChanged(int idx) |