|
|
@ -152,7 +152,7 @@ void OverviewPage::setNumTransactions(int count) |
|
|
|
void OverviewPage::setModel(WalletModel *model) |
|
|
|
void OverviewPage::setModel(WalletModel *model) |
|
|
|
{ |
|
|
|
{ |
|
|
|
this->model = model; |
|
|
|
this->model = model; |
|
|
|
if(model) |
|
|
|
if(model && model->getOptionsModel()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Set up transaction list
|
|
|
|
// Set up transaction list
|
|
|
|
filter = new TransactionFilterProxy(); |
|
|
|
filter = new TransactionFilterProxy(); |
|
|
@ -172,20 +172,26 @@ void OverviewPage::setModel(WalletModel *model) |
|
|
|
setNumTransactions(model->getNumTransactions()); |
|
|
|
setNumTransactions(model->getNumTransactions()); |
|
|
|
connect(model, SIGNAL(numTransactionsChanged(int)), this, SLOT(setNumTransactions(int))); |
|
|
|
connect(model, SIGNAL(numTransactionsChanged(int)), this, SLOT(setNumTransactions(int))); |
|
|
|
|
|
|
|
|
|
|
|
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(displayUnitChanged())); |
|
|
|
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// update the display unit, to not use the default ("BTC")
|
|
|
|
|
|
|
|
updateDisplayUnit(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void OverviewPage::displayUnitChanged() |
|
|
|
void OverviewPage::updateDisplayUnit() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if(model && model->getOptionsModel()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(!model || !model->getOptionsModel()) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
if(currentBalance != -1) |
|
|
|
if(currentBalance != -1) |
|
|
|
setBalance(currentBalance, currentUnconfirmedBalance, currentImmatureBalance); |
|
|
|
setBalance(currentBalance, currentUnconfirmedBalance, currentImmatureBalance); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Update txdelegate->unit with the current unit
|
|
|
|
txdelegate->unit = model->getOptionsModel()->getDisplayUnit(); |
|
|
|
txdelegate->unit = model->getOptionsModel()->getDisplayUnit(); |
|
|
|
|
|
|
|
|
|
|
|
ui->listTransactions->update(); |
|
|
|
ui->listTransactions->update(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void OverviewPage::showOutOfSyncWarning(bool fShow) |
|
|
|
void OverviewPage::showOutOfSyncWarning(bool fShow) |
|
|
|
{ |
|
|
|
{ |
|
|
|