bool confirmed = index.data(TransactionTableModel::ConfirmedRole).toBool();
QVariant value = index.data(Qt::ForegroundRole);
QColor foreground = option.palette.color(QPalette::Text);
+#if QT_VERSION < 0x050000
if(qVariantCanConvert<QColor>(value))
+#else
+ if(value.canConvert(QMetaType::QColor))
+#endif
{
foreground = qvariant_cast<QColor>(value);
}
bool showWatchOnly = watchOnly != 0;
ui->labelBalanceWatchOnly->setVisible(showWatchOnly);
ui->labelBalanceWatchOnlyText->setVisible(showWatchOnly);
+
+}
+
+// show/hide watch-only labels
+void OverviewPage::updateWatchOnlyLabels(bool showWatchOnly)
+{
+ ui->labelBalanceWatchOnly->setVisible(showWatchOnly);
+ ui->labelBalanceWatchOnlyText->setVisible(showWatchOnly);
}
void OverviewPage::setNumTransactions(int count)
connect(model, SIGNAL(numTransactionsChanged(int)), this, SLOT(setNumTransactions(int)));
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
+
+ updateWatchOnlyLabels(model->haveWatchOnly());
+ connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, SLOT(updateWatchOnlyLabels(bool)));
}
// update the display unit, to not use the default ("BTC")