37 std::numeric_limits<int>::max());
40 ui->pruneWarning->setVisible(
false);
41 ui->pruneWarning->setStyleSheet(
"QLabel { color: red; }");
43 ui->pruneSize->setEnabled(
false);
44 connect(
ui->prune, &QPushButton::toggled,
ui->pruneSize,
45 &QWidget::setEnabled);
48 connect(
this, &QDialog::accepted, [
this]() {
50 model->
node().mapPort(settings.value(
"fUseNatpmp").toBool());
52 ui->proxyIp->setEnabled(
false);
53 ui->proxyPort->setEnabled(
false);
54 ui->proxyPort->setValidator(
new QIntValidator(1, 65535,
this));
56 ui->proxyIpTor->setEnabled(
false);
57 ui->proxyPortTor->setEnabled(
false);
58 ui->proxyPortTor->setValidator(
new QIntValidator(1, 65535,
this));
60 connect(
ui->connectSocks, &QPushButton::toggled,
ui->proxyIp,
61 &QWidget::setEnabled);
62 connect(
ui->connectSocks, &QPushButton::toggled,
ui->proxyPort,
63 &QWidget::setEnabled);
64 connect(
ui->connectSocks, &QPushButton::toggled,
this,
67 connect(
ui->connectSocksTor, &QPushButton::toggled,
ui->proxyIpTor,
68 &QWidget::setEnabled);
69 connect(
ui->connectSocksTor, &QPushButton::toggled,
ui->proxyPortTor,
70 &QWidget::setEnabled);
71 connect(
ui->connectSocksTor, &QPushButton::toggled,
this,
77 ui->tabWidget->removeTab(
ui->tabWidget->indexOf(
ui->tabWindow));
79 ui->bitcoinAtStartup->setVisible(
false);
80 ui->verticalLayout_Main->removeWidget(
ui->bitcoinAtStartup);
81 ui->verticalLayout_Main->removeItem(
ui->horizontalSpacer_0_Main);
86 ui->tabWidget->removeTab(
ui->tabWidget->indexOf(
ui->tabWallet));
87 ui->thirdPartyTxUrlsLabel->setVisible(
false);
88 ui->thirdPartyTxUrls->setVisible(
false);
92 QDir translations(
":translations");
94 ui->bitcoinAtStartup->setToolTip(
95 ui->bitcoinAtStartup->toolTip().arg(PACKAGE_NAME));
96 ui->bitcoinAtStartup->setText(
97 ui->bitcoinAtStartup->text().arg(PACKAGE_NAME));
99 ui->openBitcoinConfButton->setToolTip(
100 ui->openBitcoinConfButton->toolTip().arg(PACKAGE_NAME));
102 ui->lang->setToolTip(
ui->lang->toolTip().arg(PACKAGE_NAME));
103 ui->lang->addItem(QString(
"(") + tr(
"default") + QString(
")"),
105 for (
const QString &langStr : translations.entryList()) {
106 QLocale locale(langStr);
109 if (langStr.contains(
"_")) {
115 ui->lang->addItem(locale.nativeLanguageName() + QString(
" - ") +
116#
if (QT_VERSION >= QT_VERSION_CHECK(6, 2, 0))
117 locale.nativeTerritoryName() +
119 locale.nativeCountryName() +
121 QString(
" (") + langStr + QString(
")"),
126 ui->lang->addItem(locale.nativeLanguageName() + QString(
" (") +
127 langStr + QString(
")"),
134 mapper =
new QDataWidgetMapper(
this);
135 mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
136 mapper->setOrientation(Qt::Vertical);
140 &OptionsDialog::reject);
141 mapper->setItemDelegate(delegate);
150 connect(
ui->proxyPort, &QLineEdit::textChanged,
this,
152 connect(
ui->proxyPortTor, &QLineEdit::textChanged,
this,
156 ui->thirdPartyTxUrls->setCheckValidator(
161 if (!QSystemTrayIcon::isSystemTrayAvailable()) {
162 ui->hideTrayIcon->setChecked(
true);
163 ui->hideTrayIcon->setEnabled(
false);
164 ui->minimizeToTray->setChecked(
false);
165 ui->minimizeToTray->setEnabled(
false);
176 this->
model = _model;
185 static constexpr uint64_t nMinDiskSpace =
190 ui->pruneSize->setRange(nMinDiskSpace, std::numeric_limits<int>::max());
193 if (strLabel.isEmpty()) {
194 strLabel = tr(
"none");
196 ui->overriddenByCommandLineLabel->setText(strLabel);
209 connect(
ui->prune, &QCheckBox::clicked,
this,
211 connect(
ui->prune, &QCheckBox::clicked,
this,
213 connect(
ui->pruneSize,
214 static_cast<void (QSpinBox::*)(
int)
>(&QSpinBox::valueChanged),
this,
216 connect(
ui->databaseCache,
217 static_cast<void (QSpinBox::*)(
int)
>(&QSpinBox::valueChanged),
this,
219 connect(
ui->threadsScriptVerif,
220 static_cast<void (QSpinBox::*)(
int)
>(&QSpinBox::valueChanged),
this,
223 connect(
ui->spendZeroConfChange, &QCheckBox::clicked,
this,
226 connect(
ui->allowIncoming, &QCheckBox::clicked,
this,
228 connect(
ui->connectSocks, &QCheckBox::clicked,
this,
230 connect(
ui->connectSocksTor, &QCheckBox::clicked,
this,
236 [
this] { showRestartWarning(); });
237 connect(
ui->thirdPartyTxUrls, &QLineEdit::textChanged,
238 [
this] { showRestartWarning(); });
std::vector< CNetAddr > LookupHost(const std::string &name, unsigned int nMaxSolutions, bool fAllowLookup, DNSLookupFn dns_lookup_function)
Resolve a host string to its corresponding network addresses.