add 2 labels to the overviewpage that display Wallet and Transaction status (obsolete or current) / cleanup overviewpage XML ui-file

This commit is contained in:
Philip Kaufmann committed 2012-05-17 21:49:32 +02:00
1 parent cf2f7c30a3
commit c26f3a9bd1
4 files changed
+98 -46

No files matched your search

+15
View File
@@ -105,6 +105,15 @@ OverviewPage::OverviewPage(QWidget *parent) :
ui->listTransactions->setAttribute(Qt::WA_MacShowFocusRect, false);
connect(ui->listTransactions, SIGNAL(clicked(QModelIndex)), this, SLOT(handleTransactionClicked(QModelIndex)));
// init "out of sync" warning labels
ui->labelWalletStatus->setText("(" + tr("out of sync") + ")");
ui->labelWalletStatus->setStyleSheet("QLabel { color: red; }");
ui->labelTransactionsStatus->setText("(" + tr("out of sync") + ")");
ui->labelTransactionsStatus->setStyleSheet("QLabel { color: red; }");
// start with displaying the "out of sync" warnings
showOutOfSyncWarning(true);
}
void OverviewPage::handleTransactionClicked(const QModelIndex &index)
@@ -169,3 +178,9 @@ void OverviewPage::displayUnitChanged()
txdelegate->unit = model->getOptionsModel()->getDisplayUnit();
ui->listTransactions->update();
}
void OverviewPage::showOutOfSyncWarning(bool fShow)
{
ui->labelWalletStatus->setVisible(fShow);
ui->labelTransactionsStatus->setVisible(fShow);
}