mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 23:58:18 +00:00
show balance in sendcoins screen (issue #24)
This commit is contained in:
parent
9b490f71b0
commit
b8afa21fad
@ -75,6 +75,30 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Balance:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="labelBalance">
|
||||||
|
<property name="text">
|
||||||
|
<string>123.456 BTC</string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -36,6 +36,9 @@ void SendCoinsDialog::setModel(WalletModel *model)
|
|||||||
entry->setModel(model);
|
entry->setModel(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setBalance(model->getBalance(), model->getUnconfirmedBalance());
|
||||||
|
connect(model, SIGNAL(balanceChanged(qint64, qint64)), this, SLOT(setBalance(qint64, qint64)));
|
||||||
}
|
}
|
||||||
|
|
||||||
SendCoinsDialog::~SendCoinsDialog()
|
SendCoinsDialog::~SendCoinsDialog()
|
||||||
@ -241,3 +244,10 @@ void SendCoinsDialog::handleURL(const QUrl *url)
|
|||||||
}
|
}
|
||||||
pasteEntry(rv);
|
pasteEntry(rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SendCoinsDialog::setBalance(qint64 balance, qint64 unconfirmedBalance)
|
||||||
|
{
|
||||||
|
Q_UNUSED(unconfirmedBalance);
|
||||||
|
int unit = model->getOptionsModel()->getDisplayUnit();
|
||||||
|
ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance));
|
||||||
|
}
|
||||||
|
@ -37,6 +37,7 @@ public slots:
|
|||||||
void accept();
|
void accept();
|
||||||
SendCoinsEntry *addEntry();
|
SendCoinsEntry *addEntry();
|
||||||
void updateRemoveEnabled();
|
void updateRemoveEnabled();
|
||||||
|
void setBalance(qint64 balance, qint64 unconfirmedBalance);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::SendCoinsDialog *ui;
|
Ui::SendCoinsDialog *ui;
|
||||||
|
Loading…
Reference in New Issue
Block a user