Changeset View
Changeset View
Standalone View
Standalone View
src/qt/coincontroldialog.cpp
Show First 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | void CoinControlDialog::showMenu(const QPoint &point) { | ||||
if (item) { | if (item) { | ||||
contextMenuItem = item; | contextMenuItem = item; | ||||
// disable some items (like Copy Transaction ID, lock, unlock) for tree | // disable some items (like Copy Transaction ID, lock, unlock) for tree | ||||
// roots in context menu | // roots in context menu | ||||
if (item->text(COLUMN_TXID).length() == 64) { | if (item->text(COLUMN_TXID).length() == 64) { | ||||
COutPoint outpoint = buildOutPoint(item); | COutPoint outpoint = buildOutPoint(item); | ||||
// transaction hash is 64 characters (this means its a child node, | // transaction hash is 64 characters (this means it is a child node, | ||||
// so its not a parent node in tree mode) | // so it is not a parent node in tree mode) | ||||
copyTransactionHashAction->setEnabled(true); | copyTransactionHashAction->setEnabled(true); | ||||
if (model->wallet().isLockedCoin(outpoint)) { | if (model->wallet().isLockedCoin(outpoint)) { | ||||
lockAction->setEnabled(false); | lockAction->setEnabled(false); | ||||
unlockAction->setEnabled(true); | unlockAction->setEnabled(true); | ||||
} else { | } else { | ||||
lockAction->setEnabled(true); | lockAction->setEnabled(true); | ||||
unlockAction->setEnabled(false); | unlockAction->setEnabled(false); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 153 Lines • ▼ Show 20 Lines | |||||
void CoinControlDialog::radioListMode(bool checked) { | void CoinControlDialog::radioListMode(bool checked) { | ||||
if (checked && model) { | if (checked && model) { | ||||
updateView(); | updateView(); | ||||
} | } | ||||
} | } | ||||
// checkbox clicked by user | // checkbox clicked by user | ||||
void CoinControlDialog::viewItemChanged(QTreeWidgetItem *item, int column) { | void CoinControlDialog::viewItemChanged(QTreeWidgetItem *item, int column) { | ||||
// transaction hash is 64 characters (this means its a child node, so its | // transaction hash is 64 characters (this means it is a child node, so it | ||||
// not a parent node in tree mode) | // is not a parent node in tree mode) | ||||
if (column == COLUMN_CHECKBOX && item->text(COLUMN_TXID).length() == 64) { | if (column == COLUMN_CHECKBOX && item->text(COLUMN_TXID).length() == 64) { | ||||
COutPoint outpoint = buildOutPoint(item); | COutPoint outpoint = buildOutPoint(item); | ||||
if (item->checkState(COLUMN_CHECKBOX) == Qt::Unchecked) { | if (item->checkState(COLUMN_CHECKBOX) == Qt::Unchecked) { | ||||
coinControl()->UnSelect(outpoint); | coinControl()->UnSelect(outpoint); | ||||
} else if (item->isDisabled()) { | } else if (item->isDisabled()) { | ||||
// locked (this happens if "check all" through parent node) | // locked (this happens if "check all" through parent node) | ||||
item->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked); | item->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked); | ||||
▲ Show 20 Lines • Show All 417 Lines • Show Last 20 Lines |