63 cb->addItem(QObject::tr(
"Custom…"));
65 const auto& on_font_choice_changed = [cb, preview](
int index) {
66 static int previous_index = -1;
67 QVariant item_data = cb->itemData(index);
75 cb->setCurrentIndex(previous_index);
83 previous_index = index;
85 QObject::connect(cb, QOverload<int>::of(&QComboBox::currentIndexChanged), on_font_choice_changed);
86 on_font_choice_changed(cb->currentIndex());
90 : QDialog(parent,
GUIUtil::dialog_flags | Qt::WindowMaximizeButtonHint),
95 ui->verticalLayout->setStretchFactor(
ui->tabWidget, 1);
98 ui->databaseCache->setRange(
MIN_DB_CACHE >> 20, std::numeric_limits<int>::max());
101 ui->pruneWarning->setVisible(
false);
102 ui->pruneWarning->setStyleSheet(
"QLabel { color: red; }");
104 ui->pruneSize->setEnabled(
false);
105 connect(
ui->prune, &QPushButton::toggled,
ui->pruneSize, &QWidget::setEnabled);
108 ui->proxyIp->setEnabled(
false);
109 ui->proxyPort->setEnabled(
false);
110 ui->proxyPort->setValidator(
new QIntValidator(1, 65535,
this));
112 ui->proxyIpTor->setEnabled(
false);
113 ui->proxyPortTor->setEnabled(
false);
114 ui->proxyPortTor->setValidator(
new QIntValidator(1, 65535,
this));
116 connect(
ui->connectSocks, &QPushButton::toggled,
ui->proxyIp, &QWidget::setEnabled);
117 connect(
ui->connectSocks, &QPushButton::toggled,
ui->proxyPort, &QWidget::setEnabled);
120 connect(
ui->connectSocksTor, &QPushButton::toggled,
ui->proxyIpTor, &QWidget::setEnabled);
121 connect(
ui->connectSocksTor, &QPushButton::toggled,
ui->proxyPortTor, &QWidget::setEnabled);
127 ui->tabWidget->removeTab(
ui->tabWidget->indexOf(
ui->tabWindow));
129 ui->bitcoinAtStartup->setVisible(
false);
130 ui->verticalLayout_Main->removeWidget(
ui->bitcoinAtStartup);
131 ui->verticalLayout_Main->removeItem(
ui->horizontalSpacer_0_Main);
136 ui->tabWidget->removeTab(
ui->tabWidget->indexOf(
ui->tabWallet));
137 ui->thirdPartyTxUrlsLabel->setVisible(
false);
138 ui->thirdPartyTxUrls->setVisible(
false);
141#ifdef ENABLE_EXTERNAL_SIGNER
142 ui->externalSignerPath->setToolTip(
ui->externalSignerPath->toolTip().arg(CLIENT_NAME));
145 ui->externalSignerPath->setToolTip(tr(
"Compiled without external signing support (required for external signing)"));
146 ui->externalSignerPath->setEnabled(
false);
149 QDir translations(
":translations");
151 ui->bitcoinAtStartup->setToolTip(
ui->bitcoinAtStartup->toolTip().arg(CLIENT_NAME));
152 ui->bitcoinAtStartup->setText(
ui->bitcoinAtStartup->text().arg(CLIENT_NAME));
154 ui->openBitcoinConfButton->setToolTip(
ui->openBitcoinConfButton->toolTip().arg(CLIENT_NAME));
156 ui->lang->setToolTip(
ui->lang->toolTip().arg(CLIENT_NAME));
157 ui->lang->addItem(QString(
"(") + tr(
"default") + QString(
")"), QVariant(
""));
158 for (
const QString &langStr : translations.entryList())
160 QLocale locale(langStr);
163 if(langStr.contains(
"_"))
166 ui->lang->addItem(locale.nativeLanguageName() + QString(
" - ") +
167 locale.nativeTerritoryName() +
168 QString(
" (") + langStr + QString(
")"), QVariant(langStr));
174 ui->lang->addItem(locale.nativeLanguageName() + QString(
" (") + langStr + QString(
")"), QVariant(langStr));
180 mapper =
new QDataWidgetMapper(
this);
181 mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
182 mapper->setOrientation(Qt::Vertical);
186 mapper->setItemDelegate(delegate);
196 if (!QSystemTrayIcon::isSystemTrayAvailable()) {
197 ui->showTrayIcon->setChecked(
false);
198 ui->showTrayIcon->setEnabled(
false);
199 ui->minimizeToTray->setChecked(
false);
200 ui->minimizeToTray->setEnabled(
false);
220 this->
model = _model;
230 ui->pruneSize->setRange(nMinDiskSpace, std::numeric_limits<int>::max());
233 if (strLabel.isEmpty())
234 strLabel = tr(
"none");
235 ui->overriddenByCommandLineLabel->setText(strLabel);
254 connect(
ui->externalSignerPath, &QLineEdit::textChanged, [
this]{ showRestartWarning(); });
265 connect(
ui->thirdPartyTxUrls, &QLineEdit::textChanged, [
this]{ showRestartWarning(); });
357 QMessageBox config_msgbox(
this);
358 config_msgbox.setIcon(QMessageBox::Information);
360 config_msgbox.setWindowTitle(tr(
"Configuration options"));
363 config_msgbox.setText(tr(
"The configuration file is used to specify advanced user options which override GUI settings. "
364 "Additionally, any command-line options will override this configuration file."));
366 QPushButton* open_button = config_msgbox.addButton(tr(
"Continue"), QMessageBox::ActionRole);
367 config_msgbox.addButton(tr(
"Cancel"), QMessageBox::RejectRole);
368 open_button->setDefault(
true);
370 config_msgbox.exec();
372 if (config_msgbox.clickedButton() != open_button)
return;
376 QMessageBox::critical(
this, tr(
"Error"), tr(
"The configuration file could not be opened."));