Bitcoin Core  22.99.0
P2P Digital Currency
optionsdialog.cpp
Go to the documentation of this file.
1 // Copyright (c) 2011-2020 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #if defined(HAVE_CONFIG_H)
7 #endif
8 
9 #include <qt/optionsdialog.h>
10 #include <qt/forms/ui_optionsdialog.h>
11 
12 #include <qt/bitcoinunits.h>
13 #include <qt/guiconstants.h>
14 #include <qt/guiutil.h>
15 #include <qt/optionsmodel.h>
16 
17 #include <interfaces/node.h>
18 #include <validation.h> // for DEFAULT_SCRIPTCHECK_THREADS and MAX_SCRIPTCHECK_THREADS
19 #include <netbase.h>
20 #include <txdb.h> // for -dbcache defaults
21 
22 #include <QDataWidgetMapper>
23 #include <QDir>
24 #include <QIntValidator>
25 #include <QLocale>
26 #include <QMessageBox>
27 #include <QSettings>
28 #include <QSystemTrayIcon>
29 #include <QTimer>
30 
31 OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
32  QDialog(parent, GUIUtil::dialog_flags),
33  ui(new Ui::OptionsDialog),
34  model(nullptr),
35  mapper(nullptr)
36 {
37  ui->setupUi(this);
38 
39  /* Main elements init */
40  ui->databaseCache->setMinimum(nMinDbCache);
41  ui->databaseCache->setMaximum(nMaxDbCache);
42  ui->threadsScriptVerif->setMinimum(-GetNumCores());
43  ui->threadsScriptVerif->setMaximum(MAX_SCRIPTCHECK_THREADS);
44  ui->pruneWarning->setVisible(false);
45  ui->pruneWarning->setStyleSheet("QLabel { color: red; }");
46 
47  ui->pruneSize->setEnabled(false);
48  connect(ui->prune, &QPushButton::toggled, ui->pruneSize, &QWidget::setEnabled);
49 
50  /* Network elements init */
51 #ifndef USE_UPNP
52  ui->mapPortUpnp->setEnabled(false);
53 #endif
54 #ifndef USE_NATPMP
55  ui->mapPortNatpmp->setEnabled(false);
56 #endif
57  connect(this, &QDialog::accepted, [this](){
58  QSettings settings;
59  model->node().mapPort(settings.value("fUseUPnP").toBool(), settings.value("fUseNatpmp").toBool());
60  });
61 
62  ui->proxyIp->setEnabled(false);
63  ui->proxyPort->setEnabled(false);
64  ui->proxyPort->setValidator(new QIntValidator(1, 65535, this));
65 
66  ui->proxyIpTor->setEnabled(false);
67  ui->proxyPortTor->setEnabled(false);
68  ui->proxyPortTor->setValidator(new QIntValidator(1, 65535, this));
69 
70  connect(ui->connectSocks, &QPushButton::toggled, ui->proxyIp, &QWidget::setEnabled);
71  connect(ui->connectSocks, &QPushButton::toggled, ui->proxyPort, &QWidget::setEnabled);
72  connect(ui->connectSocks, &QPushButton::toggled, this, &OptionsDialog::updateProxyValidationState);
73 
74  connect(ui->connectSocksTor, &QPushButton::toggled, ui->proxyIpTor, &QWidget::setEnabled);
75  connect(ui->connectSocksTor, &QPushButton::toggled, ui->proxyPortTor, &QWidget::setEnabled);
76  connect(ui->connectSocksTor, &QPushButton::toggled, this, &OptionsDialog::updateProxyValidationState);
77 
78  /* Window elements init */
79 #ifdef Q_OS_MAC
80  /* remove Window tab on Mac */
81  ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWindow));
82  /* hide launch at startup option on macOS */
83  ui->bitcoinAtStartup->setVisible(false);
84  ui->verticalLayout_Main->removeWidget(ui->bitcoinAtStartup);
85  ui->verticalLayout_Main->removeItem(ui->horizontalSpacer_0_Main);
86 #endif
87 
88  /* remove Wallet tab and 3rd party-URL textbox in case of -disablewallet */
89  if (!enableWallet) {
90  ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWallet));
91  ui->thirdPartyTxUrlsLabel->setVisible(false);
92  ui->thirdPartyTxUrls->setVisible(false);
93  }
94 
95 #ifndef ENABLE_EXTERNAL_SIGNER
96  //: "External signing" means using devices such as hardware wallets.
97  ui->externalSignerPath->setToolTip(tr("Compiled without external signing support (required for external signing)"));
98  ui->externalSignerPath->setEnabled(false);
99 #endif
100  /* Display elements init */
101  QDir translations(":translations");
102 
103  ui->bitcoinAtStartup->setToolTip(ui->bitcoinAtStartup->toolTip().arg(PACKAGE_NAME));
104  ui->bitcoinAtStartup->setText(ui->bitcoinAtStartup->text().arg(PACKAGE_NAME));
105 
106  ui->openBitcoinConfButton->setToolTip(ui->openBitcoinConfButton->toolTip().arg(PACKAGE_NAME));
107 
108  ui->lang->setToolTip(ui->lang->toolTip().arg(PACKAGE_NAME));
109  ui->lang->addItem(QString("(") + tr("default") + QString(")"), QVariant(""));
110  for (const QString &langStr : translations.entryList())
111  {
112  QLocale locale(langStr);
113 
115  if(langStr.contains("_"))
116  {
118  ui->lang->addItem(locale.nativeLanguageName() + QString(" - ") + locale.nativeCountryName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
119  }
120  else
121  {
123  ui->lang->addItem(locale.nativeLanguageName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
124  }
125  }
126  ui->unit->setModel(new BitcoinUnits(this));
127 
128  /* Widget-to-option mapper */
129  mapper = new QDataWidgetMapper(this);
130  mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
131  mapper->setOrientation(Qt::Vertical);
132 
134  connect(delegate, &GUIUtil::ItemDelegate::keyEscapePressed, this, &OptionsDialog::reject);
135  mapper->setItemDelegate(delegate);
136 
137  /* setup/change UI elements when proxy IPs are invalid/valid */
138  ui->proxyIp->setCheckValidator(new ProxyAddressValidator(parent));
139  ui->proxyIpTor->setCheckValidator(new ProxyAddressValidator(parent));
142  connect(ui->proxyPort, &QLineEdit::textChanged, this, &OptionsDialog::updateProxyValidationState);
143  connect(ui->proxyPortTor, &QLineEdit::textChanged, this, &OptionsDialog::updateProxyValidationState);
144 
145  if (!QSystemTrayIcon::isSystemTrayAvailable()) {
146  ui->showTrayIcon->setChecked(false);
147  ui->showTrayIcon->setEnabled(false);
148  ui->minimizeToTray->setChecked(false);
149  ui->minimizeToTray->setEnabled(false);
150  }
151 
152  QFont embedded_font{GUIUtil::fixedPitchFont(true)};
153  ui->embeddedFont_radioButton->setText(ui->embeddedFont_radioButton->text().arg(QFontInfo(embedded_font).family()));
154  embedded_font.setWeight(QFont::Bold);
155  ui->embeddedFont_label_1->setFont(embedded_font);
156  ui->embeddedFont_label_9->setFont(embedded_font);
157 
158  QFont system_font{GUIUtil::fixedPitchFont(false)};
159  ui->systemFont_radioButton->setText(ui->systemFont_radioButton->text().arg(QFontInfo(system_font).family()));
160  system_font.setWeight(QFont::Bold);
161  ui->systemFont_label_1->setFont(system_font);
162  ui->systemFont_label_9->setFont(system_font);
163  // Checking the embeddedFont_radioButton automatically unchecks the systemFont_radioButton.
164  ui->systemFont_radioButton->setChecked(true);
165 
167 }
168 
170 {
171  delete ui;
172 }
173 
175 {
176  this->model = _model;
177 
178  if(_model)
179  {
180  /* check if client restart is needed and show persistent message */
181  if (_model->isRestartRequired())
182  showRestartWarning(true);
183 
184  // Prune values are in GB to be consistent with intro.cpp
185  static constexpr uint64_t nMinDiskSpace = (MIN_DISK_SPACE_FOR_BLOCK_FILES / GB_BYTES) + (MIN_DISK_SPACE_FOR_BLOCK_FILES % GB_BYTES) ? 1 : 0;
186  ui->pruneSize->setRange(nMinDiskSpace, std::numeric_limits<int>::max());
187 
188  QString strLabel = _model->getOverriddenByCommandLine();
189  if (strLabel.isEmpty())
190  strLabel = tr("none");
191  ui->overriddenByCommandLineLabel->setText(strLabel);
192 
193  mapper->setModel(_model);
194  setMapper();
195  mapper->toFirst();
196 
198  }
199 
200  /* warn when one of the following settings changes by user action (placed here so init via mapper doesn't trigger them) */
201 
202  /* Main */
203  connect(ui->prune, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
204  connect(ui->prune, &QCheckBox::clicked, this, &OptionsDialog::togglePruneWarning);
205  connect(ui->pruneSize, qOverload<int>(&QSpinBox::valueChanged), this, &OptionsDialog::showRestartWarning);
206  connect(ui->databaseCache, qOverload<int>(&QSpinBox::valueChanged), this, &OptionsDialog::showRestartWarning);
207  connect(ui->externalSignerPath, &QLineEdit::textChanged, [this]{ showRestartWarning(); });
208  connect(ui->threadsScriptVerif, qOverload<int>(&QSpinBox::valueChanged), this, &OptionsDialog::showRestartWarning);
209  /* Wallet */
210  connect(ui->spendZeroConfChange, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
211  /* Network */
212  connect(ui->allowIncoming, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
213  connect(ui->connectSocks, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
214  connect(ui->connectSocksTor, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
215  /* Display */
216  connect(ui->lang, qOverload<>(&QValueComboBox::valueChanged), [this]{ showRestartWarning(); });
217  connect(ui->thirdPartyTxUrls, &QLineEdit::textChanged, [this]{ showRestartWarning(); });
218 }
219 
221 {
222  QWidget *tab_widget = nullptr;
223  if (tab == OptionsDialog::Tab::TAB_NETWORK) tab_widget = ui->tabNetwork;
224  if (tab == OptionsDialog::Tab::TAB_MAIN) tab_widget = ui->tabMain;
225  if (tab_widget && ui->tabWidget->currentWidget() != tab_widget) {
226  ui->tabWidget->setCurrentWidget(tab_widget);
227  }
228 }
229 
231 {
232  /* Main */
233  mapper->addMapping(ui->bitcoinAtStartup, OptionsModel::StartAtStartup);
234  mapper->addMapping(ui->threadsScriptVerif, OptionsModel::ThreadsScriptVerif);
235  mapper->addMapping(ui->databaseCache, OptionsModel::DatabaseCache);
236  mapper->addMapping(ui->prune, OptionsModel::Prune);
237  mapper->addMapping(ui->pruneSize, OptionsModel::PruneSize);
238 
239  /* Wallet */
240  mapper->addMapping(ui->spendZeroConfChange, OptionsModel::SpendZeroConfChange);
241  mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures);
242  mapper->addMapping(ui->subFeeFromAmount, OptionsModel::SubFeeFromAmount);
243  mapper->addMapping(ui->externalSignerPath, OptionsModel::ExternalSignerPath);
244 
245  /* Network */
246  mapper->addMapping(ui->mapPortUpnp, OptionsModel::MapPortUPnP);
247  mapper->addMapping(ui->mapPortNatpmp, OptionsModel::MapPortNatpmp);
248  mapper->addMapping(ui->allowIncoming, OptionsModel::Listen);
249 
250  mapper->addMapping(ui->connectSocks, OptionsModel::ProxyUse);
251  mapper->addMapping(ui->proxyIp, OptionsModel::ProxyIP);
252  mapper->addMapping(ui->proxyPort, OptionsModel::ProxyPort);
253 
254  mapper->addMapping(ui->connectSocksTor, OptionsModel::ProxyUseTor);
255  mapper->addMapping(ui->proxyIpTor, OptionsModel::ProxyIPTor);
256  mapper->addMapping(ui->proxyPortTor, OptionsModel::ProxyPortTor);
257 
258  /* Window */
259 #ifndef Q_OS_MAC
260  if (QSystemTrayIcon::isSystemTrayAvailable()) {
261  mapper->addMapping(ui->showTrayIcon, OptionsModel::ShowTrayIcon);
262  mapper->addMapping(ui->minimizeToTray, OptionsModel::MinimizeToTray);
263  }
264  mapper->addMapping(ui->minimizeOnClose, OptionsModel::MinimizeOnClose);
265 #endif
266 
267  /* Display */
268  mapper->addMapping(ui->lang, OptionsModel::Language);
269  mapper->addMapping(ui->unit, OptionsModel::DisplayUnit);
270  mapper->addMapping(ui->thirdPartyTxUrls, OptionsModel::ThirdPartyTxUrls);
271  mapper->addMapping(ui->embeddedFont_radioButton, OptionsModel::UseEmbeddedMonospacedFont);
272 }
273 
275 {
276  ui->okButton->setEnabled(fState);
277 }
278 
280 {
281  if(model)
282  {
283  // confirmation dialog
284  QMessageBox::StandardButton btnRetVal = QMessageBox::question(this, tr("Confirm options reset"),
285  tr("Client restart required to activate changes.") + "<br><br>" + tr("Client will be shut down. Do you want to proceed?"),
286  QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
287 
288  if(btnRetVal == QMessageBox::Cancel)
289  return;
290 
291  /* reset all options and close GUI */
292  model->Reset();
293  QApplication::quit();
294  }
295 }
296 
298 {
299  QMessageBox config_msgbox(this);
300  config_msgbox.setIcon(QMessageBox::Information);
301  //: Window title text of pop-up box that allows opening up of configuration file.
302  config_msgbox.setWindowTitle(tr("Configuration options"));
303  /*: Explanatory text about the priority order of instructions considered by client.
304  The order from high to low being: command-line, configuration file, GUI settings. */
305  config_msgbox.setText(tr("The configuration file is used to specify advanced user options which override GUI settings. "
306  "Additionally, any command-line options will override this configuration file."));
307 
308  QPushButton* open_button = config_msgbox.addButton(tr("Continue"), QMessageBox::ActionRole);
309  config_msgbox.addButton(tr("Cancel"), QMessageBox::RejectRole);
310  open_button->setDefault(true);
311 
312  config_msgbox.exec();
313 
314  if (config_msgbox.clickedButton() != open_button) return;
315 
316  /* show an error if there was some problem opening the file */
318  QMessageBox::critical(this, tr("Error"), tr("The configuration file could not be opened."));
319 }
320 
322 {
323  mapper->submit();
324  accept();
326 }
327 
329 {
330  reject();
331 }
332 
334 {
335  if (state == Qt::Checked) {
336  ui->minimizeToTray->setEnabled(true);
337  } else {
338  ui->minimizeToTray->setChecked(false);
339  ui->minimizeToTray->setEnabled(false);
340  }
341 }
342 
344 {
345  ui->pruneWarning->setVisible(!ui->pruneWarning->isVisible());
346 }
347 
348 void OptionsDialog::showRestartWarning(bool fPersistent)
349 {
350  ui->statusLabel->setStyleSheet("QLabel { color: red; }");
351 
352  if(fPersistent)
353  {
354  ui->statusLabel->setText(tr("Client restart required to activate changes."));
355  }
356  else
357  {
358  ui->statusLabel->setText(tr("This change would require a client restart."));
359  // clear non-persistent status label after 10 seconds
360  // Todo: should perhaps be a class attribute, if we extend the use of statusLabel
361  QTimer::singleShot(10000, this, &OptionsDialog::clearStatusLabel);
362  }
363 }
364 
366 {
367  ui->statusLabel->clear();
368  if (model && model->isRestartRequired()) {
369  showRestartWarning(true);
370  }
371 }
372 
374 {
375  QValidatedLineEdit *pUiProxyIp = ui->proxyIp;
376  QValidatedLineEdit *otherProxyWidget = (pUiProxyIp == ui->proxyIpTor) ? ui->proxyIp : ui->proxyIpTor;
377  if (pUiProxyIp->isValid() && (!ui->proxyPort->isEnabled() || ui->proxyPort->text().toInt() > 0) && (!ui->proxyPortTor->isEnabled() || ui->proxyPortTor->text().toInt() > 0))
378  {
379  setOkButtonState(otherProxyWidget->isValid()); //only enable ok button if both proxys are valid
381  }
382  else
383  {
384  setOkButtonState(false);
385  ui->statusLabel->setStyleSheet("QLabel { color: red; }");
386  ui->statusLabel->setText(tr("The supplied proxy address is invalid."));
387  }
388 }
389 
391 {
392  proxyType proxy;
393  std::string strProxy;
394  QString strDefaultProxyGUI;
395 
396  model->node().getProxy(NET_IPV4, proxy);
397  strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
398  strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
399  (strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachIPv4->setChecked(true) : ui->proxyReachIPv4->setChecked(false);
400 
401  model->node().getProxy(NET_IPV6, proxy);
402  strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
403  strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
404  (strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachIPv6->setChecked(true) : ui->proxyReachIPv6->setChecked(false);
405 
406  model->node().getProxy(NET_ONION, proxy);
407  strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
408  strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
409  (strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachTor->setChecked(true) : ui->proxyReachTor->setChecked(false);
410 }
411 
413 QValidator(parent)
414 {
415 }
416 
417 QValidator::State ProxyAddressValidator::validate(QString &input, int &pos) const
418 {
419  Q_UNUSED(pos);
420  // Validate the proxy
421  CService serv(LookupNumeric(input.toStdString(), DEFAULT_GUI_PROXY_PORT));
422  proxyType addrProxy = proxyType(serv, true);
423  if (addrProxy.IsValid())
424  return QValidator::Acceptable;
425 
426  return QValidator::Invalid;
427 }
OptionsDialog
Preferences dialog.
Definition: optionsdialog.h:35
CService
A combination of a network address (CNetAddr) and a (TCP) port.
Definition: netaddress.h:539
QValidatedLineEdit::isValid
bool isValid()
Definition: qvalidatedlineedit.cpp:111
OptionsDialog::Tab
Tab
Definition: optionsdialog.h:43
GUIUtil::openBitcoinConf
bool openBitcoinConf()
Definition: guiutil.cpp:416
proxyType::IsValid
bool IsValid() const
Definition: netbase.h:54
OptionsModel::ShowTrayIcon
@ ShowTrayIcon
Definition: optionsmodel.h:48
OptionsModel::MinimizeOnClose
@ MinimizeOnClose
Definition: optionsmodel.h:52
OptionsDialog::on_okButton_clicked
void on_okButton_clicked()
Definition: optionsdialog.cpp:321
if
if(na.IsAddrV1Compatible())
Definition: deserialize.cpp:213
NET_IPV4
@ NET_IPV4
IPv4.
Definition: netaddress.h:50
interfaces::Node::getProxy
virtual bool getProxy(Network net, proxyType &proxy_info)=0
Get proxy.
OptionsDialog::on_cancelButton_clicked
void on_cancelButton_clicked()
Definition: optionsdialog.cpp:328
OptionsModel::ThreadsScriptVerif
@ ThreadsScriptVerif
Definition: optionsmodel.h:65
OptionsModel::PruneSize
@ PruneSize
Definition: optionsmodel.h:67
OptionsModel::DisplayUnit
@ DisplayUnit
Definition: optionsmodel.h:59
OptionsModel::getOverriddenByCommandLine
const QString & getOverriddenByCommandLine()
Definition: optionsmodel.h:93
OptionsModel::Listen
@ Listen
Definition: optionsmodel.h:71
nMaxDbCache
static const int64_t nMaxDbCache
max. -dbcache (MiB)
Definition: txdb.h:31
MAX_SCRIPTCHECK_THREADS
static const int MAX_SCRIPTCHECK_THREADS
Maximum number of dedicated script-checking threads allowed.
Definition: validation.h:66
OptionsDialog::OptionsDialog
OptionsDialog(QWidget *parent, bool enableWallet)
Definition: optionsdialog.cpp:31
OptionsDialog::model
OptionsModel * model
Definition: optionsdialog.h:74
OptionsDialog::updateDefaultProxyNets
void updateDefaultProxyNets()
Definition: optionsdialog.cpp:390
DEFAULT_GUI_PROXY_PORT
static constexpr uint16_t DEFAULT_GUI_PROXY_PORT
Definition: optionsmodel.h:21
GUIUtil
Utility functions used by the Bitcoin Qt UI.
Definition: bitcoingui.h:59
OptionsModel::ProxyPort
@ ProxyPort
Definition: optionsmodel.h:55
OptionsDialog::updateProxyValidationState
void updateProxyValidationState()
Definition: optionsdialog.cpp:373
OptionsModel::DatabaseCache
@ DatabaseCache
Definition: optionsmodel.h:68
OptionsModel::SpendZeroConfChange
@ SpendZeroConfChange
Definition: optionsmodel.h:70
OptionsModel::ExternalSignerPath
@ ExternalSignerPath
Definition: optionsmodel.h:69
GUIUtil::ItemDelegate
Definition: guiutil.h:285
bitcoin-config.h
GUIUtil::ItemDelegate::keyEscapePressed
void keyEscapePressed()
QValueComboBox::valueChanged
void valueChanged()
GUIUtil::dialog_flags
constexpr auto dialog_flags
Definition: guiutil.h:59
proxyType
Definition: netbase.h:48
OptionsModel::MinimizeToTray
@ MinimizeToTray
Definition: optionsmodel.h:49
OptionsModel::Reset
void Reset()
Definition: optionsmodel.cpp:206
OptionsModel::ProxyUse
@ ProxyUse
Definition: optionsmodel.h:53
CNetAddr::ToStringIP
std::string ToStringIP() const
Definition: netaddress.cpp:608
OptionsModel::node
interfaces::Node & node() const
Definition: optionsmodel.h:103
ProxyAddressValidator
Proxy address widget validator, checks for a valid proxy address.
Definition: optionsdialog.h:24
OptionsModel
Interface from Qt to configuration data structure for Bitcoin client.
Definition: optionsmodel.h:39
OptionsModel::isRestartRequired
bool isRestartRequired() const
Definition: optionsmodel.cpp:559
nMinDbCache
static const int64_t nMinDbCache
min. -dbcache (MiB)
Definition: txdb.h:33
ProxyAddressValidator::validate
State validate(QString &input, int &pos) const override
Definition: optionsdialog.cpp:417
PACKAGE_NAME
#define PACKAGE_NAME
Definition: bitcoin-config.h:362
OptionsModel::SubFeeFromAmount
@ SubFeeFromAmount
Definition: optionsmodel.h:64
node.h
OptionsDialog::setMapper
void setMapper()
Definition: optionsdialog.cpp:230
CService::ToStringPort
std::string ToStringPort() const
Definition: netaddress.cpp:1023
OptionsModel::StartAtStartup
@ StartAtStartup
Definition: optionsmodel.h:47
BitcoinUnits
Bitcoin unit definitions.
Definition: bitcoinunits.h:31
OptionsDialog::on_resetButton_clicked
void on_resetButton_clicked()
Definition: optionsdialog.cpp:279
QValidatedLineEdit
Line edit that can be marked as "invalid" to show input validation feedback.
Definition: qvalidatedlineedit.h:13
OptionsDialog::setModel
void setModel(OptionsModel *model)
Definition: optionsdialog.cpp:174
guiutil.h
OptionsDialog::ui
Ui::OptionsDialog * ui
Definition: optionsdialog.h:73
optionsdialog.h
GetNumCores
int GetNumCores()
Return the number of cores available on the current system.
Definition: system.cpp:1344
OptionsModel::ProxyIPTor
@ ProxyIPTor
Definition: optionsmodel.h:57
OptionsModel::ProxyUseTor
@ ProxyUseTor
Definition: optionsmodel.h:56
OptionsModel::ProxyPortTor
@ ProxyPortTor
Definition: optionsmodel.h:58
OptionsModel::CoinControlFeatures
@ CoinControlFeatures
Definition: optionsmodel.h:63
GUIUtil::fixedPitchFont
QFont fixedPitchFont(bool use_embedded_font)
Definition: guiutil.cpp:87
GB_BYTES
static constexpr uint64_t GB_BYTES
Definition: guiconstants.h:53
OptionsDialog::clearStatusLabel
void clearStatusLabel()
Definition: optionsdialog.cpp:365
OptionsModel::ProxyIP
@ ProxyIP
Definition: optionsmodel.h:54
QValidatedLineEdit::validationDidChange
void validationDidChange(QValidatedLineEdit *validatedLineEdit)
OptionsDialog::on_showTrayIcon_stateChanged
void on_showTrayIcon_stateChanged(int state)
Definition: optionsdialog.cpp:333
OptionsModel::Prune
@ Prune
Definition: optionsmodel.h:66
OptionsDialog::showRestartWarning
void showRestartWarning(bool fPersistent=false)
Definition: optionsdialog.cpp:348
OptionsModel::ThirdPartyTxUrls
@ ThirdPartyTxUrls
Definition: optionsmodel.h:60
OptionsModel::MapPortUPnP
@ MapPortUPnP
Definition: optionsmodel.h:50
Ui
Definition: addressbookpage.h:14
MIN_DISK_SPACE_FOR_BLOCK_FILES
static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES
Definition: validation.h:90
guiconstants.h
ProxyAddressValidator::ProxyAddressValidator
ProxyAddressValidator(QObject *parent)
Definition: optionsdialog.cpp:412
OptionsModel::Language
@ Language
Definition: optionsmodel.h:61
OptionsModel::MapPortNatpmp
@ MapPortNatpmp
Definition: optionsmodel.h:51
OptionsDialog::mapper
QDataWidgetMapper * mapper
Definition: optionsdialog.h:75
NET_ONION
@ NET_ONION
TOR (v2 or v3)
Definition: netaddress.h:56
bitcoinunits.h
NET_IPV6
@ NET_IPV6
IPv6.
Definition: netaddress.h:53
OptionsDialog::~OptionsDialog
~OptionsDialog()
Definition: optionsdialog.cpp:169
netbase.h
GUIUtil::handleCloseWindowShortcut
void handleCloseWindowShortcut(QWidget *w)
Definition: guiutil.cpp:402
LookupNumeric
CService LookupNumeric(const std::string &name, uint16_t portDefault, DNSLookupFn dns_lookup_function)
Resolve a service string with a numeric IP to its first corresponding service.
Definition: netbase.cpp:227
OptionsDialog::setCurrentTab
void setCurrentTab(OptionsDialog::Tab tab)
Definition: optionsdialog.cpp:220
OptionsDialog::setOkButtonState
void setOkButtonState(bool fState)
Definition: optionsdialog.cpp:274
optionsmodel.h
OptionsDialog::on_openBitcoinConfButton_clicked
void on_openBitcoinConfButton_clicked()
Definition: optionsdialog.cpp:297
txdb.h
OptionsModel::UseEmbeddedMonospacedFont
@ UseEmbeddedMonospacedFont
Definition: optionsmodel.h:62
OptionsDialog::togglePruneWarning
void togglePruneWarning(bool enabled)
Definition: optionsdialog.cpp:343
proxyType::proxy
CService proxy
Definition: netbase.h:56