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