mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
[qt] Remove Priority from coincontrol dialog
This commit is contained in:
parent
6e6ab2c323
commit
fa8dd785a2
@ -76,7 +76,6 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *platformStyle, QWidget
|
|||||||
QAction *clipboardFeeAction = new QAction(tr("Copy fee"), this);
|
QAction *clipboardFeeAction = new QAction(tr("Copy fee"), this);
|
||||||
QAction *clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this);
|
QAction *clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this);
|
||||||
QAction *clipboardBytesAction = new QAction(tr("Copy bytes"), this);
|
QAction *clipboardBytesAction = new QAction(tr("Copy bytes"), this);
|
||||||
QAction *clipboardPriorityAction = new QAction(tr("Copy priority"), this);
|
|
||||||
QAction *clipboardLowOutputAction = new QAction(tr("Copy dust"), this);
|
QAction *clipboardLowOutputAction = new QAction(tr("Copy dust"), this);
|
||||||
QAction *clipboardChangeAction = new QAction(tr("Copy change"), this);
|
QAction *clipboardChangeAction = new QAction(tr("Copy change"), this);
|
||||||
|
|
||||||
@ -85,7 +84,6 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *platformStyle, QWidget
|
|||||||
connect(clipboardFeeAction, SIGNAL(triggered()), this, SLOT(clipboardFee()));
|
connect(clipboardFeeAction, SIGNAL(triggered()), this, SLOT(clipboardFee()));
|
||||||
connect(clipboardAfterFeeAction, SIGNAL(triggered()), this, SLOT(clipboardAfterFee()));
|
connect(clipboardAfterFeeAction, SIGNAL(triggered()), this, SLOT(clipboardAfterFee()));
|
||||||
connect(clipboardBytesAction, SIGNAL(triggered()), this, SLOT(clipboardBytes()));
|
connect(clipboardBytesAction, SIGNAL(triggered()), this, SLOT(clipboardBytes()));
|
||||||
connect(clipboardPriorityAction, SIGNAL(triggered()), this, SLOT(clipboardPriority()));
|
|
||||||
connect(clipboardLowOutputAction, SIGNAL(triggered()), this, SLOT(clipboardLowOutput()));
|
connect(clipboardLowOutputAction, SIGNAL(triggered()), this, SLOT(clipboardLowOutput()));
|
||||||
connect(clipboardChangeAction, SIGNAL(triggered()), this, SLOT(clipboardChange()));
|
connect(clipboardChangeAction, SIGNAL(triggered()), this, SLOT(clipboardChange()));
|
||||||
|
|
||||||
@ -94,7 +92,6 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *platformStyle, QWidget
|
|||||||
ui->labelCoinControlFee->addAction(clipboardFeeAction);
|
ui->labelCoinControlFee->addAction(clipboardFeeAction);
|
||||||
ui->labelCoinControlAfterFee->addAction(clipboardAfterFeeAction);
|
ui->labelCoinControlAfterFee->addAction(clipboardAfterFeeAction);
|
||||||
ui->labelCoinControlBytes->addAction(clipboardBytesAction);
|
ui->labelCoinControlBytes->addAction(clipboardBytesAction);
|
||||||
ui->labelCoinControlPriority->addAction(clipboardPriorityAction);
|
|
||||||
ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction);
|
ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction);
|
||||||
ui->labelCoinControlChange->addAction(clipboardChangeAction);
|
ui->labelCoinControlChange->addAction(clipboardChangeAction);
|
||||||
|
|
||||||
@ -124,16 +121,14 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *platformStyle, QWidget
|
|||||||
ui->treeWidget->headerItem()->setText(COLUMN_CHECKBOX, QString());
|
ui->treeWidget->headerItem()->setText(COLUMN_CHECKBOX, QString());
|
||||||
|
|
||||||
ui->treeWidget->setColumnWidth(COLUMN_CHECKBOX, 84);
|
ui->treeWidget->setColumnWidth(COLUMN_CHECKBOX, 84);
|
||||||
ui->treeWidget->setColumnWidth(COLUMN_AMOUNT, 100);
|
ui->treeWidget->setColumnWidth(COLUMN_AMOUNT, 110);
|
||||||
ui->treeWidget->setColumnWidth(COLUMN_LABEL, 170);
|
ui->treeWidget->setColumnWidth(COLUMN_LABEL, 190);
|
||||||
ui->treeWidget->setColumnWidth(COLUMN_ADDRESS, 290);
|
ui->treeWidget->setColumnWidth(COLUMN_ADDRESS, 320);
|
||||||
ui->treeWidget->setColumnWidth(COLUMN_DATE, 110);
|
ui->treeWidget->setColumnWidth(COLUMN_DATE, 130);
|
||||||
ui->treeWidget->setColumnWidth(COLUMN_CONFIRMATIONS, 100);
|
ui->treeWidget->setColumnWidth(COLUMN_CONFIRMATIONS, 110);
|
||||||
ui->treeWidget->setColumnWidth(COLUMN_PRIORITY, 100);
|
|
||||||
ui->treeWidget->setColumnHidden(COLUMN_TXHASH, true); // store transaction hash in this column, but don't show it
|
ui->treeWidget->setColumnHidden(COLUMN_TXHASH, true); // store transaction hash in this column, but don't show it
|
||||||
ui->treeWidget->setColumnHidden(COLUMN_VOUT_INDEX, true); // store vout index in this column, but don't show it
|
ui->treeWidget->setColumnHidden(COLUMN_VOUT_INDEX, true); // store vout index in this column, but don't show it
|
||||||
ui->treeWidget->setColumnHidden(COLUMN_AMOUNT_INT64, true); // store amount int64 in this column, but don't show it
|
ui->treeWidget->setColumnHidden(COLUMN_AMOUNT_INT64, true); // store amount int64 in this column, but don't show it
|
||||||
ui->treeWidget->setColumnHidden(COLUMN_PRIORITY_INT64, true); // store priority int64 in this column, but don't show it
|
|
||||||
ui->treeWidget->setColumnHidden(COLUMN_DATE_INT64, true); // store date int64 in this column, but don't show it
|
ui->treeWidget->setColumnHidden(COLUMN_DATE_INT64, true); // store date int64 in this column, but don't show it
|
||||||
|
|
||||||
// default view is sorted by amount desc
|
// default view is sorted by amount desc
|
||||||
@ -325,12 +320,6 @@ void CoinControlDialog::clipboardBytes()
|
|||||||
GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace(ASYMP_UTF8, ""));
|
GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace(ASYMP_UTF8, ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy label "Priority" to clipboard
|
|
||||||
void CoinControlDialog::clipboardPriority()
|
|
||||||
{
|
|
||||||
GUIUtil::setClipboard(ui->labelCoinControlPriority->text());
|
|
||||||
}
|
|
||||||
|
|
||||||
// copy label "Dust" to clipboard
|
// copy label "Dust" to clipboard
|
||||||
void CoinControlDialog::clipboardLowOutput()
|
void CoinControlDialog::clipboardLowOutput()
|
||||||
{
|
{
|
||||||
@ -419,25 +408,6 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// return human readable label for priority number
|
|
||||||
QString CoinControlDialog::getPriorityLabel(double dPriority, double mempoolEstimatePriority)
|
|
||||||
{
|
|
||||||
double dPriorityMedium = mempoolEstimatePriority;
|
|
||||||
|
|
||||||
if (dPriorityMedium <= 0)
|
|
||||||
dPriorityMedium = AllowFreeThreshold(); // not enough data, back to hard-coded
|
|
||||||
|
|
||||||
if (dPriority / 1000000 > dPriorityMedium) return tr("highest");
|
|
||||||
else if (dPriority / 100000 > dPriorityMedium) return tr("higher");
|
|
||||||
else if (dPriority / 10000 > dPriorityMedium) return tr("high");
|
|
||||||
else if (dPriority / 1000 > dPriorityMedium) return tr("medium-high");
|
|
||||||
else if (dPriority > dPriorityMedium) return tr("medium");
|
|
||||||
else if (dPriority * 10 > dPriorityMedium) return tr("low-medium");
|
|
||||||
else if (dPriority * 100 > dPriorityMedium) return tr("low");
|
|
||||||
else if (dPriority * 1000 > dPriorityMedium) return tr("lower");
|
|
||||||
else return tr("lowest");
|
|
||||||
}
|
|
||||||
|
|
||||||
// shows count of locked unspent outputs
|
// shows count of locked unspent outputs
|
||||||
void CoinControlDialog::updateLabelLocked()
|
void CoinControlDialog::updateLabelLocked()
|
||||||
{
|
{
|
||||||
@ -473,7 +443,6 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString sPriorityLabel = tr("none");
|
|
||||||
CAmount nAmount = 0;
|
CAmount nAmount = 0;
|
||||||
CAmount nPayFee = 0;
|
CAmount nPayFee = 0;
|
||||||
CAmount nAfterFee = 0;
|
CAmount nAfterFee = 0;
|
||||||
@ -551,11 +520,6 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
|||||||
nBytes += nQuantity; // account for the witness byte that holds the number of stack items for each input.
|
nBytes += nQuantity; // account for the witness byte that holds the number of stack items for each input.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Priority
|
|
||||||
double mempoolEstimatePriority = mempool.estimateSmartPriority(nTxConfirmTarget);
|
|
||||||
dPriority = dPriorityInputs / (nBytes - nBytesInputs + (nQuantityUncompressed * 29)); // 29 = 180 - 151 (uncompressed public keys are over the limit. max 151 bytes of the input are ignored for priority)
|
|
||||||
sPriorityLabel = CoinControlDialog::getPriorityLabel(dPriority, mempoolEstimatePriority);
|
|
||||||
|
|
||||||
// in the subtract fee from amount case, we can tell if zero change already and subtract the bytes, so that fee calculation afterwards is accurate
|
// in the subtract fee from amount case, we can tell if zero change already and subtract the bytes, so that fee calculation afterwards is accurate
|
||||||
if (CoinControlDialog::fSubtractFeeFromAmount)
|
if (CoinControlDialog::fSubtractFeeFromAmount)
|
||||||
if (nAmount - nPayAmount == 0)
|
if (nAmount - nPayAmount == 0)
|
||||||
@ -568,6 +532,8 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
|||||||
|
|
||||||
|
|
||||||
// Allow free? (require at least hard-coded threshold and default to that if no estimate)
|
// Allow free? (require at least hard-coded threshold and default to that if no estimate)
|
||||||
|
double mempoolEstimatePriority = mempool.estimateSmartPriority(nTxConfirmTarget);
|
||||||
|
dPriority = dPriorityInputs / (nBytes - nBytesInputs + (nQuantityUncompressed * 29)); // 29 = 180 - 151 (uncompressed public keys are over the limit. max 151 bytes of the input are ignored for priority)
|
||||||
double dPriorityNeeded = std::max(mempoolEstimatePriority, AllowFreeThreshold());
|
double dPriorityNeeded = std::max(mempoolEstimatePriority, AllowFreeThreshold());
|
||||||
fAllowFree = (dPriority >= dPriorityNeeded);
|
fAllowFree = (dPriority >= dPriorityNeeded);
|
||||||
|
|
||||||
@ -617,7 +583,6 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
|||||||
QLabel *l3 = dialog->findChild<QLabel *>("labelCoinControlFee");
|
QLabel *l3 = dialog->findChild<QLabel *>("labelCoinControlFee");
|
||||||
QLabel *l4 = dialog->findChild<QLabel *>("labelCoinControlAfterFee");
|
QLabel *l4 = dialog->findChild<QLabel *>("labelCoinControlAfterFee");
|
||||||
QLabel *l5 = dialog->findChild<QLabel *>("labelCoinControlBytes");
|
QLabel *l5 = dialog->findChild<QLabel *>("labelCoinControlBytes");
|
||||||
QLabel *l6 = dialog->findChild<QLabel *>("labelCoinControlPriority");
|
|
||||||
QLabel *l7 = dialog->findChild<QLabel *>("labelCoinControlLowOutput");
|
QLabel *l7 = dialog->findChild<QLabel *>("labelCoinControlLowOutput");
|
||||||
QLabel *l8 = dialog->findChild<QLabel *>("labelCoinControlChange");
|
QLabel *l8 = dialog->findChild<QLabel *>("labelCoinControlChange");
|
||||||
|
|
||||||
@ -633,7 +598,6 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
|||||||
l3->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nPayFee)); // Fee
|
l3->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nPayFee)); // Fee
|
||||||
l4->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAfterFee)); // After Fee
|
l4->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAfterFee)); // After Fee
|
||||||
l5->setText(((nBytes > 0) ? ASYMP_UTF8 : "") + QString::number(nBytes)); // Bytes
|
l5->setText(((nBytes > 0) ? ASYMP_UTF8 : "") + QString::number(nBytes)); // Bytes
|
||||||
l6->setText(sPriorityLabel); // Priority
|
|
||||||
l7->setText(fDust ? tr("yes") : tr("no")); // Dust
|
l7->setText(fDust ? tr("yes") : tr("no")); // Dust
|
||||||
l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change
|
l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change
|
||||||
if (nPayFee > 0 && (coinControl->nMinimumTotalFee < nPayFee))
|
if (nPayFee > 0 && (coinControl->nMinimumTotalFee < nPayFee))
|
||||||
@ -644,21 +608,11 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
|||||||
l8->setText(ASYMP_UTF8 + l8->text());
|
l8->setText(ASYMP_UTF8 + l8->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
// turn labels "red"
|
// turn label red when dust
|
||||||
l5->setStyleSheet((nBytes >= MAX_FREE_TRANSACTION_CREATE_SIZE) ? "color:red;" : "");// Bytes >= 1000
|
l7->setStyleSheet((fDust) ? "color:red;" : "");
|
||||||
l6->setStyleSheet((dPriority > 0 && !fAllowFree) ? "color:red;" : ""); // Priority < "medium"
|
|
||||||
l7->setStyleSheet((fDust) ? "color:red;" : ""); // Dust = "yes"
|
|
||||||
|
|
||||||
// tool tips
|
// tool tips
|
||||||
QString toolTip1 = tr("This label turns red if the transaction size is greater than 1000 bytes.") + "<br /><br />";
|
QString toolTipDust = tr("This label turns red if any recipient receives an amount smaller than the current dust threshold.");
|
||||||
toolTip1 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, CWallet::GetRequiredFee(1000))) + "<br /><br />";
|
|
||||||
toolTip1 += tr("Can vary +/- 1 byte per input.");
|
|
||||||
|
|
||||||
QString toolTip2 = tr("Transactions with higher priority are more likely to get included into a block.") + "<br /><br />";
|
|
||||||
toolTip2 += tr("This label turns red if the priority is smaller than \"medium\".") + "<br /><br />";
|
|
||||||
toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, CWallet::GetRequiredFee(1000)));
|
|
||||||
|
|
||||||
QString toolTip3 = tr("This label turns red if any recipient receives an amount smaller than the current dust threshold.");
|
|
||||||
|
|
||||||
// how many satoshis the estimated fee can vary per byte we guess wrong
|
// how many satoshis the estimated fee can vary per byte we guess wrong
|
||||||
double dFeeVary;
|
double dFeeVary;
|
||||||
@ -671,14 +625,11 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
|||||||
|
|
||||||
l3->setToolTip(toolTip4);
|
l3->setToolTip(toolTip4);
|
||||||
l4->setToolTip(toolTip4);
|
l4->setToolTip(toolTip4);
|
||||||
l5->setToolTip(toolTip1);
|
l7->setToolTip(toolTipDust);
|
||||||
l6->setToolTip(toolTip2);
|
|
||||||
l7->setToolTip(toolTip3);
|
|
||||||
l8->setToolTip(toolTip4);
|
l8->setToolTip(toolTip4);
|
||||||
dialog->findChild<QLabel *>("labelCoinControlFeeText") ->setToolTip(l3->toolTip());
|
dialog->findChild<QLabel *>("labelCoinControlFeeText") ->setToolTip(l3->toolTip());
|
||||||
dialog->findChild<QLabel *>("labelCoinControlAfterFeeText") ->setToolTip(l4->toolTip());
|
dialog->findChild<QLabel *>("labelCoinControlAfterFeeText") ->setToolTip(l4->toolTip());
|
||||||
dialog->findChild<QLabel *>("labelCoinControlBytesText") ->setToolTip(l5->toolTip());
|
dialog->findChild<QLabel *>("labelCoinControlBytesText") ->setToolTip(l5->toolTip());
|
||||||
dialog->findChild<QLabel *>("labelCoinControlPriorityText") ->setToolTip(l6->toolTip());
|
|
||||||
dialog->findChild<QLabel *>("labelCoinControlLowOutputText")->setToolTip(l7->toolTip());
|
dialog->findChild<QLabel *>("labelCoinControlLowOutputText")->setToolTip(l7->toolTip());
|
||||||
dialog->findChild<QLabel *>("labelCoinControlChangeText") ->setToolTip(l8->toolTip());
|
dialog->findChild<QLabel *>("labelCoinControlChangeText") ->setToolTip(l8->toolTip());
|
||||||
|
|
||||||
@ -702,7 +653,6 @@ void CoinControlDialog::updateView()
|
|||||||
QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsTristate;
|
QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsTristate;
|
||||||
|
|
||||||
int nDisplayUnit = model->getOptionsModel()->getDisplayUnit();
|
int nDisplayUnit = model->getOptionsModel()->getDisplayUnit();
|
||||||
double mempoolEstimatePriority = mempool.estimateSmartPriority(nTxConfirmTarget);
|
|
||||||
|
|
||||||
std::map<QString, std::vector<COutput> > mapCoins;
|
std::map<QString, std::vector<COutput> > mapCoins;
|
||||||
model->listCoins(mapCoins);
|
model->listCoins(mapCoins);
|
||||||
@ -731,11 +681,8 @@ void CoinControlDialog::updateView()
|
|||||||
}
|
}
|
||||||
|
|
||||||
CAmount nSum = 0;
|
CAmount nSum = 0;
|
||||||
double dPrioritySum = 0;
|
|
||||||
int nChildren = 0;
|
int nChildren = 0;
|
||||||
int nInputSum = 0;
|
|
||||||
BOOST_FOREACH(const COutput& out, coins.second) {
|
BOOST_FOREACH(const COutput& out, coins.second) {
|
||||||
int nInputSize = 0;
|
|
||||||
nSum += out.tx->vout[out.i].nValue;
|
nSum += out.tx->vout[out.i].nValue;
|
||||||
nChildren++;
|
nChildren++;
|
||||||
|
|
||||||
@ -755,11 +702,6 @@ void CoinControlDialog::updateView()
|
|||||||
// if listMode or change => show bitcoin address. In tree mode, address is not shown again for direct wallet address outputs
|
// if listMode or change => show bitcoin address. In tree mode, address is not shown again for direct wallet address outputs
|
||||||
if (!treeMode || (!(sAddress == sWalletAddress)))
|
if (!treeMode || (!(sAddress == sWalletAddress)))
|
||||||
itemOutput->setText(COLUMN_ADDRESS, sAddress);
|
itemOutput->setText(COLUMN_ADDRESS, sAddress);
|
||||||
|
|
||||||
CPubKey pubkey;
|
|
||||||
CKeyID *keyid = boost::get<CKeyID>(&outputAddress);
|
|
||||||
if (keyid && model->getPubKey(*keyid, pubkey) && !pubkey.IsCompressed())
|
|
||||||
nInputSize = 29; // 29 = 180 - 151 (public key is 180 bytes, priority free area is 151 bytes)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// label
|
// label
|
||||||
@ -788,13 +730,6 @@ void CoinControlDialog::updateView()
|
|||||||
// confirmations
|
// confirmations
|
||||||
itemOutput->setText(COLUMN_CONFIRMATIONS, strPad(QString::number(out.nDepth), 8, " "));
|
itemOutput->setText(COLUMN_CONFIRMATIONS, strPad(QString::number(out.nDepth), 8, " "));
|
||||||
|
|
||||||
// priority
|
|
||||||
double dPriority = ((double)out.tx->vout[out.i].nValue / (nInputSize + 78)) * (out.nDepth+1); // 78 = 2 * 34 + 10
|
|
||||||
itemOutput->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPriority, mempoolEstimatePriority));
|
|
||||||
itemOutput->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPriority), 20, " "));
|
|
||||||
dPrioritySum += (double)out.tx->vout[out.i].nValue * (out.nDepth+1);
|
|
||||||
nInputSum += nInputSize;
|
|
||||||
|
|
||||||
// transaction hash
|
// transaction hash
|
||||||
uint256 txhash = out.tx->GetHash();
|
uint256 txhash = out.tx->GetHash();
|
||||||
itemOutput->setText(COLUMN_TXHASH, QString::fromStdString(txhash.GetHex()));
|
itemOutput->setText(COLUMN_TXHASH, QString::fromStdString(txhash.GetHex()));
|
||||||
@ -819,12 +754,9 @@ void CoinControlDialog::updateView()
|
|||||||
// amount
|
// amount
|
||||||
if (treeMode)
|
if (treeMode)
|
||||||
{
|
{
|
||||||
dPrioritySum = dPrioritySum / (nInputSum + 78);
|
|
||||||
itemWalletAddress->setText(COLUMN_CHECKBOX, "(" + QString::number(nChildren) + ")");
|
itemWalletAddress->setText(COLUMN_CHECKBOX, "(" + QString::number(nChildren) + ")");
|
||||||
itemWalletAddress->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum));
|
itemWalletAddress->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum));
|
||||||
itemWalletAddress->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(nSum), 15, " "));
|
itemWalletAddress->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(nSum), 15, " "));
|
||||||
itemWalletAddress->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPrioritySum, mempoolEstimatePriority));
|
|
||||||
itemWalletAddress->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPrioritySum), 20, " "));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,6 @@ public:
|
|||||||
|
|
||||||
// static because also called from sendcoinsdialog
|
// static because also called from sendcoinsdialog
|
||||||
static void updateLabels(WalletModel*, QDialog*);
|
static void updateLabels(WalletModel*, QDialog*);
|
||||||
static QString getPriorityLabel(double dPriority, double mempoolEstimatePriority);
|
|
||||||
|
|
||||||
static QList<CAmount> payAmounts;
|
static QList<CAmount> payAmounts;
|
||||||
static CCoinControl *coinControl;
|
static CCoinControl *coinControl;
|
||||||
@ -72,11 +71,9 @@ private:
|
|||||||
COLUMN_ADDRESS,
|
COLUMN_ADDRESS,
|
||||||
COLUMN_DATE,
|
COLUMN_DATE,
|
||||||
COLUMN_CONFIRMATIONS,
|
COLUMN_CONFIRMATIONS,
|
||||||
COLUMN_PRIORITY,
|
|
||||||
COLUMN_TXHASH,
|
COLUMN_TXHASH,
|
||||||
COLUMN_VOUT_INDEX,
|
COLUMN_VOUT_INDEX,
|
||||||
COLUMN_AMOUNT_INT64,
|
COLUMN_AMOUNT_INT64,
|
||||||
COLUMN_PRIORITY_INT64,
|
|
||||||
COLUMN_DATE_INT64
|
COLUMN_DATE_INT64
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -87,8 +84,6 @@ private:
|
|||||||
{
|
{
|
||||||
if (column == COLUMN_AMOUNT_INT64)
|
if (column == COLUMN_AMOUNT_INT64)
|
||||||
return COLUMN_AMOUNT;
|
return COLUMN_AMOUNT;
|
||||||
else if (column == COLUMN_PRIORITY_INT64)
|
|
||||||
return COLUMN_PRIORITY;
|
|
||||||
else if (column == COLUMN_DATE_INT64)
|
else if (column == COLUMN_DATE_INT64)
|
||||||
return COLUMN_DATE;
|
return COLUMN_DATE;
|
||||||
}
|
}
|
||||||
@ -96,8 +91,6 @@ private:
|
|||||||
{
|
{
|
||||||
if (column == COLUMN_AMOUNT)
|
if (column == COLUMN_AMOUNT)
|
||||||
return COLUMN_AMOUNT_INT64;
|
return COLUMN_AMOUNT_INT64;
|
||||||
else if (column == COLUMN_PRIORITY)
|
|
||||||
return COLUMN_PRIORITY_INT64;
|
|
||||||
else if (column == COLUMN_DATE)
|
else if (column == COLUMN_DATE)
|
||||||
return COLUMN_DATE_INT64;
|
return COLUMN_DATE_INT64;
|
||||||
}
|
}
|
||||||
@ -118,7 +111,6 @@ private Q_SLOTS:
|
|||||||
void clipboardFee();
|
void clipboardFee();
|
||||||
void clipboardAfterFee();
|
void clipboardAfterFee();
|
||||||
void clipboardBytes();
|
void clipboardBytes();
|
||||||
void clipboardPriority();
|
|
||||||
void clipboardLowOutput();
|
void clipboardLowOutput();
|
||||||
void clipboardChange();
|
void clipboardChange();
|
||||||
void radioTreeMode(bool);
|
void radioTreeMode(bool);
|
||||||
|
@ -140,7 +140,10 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="labelCoinControlPriorityText">
|
<widget class="QLabel" name="labelCoinControlLowOutputText">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
@ -148,12 +151,15 @@
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Priority:</string>
|
<string>Dust:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLabel" name="labelCoinControlPriority">
|
<widget class="QLabel" name="labelCoinControlLowOutput">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
</property>
|
</property>
|
||||||
@ -161,7 +167,7 @@
|
|||||||
<enum>Qt::ActionsContextMenu</enum>
|
<enum>Qt::ActionsContextMenu</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">medium</string>
|
<string notr="true">no</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textInteractionFlags">
|
<property name="textInteractionFlags">
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||||
@ -213,41 +219,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="labelCoinControlLowOutputText">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Dust:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="labelCoinControlLowOutput">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="cursor">
|
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
|
||||||
</property>
|
|
||||||
<property name="contextMenuPolicy">
|
|
||||||
<enum>Qt::ActionsContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">no</string>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -431,7 +402,7 @@
|
|||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="columnCount">
|
<property name="columnCount">
|
||||||
<number>12</number>
|
<number>10</number>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="headerShowSortIndicator" stdset="0">
|
<attribute name="headerShowSortIndicator" stdset="0">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -472,16 +443,6 @@
|
|||||||
<string>Confirmed</string>
|
<string>Confirmed</string>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Priority</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
|
@ -332,7 +332,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="labelCoinControlPriorityText">
|
<widget class="QLabel" name="labelCoinControlLowOutputText">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
@ -340,12 +340,12 @@
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Priority:</string>
|
<string>Dust:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QLabel" name="labelCoinControlPriority">
|
<widget class="QLabel" name="labelCoinControlLowOutput">
|
||||||
<property name="cursor">
|
<property name="cursor">
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
<cursorShape>IBeamCursor</cursorShape>
|
||||||
</property>
|
</property>
|
||||||
@ -353,7 +353,7 @@
|
|||||||
<enum>Qt::ActionsContextMenu</enum>
|
<enum>Qt::ActionsContextMenu</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">medium</string>
|
<string notr="true">no</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textInteractionFlags">
|
<property name="textInteractionFlags">
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||||
@ -411,36 +411,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
</layout>
|
||||||
<widget class="QLabel" name="labelCoinControlLowOutputText">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Dust:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="labelCoinControlLowOutput">
|
|
||||||
<property name="cursor">
|
|
||||||
<cursorShape>IBeamCursor</cursorShape>
|
|
||||||
</property>
|
|
||||||
<property name="contextMenuPolicy">
|
|
||||||
<enum>Qt::ActionsContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">no</string>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="formLayoutCoinControl4">
|
<layout class="QFormLayout" name="formLayoutCoinControl4">
|
||||||
|
@ -69,7 +69,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *platformStyle, QWidget *pa
|
|||||||
QAction *clipboardFeeAction = new QAction(tr("Copy fee"), this);
|
QAction *clipboardFeeAction = new QAction(tr("Copy fee"), this);
|
||||||
QAction *clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this);
|
QAction *clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this);
|
||||||
QAction *clipboardBytesAction = new QAction(tr("Copy bytes"), this);
|
QAction *clipboardBytesAction = new QAction(tr("Copy bytes"), this);
|
||||||
QAction *clipboardPriorityAction = new QAction(tr("Copy priority"), this);
|
|
||||||
QAction *clipboardLowOutputAction = new QAction(tr("Copy dust"), this);
|
QAction *clipboardLowOutputAction = new QAction(tr("Copy dust"), this);
|
||||||
QAction *clipboardChangeAction = new QAction(tr("Copy change"), this);
|
QAction *clipboardChangeAction = new QAction(tr("Copy change"), this);
|
||||||
connect(clipboardQuantityAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardQuantity()));
|
connect(clipboardQuantityAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardQuantity()));
|
||||||
@ -77,7 +76,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *platformStyle, QWidget *pa
|
|||||||
connect(clipboardFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardFee()));
|
connect(clipboardFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardFee()));
|
||||||
connect(clipboardAfterFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardAfterFee()));
|
connect(clipboardAfterFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardAfterFee()));
|
||||||
connect(clipboardBytesAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardBytes()));
|
connect(clipboardBytesAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardBytes()));
|
||||||
connect(clipboardPriorityAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardPriority()));
|
|
||||||
connect(clipboardLowOutputAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardLowOutput()));
|
connect(clipboardLowOutputAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardLowOutput()));
|
||||||
connect(clipboardChangeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardChange()));
|
connect(clipboardChangeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardChange()));
|
||||||
ui->labelCoinControlQuantity->addAction(clipboardQuantityAction);
|
ui->labelCoinControlQuantity->addAction(clipboardQuantityAction);
|
||||||
@ -85,7 +83,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *platformStyle, QWidget *pa
|
|||||||
ui->labelCoinControlFee->addAction(clipboardFeeAction);
|
ui->labelCoinControlFee->addAction(clipboardFeeAction);
|
||||||
ui->labelCoinControlAfterFee->addAction(clipboardAfterFeeAction);
|
ui->labelCoinControlAfterFee->addAction(clipboardAfterFeeAction);
|
||||||
ui->labelCoinControlBytes->addAction(clipboardBytesAction);
|
ui->labelCoinControlBytes->addAction(clipboardBytesAction);
|
||||||
ui->labelCoinControlPriority->addAction(clipboardPriorityAction);
|
|
||||||
ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction);
|
ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction);
|
||||||
ui->labelCoinControlChange->addAction(clipboardChangeAction);
|
ui->labelCoinControlChange->addAction(clipboardChangeAction);
|
||||||
|
|
||||||
@ -681,12 +678,6 @@ void SendCoinsDialog::coinControlClipboardBytes()
|
|||||||
GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace(ASYMP_UTF8, ""));
|
GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace(ASYMP_UTF8, ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Coin Control: copy label "Priority" to clipboard
|
|
||||||
void SendCoinsDialog::coinControlClipboardPriority()
|
|
||||||
{
|
|
||||||
GUIUtil::setClipboard(ui->labelCoinControlPriority->text());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Coin Control: copy label "Dust" to clipboard
|
// Coin Control: copy label "Dust" to clipboard
|
||||||
void SendCoinsDialog::coinControlClipboardLowOutput()
|
void SendCoinsDialog::coinControlClipboardLowOutput()
|
||||||
{
|
{
|
||||||
|
@ -88,7 +88,6 @@ private Q_SLOTS:
|
|||||||
void coinControlClipboardFee();
|
void coinControlClipboardFee();
|
||||||
void coinControlClipboardAfterFee();
|
void coinControlClipboardAfterFee();
|
||||||
void coinControlClipboardBytes();
|
void coinControlClipboardBytes();
|
||||||
void coinControlClipboardPriority();
|
|
||||||
void coinControlClipboardLowOutput();
|
void coinControlClipboardLowOutput();
|
||||||
void coinControlClipboardChange();
|
void coinControlClipboardChange();
|
||||||
void setMinimumFee();
|
void setMinimumFee();
|
||||||
|
Loading…
Reference in New Issue
Block a user