Changeset View
Changeset View
Standalone View
Standalone View
src/qt/overviewpage.cpp
Show All 20 Lines | |||||
#define DECORATION_SIZE 54 | #define DECORATION_SIZE 54 | ||||
#define NUM_ITEMS 5 | #define NUM_ITEMS 5 | ||||
class TxViewDelegate : public QAbstractItemDelegate { | class TxViewDelegate : public QAbstractItemDelegate { | ||||
Q_OBJECT | Q_OBJECT | ||||
public: | public: | ||||
TxViewDelegate(const PlatformStyle *_platformStyle, | TxViewDelegate(const PlatformStyle *_platformStyle, | ||||
QObject *parent = nullptr) | QObject *parent = nullptr) | ||||
: QAbstractItemDelegate(parent), unit(BitcoinUnits::BCC), | : QAbstractItemDelegate(parent), unit(BitcoinUnits::BCH), | ||||
platformStyle(_platformStyle) {} | platformStyle(_platformStyle) {} | ||||
inline void paint(QPainter *painter, const QStyleOptionViewItem &option, | inline void paint(QPainter *painter, const QStyleOptionViewItem &option, | ||||
const QModelIndex &index) const { | const QModelIndex &index) const { | ||||
painter->save(); | painter->save(); | ||||
QIcon icon = qvariant_cast<QIcon>( | QIcon icon = qvariant_cast<QIcon>( | ||||
index.data(TransactionTableModel::RawDecorationRole)); | index.data(TransactionTableModel::RawDecorationRole)); | ||||
▲ Show 20 Lines • Show All 221 Lines • ▼ Show 20 Lines | if (model && model->getOptionsModel()) { | ||||
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, | connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, | ||||
SLOT(updateDisplayUnit())); | SLOT(updateDisplayUnit())); | ||||
updateWatchOnlyLabels(model->haveWatchOnly()); | updateWatchOnlyLabels(model->haveWatchOnly()); | ||||
connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, | connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, | ||||
SLOT(updateWatchOnlyLabels(bool))); | SLOT(updateWatchOnlyLabels(bool))); | ||||
} | } | ||||
// update the display unit, to not use the default ("BCC") | // update the display unit, to not use the default ("BCH") | ||||
updateDisplayUnit(); | updateDisplayUnit(); | ||||
} | } | ||||
void OverviewPage::updateDisplayUnit() { | void OverviewPage::updateDisplayUnit() { | ||||
if (walletModel && walletModel->getOptionsModel()) { | if (walletModel && walletModel->getOptionsModel()) { | ||||
if (currentBalance != -1) | if (currentBalance != -1) | ||||
setBalance(currentBalance, currentUnconfirmedBalance, | setBalance(currentBalance, currentUnconfirmedBalance, | ||||
currentImmatureBalance, currentWatchOnlyBalance, | currentImmatureBalance, currentWatchOnlyBalance, | ||||
Show All 18 Lines |