mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-23 03:59:29 +00:00
Coins: copy label
This commit is contained in:
parent
d3e55c4510
commit
874748ea7f
4 changed files with 9 additions and 5 deletions
|
@ -36,6 +36,7 @@ CoinsWidget::CoinsWidget(QWidget *parent)
|
||||||
m_copyMenu->addAction("Key Image", this, [this]{copy(copyField::KeyImage);});
|
m_copyMenu->addAction("Key Image", this, [this]{copy(copyField::KeyImage);});
|
||||||
m_copyMenu->addAction("Transaction ID", this, [this]{copy(copyField::TxID);});
|
m_copyMenu->addAction("Transaction ID", this, [this]{copy(copyField::TxID);});
|
||||||
m_copyMenu->addAction("Address", this, [this]{copy(copyField::Address);});
|
m_copyMenu->addAction("Address", this, [this]{copy(copyField::Address);});
|
||||||
|
m_copyMenu->addAction("Label", this, [this]{copy(copyField::Label);});
|
||||||
m_copyMenu->addAction("Height", this, [this]{copy(copyField::Height);});
|
m_copyMenu->addAction("Height", this, [this]{copy(copyField::Height);});
|
||||||
m_copyMenu->addAction("Amount", this, [this]{copy(copyField::Amount);});
|
m_copyMenu->addAction("Amount", this, [this]{copy(copyField::Amount);});
|
||||||
|
|
||||||
|
@ -229,6 +230,9 @@ void CoinsWidget::copy(copyField field) {
|
||||||
case Address:
|
case Address:
|
||||||
data = c.address();
|
data = c.address();
|
||||||
break;
|
break;
|
||||||
|
case Label:
|
||||||
|
data = c.addressLabel();
|
||||||
|
break;
|
||||||
case Height:
|
case Height:
|
||||||
data = QString::number(c.blockHeight());
|
data = QString::number(c.blockHeight());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -48,6 +48,7 @@ private:
|
||||||
KeyImage,
|
KeyImage,
|
||||||
TxID,
|
TxID,
|
||||||
Address,
|
Address,
|
||||||
|
Label,
|
||||||
Height,
|
Height,
|
||||||
Amount
|
Amount
|
||||||
};
|
};
|
||||||
|
|
|
@ -76,6 +76,10 @@ QString CoinsInfo::address() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CoinsInfo::addressLabel() const {
|
QString CoinsInfo::addressLabel() const {
|
||||||
|
if (m_subaddrIndex == 0) {
|
||||||
|
return m_coinbase ? "Coinbase" : "Change";
|
||||||
|
}
|
||||||
|
|
||||||
return m_addressLabel;
|
return m_addressLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -180,12 +180,7 @@ QVariant CoinsModel::parseTransactionInfo(const CoinsInfo &cInfo, int column, in
|
||||||
case Address:
|
case Address:
|
||||||
return ModelUtils::displayAddress(cInfo.address(), 1, "");
|
return ModelUtils::displayAddress(cInfo.address(), 1, "");
|
||||||
case AddressLabel:
|
case AddressLabel:
|
||||||
{
|
|
||||||
if (cInfo.subaddrIndex() == 0) {
|
|
||||||
return cInfo.coinbase() ? "Coinbase" : "Change";
|
|
||||||
}
|
|
||||||
return cInfo.addressLabel();
|
return cInfo.addressLabel();
|
||||||
}
|
|
||||||
case Spent:
|
case Spent:
|
||||||
return cInfo.spent();
|
return cInfo.spent();
|
||||||
case SpentHeight:
|
case SpentHeight:
|
||||||
|
|
Loading…
Reference in a new issue