Coin Control: update labels
| 1045 | |
| 1046 | // Coin Control: update labels |
| 1047 | void SendCoinsDialog::coinControlUpdateLabels() |
| 1048 | { |
| 1049 | if (!model || !model->getOptionsModel()) |
| 1050 | return; |
| 1051 | |
| 1052 | updateCoinControlState(); |
| 1053 | |
| 1054 | // set pay amounts |
| 1055 | CoinControlDialog::payAmounts.clear(); |
| 1056 | CoinControlDialog::fSubtractFeeFromAmount = false; |
| 1057 | |
| 1058 | for(int i = 0; i < ui->entries->count(); ++i) |
| 1059 | { |
| 1060 | SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget()); |
| 1061 | if(entry && !entry->isHidden()) |
| 1062 | { |
| 1063 | SendAssetsRecipient rcp = entry->getValue(); |
| 1064 | if (rcp.asset == Params().GetConsensus().pegged_asset) { |
| 1065 | CoinControlDialog::payAmounts.append(rcp.asset_amount); |
| 1066 | } |
| 1067 | if (rcp.fSubtractFeeFromAmount) |
| 1068 | CoinControlDialog::fSubtractFeeFromAmount = true; |
| 1069 | } |
| 1070 | } |
| 1071 | |
| 1072 | if (m_coin_control->HasSelected()) |
| 1073 | { |
| 1074 | // actual coin control calculation |
| 1075 | CoinControlDialog::updateLabels(*m_coin_control, model, this); |
| 1076 | |
| 1077 | // show coin control stats |
| 1078 | ui->labelCoinControlAutomaticallySelected->hide(); |
| 1079 | ui->widgetCoinControl->show(); |
| 1080 | } |
| 1081 | else |
| 1082 | { |
| 1083 | // hide coin control stats |
| 1084 | ui->labelCoinControlAutomaticallySelected->show(); |
| 1085 | ui->widgetCoinControl->hide(); |
| 1086 | ui->labelCoinControlInsuffFunds->hide(); |
| 1087 | } |
| 1088 | } |
| 1089 | |
| 1090 | SendConfirmationDialog::SendConfirmationDialog(const QString& title, const QString& text, const QString& informative_text, const QString& detailed_text, int _secDelay, bool enable_send, bool always_show_unsigned, QWidget* parent) |
| 1091 | : QMessageBox(parent), secDelay(_secDelay), m_enable_send(enable_send) |
nothing calls this directly
no test coverage detected