mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-12 13:43:43 +01:00
qt, refactor: Make BitcoinUnits::Unit a scoped enum
This commit is contained in:
committed by
William Casarin
parent
75832fdc37
commit
aa23960fdf
@@ -34,9 +34,9 @@ class TxViewDelegate : public QAbstractItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TxViewDelegate(const PlatformStyle *_platformStyle, QObject *parent=nullptr):
|
||||
QAbstractItemDelegate(parent), unit(BitcoinUnits::BTC),
|
||||
platformStyle(_platformStyle)
|
||||
explicit TxViewDelegate(const PlatformStyle* _platformStyle, QObject* parent = nullptr)
|
||||
: QAbstractItemDelegate(parent), unit(BitcoinUnit::BTC),
|
||||
platformStyle(_platformStyle)
|
||||
{
|
||||
connect(this, &TxViewDelegate::width_changed, this, &TxViewDelegate::sizeHintChanged);
|
||||
}
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
return {DECORATION_SIZE + 8 + minimum_text_width, DECORATION_SIZE};
|
||||
}
|
||||
|
||||
int unit;
|
||||
BitcoinUnit unit;
|
||||
|
||||
Q_SIGNALS:
|
||||
//! An intermediate signal for emitting from the `paint() const` member function.
|
||||
@@ -197,7 +197,7 @@ OverviewPage::~OverviewPage()
|
||||
|
||||
void OverviewPage::setBalance(const interfaces::WalletBalances& balances)
|
||||
{
|
||||
int unit = walletModel->getOptionsModel()->getDisplayUnit();
|
||||
BitcoinUnit unit = walletModel->getOptionsModel()->getDisplayUnit();
|
||||
m_balances = balances;
|
||||
if (walletModel->wallet().isLegacy()) {
|
||||
if (walletModel->wallet().privateKeysDisabled()) {
|
||||
|
||||
Reference in New Issue
Block a user