QT_BEGIN_NAMESPACE
class QValidatedLineEdit;
-class QComboBox;
+class QValueComboBox;
QT_END_NAMESPACE
// Coin amount entry widget with separate parts for whole
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);
void setValid(bool valid);
bool validate();
+ // Change current unit
+ void setDisplayUnit(int unit);
+
// Make field empty and ready for new input
void clear();
private:
QValidatedLineEdit *amount;
QValidatedLineEdit *decimals;
- QComboBox *unit;
+ QValueComboBox *unit;
int currentUnit;
void setText(const QString &text);