Bitcoin Core  21.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  /* Display elements init */
96  QDir translations(":translations");
97 
98  ui->bitcoinAtStartup->setToolTip(ui->bitcoinAtStartup->toolTip().arg(PACKAGE_NAME));
99  ui->bitcoinAtStartup->setText(ui->bitcoinAtStartup->text().arg(PACKAGE_NAME));
100 
101  ui->openBitcoinConfButton->setToolTip(ui->openBitcoinConfButton->toolTip().arg(PACKAGE_NAME));
102 
103  ui->lang->setToolTip(ui->lang->toolTip().arg(PACKAGE_NAME));
104  ui->lang->addItem(QString("(") + tr("default") + QString(")"), QVariant(""));
105  for (const QString &langStr : translations.entryList())
106  {
107  QLocale locale(langStr);
108 
110  if(langStr.contains("_"))
111  {
113  ui->lang->addItem(locale.nativeLanguageName() + QString(" - ") + locale.nativeCountryName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
114  }
115  else
116  {
118  ui->lang->addItem(locale.nativeLanguageName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
119  }
120  }
121  ui->unit->setModel(new BitcoinUnits(this));
122 
123  /* Widget-to-option mapper */
124  mapper = new QDataWidgetMapper(this);
125  mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
126  mapper->setOrientation(Qt::Vertical);
127 
129  connect(delegate, &GUIUtil::ItemDelegate::keyEscapePressed, this, &OptionsDialog::reject);
130  mapper->setItemDelegate(delegate);
131 
132  /* setup/change UI elements when proxy IPs are invalid/valid */
133  ui->proxyIp->setCheckValidator(new ProxyAddressValidator(parent));
134  ui->proxyIpTor->setCheckValidator(new ProxyAddressValidator(parent));
137  connect(ui->proxyPort, &QLineEdit::textChanged, this, &OptionsDialog::updateProxyValidationState);
138  connect(ui->proxyPortTor, &QLineEdit::textChanged, this, &OptionsDialog::updateProxyValidationState);
139 
140  if (!QSystemTrayIcon::isSystemTrayAvailable()) {
141  ui->showTrayIcon->setChecked(false);
142  ui->showTrayIcon->setEnabled(false);
143  ui->minimizeToTray->setChecked(false);
144  ui->minimizeToTray->setEnabled(false);
145  }
146 
147  QFont embedded_font{GUIUtil::fixedPitchFont(true)};
148  ui->embeddedFont_radioButton->setText(ui->embeddedFont_radioButton->text().arg(QFontInfo(embedded_font).family()));
149  embedded_font.setWeight(QFont::Bold);
150  ui->embeddedFont_label_1->setFont(embedded_font);
151  ui->embeddedFont_label_9->setFont(embedded_font);
152 
153  QFont system_font{GUIUtil::fixedPitchFont(false)};
154  ui->systemFont_radioButton->setText(ui->systemFont_radioButton->text().arg(QFontInfo(system_font).family()));
155  system_font.setWeight(QFont::Bold);
156  ui->systemFont_label_1->setFont(system_font);
157  ui->systemFont_label_9->setFont(system_font);
158  // Checking the embeddedFont_radioButton automatically unchecks the systemFont_radioButton.
159  ui->systemFont_radioButton->setChecked(true);
160 
162 }
163 
165 {
166  delete ui;
167 }
168 
170 {
171  this->model = _model;
172 
173  if(_model)
174  {
175  /* check if client restart is needed and show persistent message */
176  if (_model->isRestartRequired())
177  showRestartWarning(true);
178 
179  // Prune values are in GB to be consistent with intro.cpp
180  static constexpr uint64_t nMinDiskSpace = (MIN_DISK_SPACE_FOR_BLOCK_FILES / GB_BYTES) + (MIN_DISK_SPACE_FOR_BLOCK_FILES % GB_BYTES) ? 1 : 0;
181  ui->pruneSize->setRange(nMinDiskSpace, std::numeric_limits<int>::max());
182 
183  QString strLabel = _model->getOverriddenByCommandLine();
184  if (strLabel.isEmpty())
185  strLabel = tr("none");
186  ui->overriddenByCommandLineLabel->setText(strLabel);
187 
188  mapper->setModel(_model);
189  setMapper();
190  mapper->toFirst();
191 
193  }
194 
195  /* warn when one of the following settings changes by user action (placed here so init via mapper doesn't trigger them) */
196 
197  /* Main */
198  connect(ui->prune, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
199  connect(ui->prune, &QCheckBox::clicked, this, &OptionsDialog::togglePruneWarning);
200  connect(ui->pruneSize, qOverload<int>(&QSpinBox::valueChanged), this, &OptionsDialog::showRestartWarning);
201  connect(ui->databaseCache, qOverload<int>(&QSpinBox::valueChanged), this, &OptionsDialog::showRestartWarning);
202  connect(ui->externalSignerPath, &QLineEdit::textChanged, [this]{ showRestartWarning(); });
203  connect(ui->threadsScriptVerif, qOverload<int>(&QSpinBox::valueChanged), this, &OptionsDialog::showRestartWarning);
204  /* Wallet */
205  connect(ui->spendZeroConfChange, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
206  /* Network */
207  connect(ui->allowIncoming, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
208  connect(ui->connectSocks, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
209  connect(ui->connectSocksTor, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
210  /* Display */
211  connect(ui->lang, qOverload<>(&QValueComboBox::valueChanged), [this]{ showRestartWarning(); });
212  connect(ui->thirdPartyTxUrls, &QLineEdit::textChanged, [this]{ showRestartWarning(); });
213 }
214 
216 {
217  QWidget *tab_widget = nullptr;
218  if (tab == OptionsDialog::Tab::TAB_NETWORK) tab_widget = ui->tabNetwork;
219  if (tab == OptionsDialog::Tab::TAB_MAIN) tab_widget = ui->tabMain;
220  if (tab_widget && ui->tabWidget->currentWidget() != tab_widget) {
221  ui->tabWidget->setCurrentWidget(tab_widget);
222  }
223 }
224 
226 {
227  /* Main */
228  mapper->addMapping(ui->bitcoinAtStartup, OptionsModel::StartAtStartup);
229  mapper->addMapping(ui->threadsScriptVerif, OptionsModel::ThreadsScriptVerif);
230  mapper->addMapping(ui->databaseCache, OptionsModel::DatabaseCache);
231  mapper->addMapping(ui->prune, OptionsModel::Prune);
232  mapper->addMapping(ui->pruneSize, OptionsModel::PruneSize);
233 
234  /* Wallet */
235  mapper->addMapping(ui->spendZeroConfChange, OptionsModel::SpendZeroConfChange);
236  mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures);
237  mapper->addMapping(ui->externalSignerPath, OptionsModel::ExternalSignerPath);
238 
239  /* Network */
240  mapper->addMapping(ui->mapPortUpnp, OptionsModel::MapPortUPnP);
241  mapper->addMapping(ui->mapPortNatpmp, OptionsModel::MapPortNatpmp);
242  mapper->addMapping(ui->allowIncoming, OptionsModel::Listen);
243 
244  mapper->addMapping(ui->connectSocks, OptionsModel::ProxyUse);
245  mapper->addMapping(ui->proxyIp, OptionsModel::ProxyIP);
246  mapper->addMapping(ui->proxyPort, OptionsModel::ProxyPort);
247 
248  mapper->addMapping(ui->connectSocksTor, OptionsModel::ProxyUseTor);
249  mapper->addMapping(ui->proxyIpTor, OptionsModel::ProxyIPTor);
250  mapper->addMapping(ui->proxyPortTor, OptionsModel::ProxyPortTor);
251 
252  /* Window */
253 #ifndef Q_OS_MAC
254  if (QSystemTrayIcon::isSystemTrayAvailable()) {
255  mapper->addMapping(ui->showTrayIcon, OptionsModel::ShowTrayIcon);
256  mapper->addMapping(ui->minimizeToTray, OptionsModel::MinimizeToTray);
257  }
258  mapper->addMapping(ui->minimizeOnClose, OptionsModel::MinimizeOnClose);
259 #endif
260 
261  /* Display */
262  mapper->addMapping(ui->lang, OptionsModel::Language);
263  mapper->addMapping(ui->unit, OptionsModel::DisplayUnit);
264  mapper->addMapping(ui->thirdPartyTxUrls, OptionsModel::ThirdPartyTxUrls);
265  mapper->addMapping(ui->embeddedFont_radioButton, OptionsModel::UseEmbeddedMonospacedFont);
266 }
267 
269 {
270  ui->okButton->setEnabled(fState);
271 }
272 
274 {
275  if(model)
276  {
277  // confirmation dialog
278  QMessageBox::StandardButton btnRetVal = QMessageBox::question(this, tr("Confirm options reset"),
279  tr("Client restart required to activate changes.") + "<br><br>" + tr("Client will be shut down. Do you want to proceed?"),
280  QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
281 
282  if(btnRetVal == QMessageBox::Cancel)
283  return;
284 
285  /* reset all options and close GUI */
286  model->Reset();
287  QApplication::quit();
288  }
289 }
290 
292 {
293  /* explain the purpose of the config file */
294  QMessageBox::information(this, tr("Configuration options"),
295  tr("The configuration file is used to specify advanced user options which override GUI settings. "
296  "Additionally, any command-line options will override this configuration file."));
297 
298  /* show an error if there was some problem opening the file */
300  QMessageBox::critical(this, tr("Error"), tr("The configuration file could not be opened."));
301 }
302 
304 {
305  mapper->submit();
306  accept();
308 }
309 
311 {
312  reject();
313 }
314 
316 {
317  if (state == Qt::Checked) {
318  ui->minimizeToTray->setEnabled(true);
319  } else {
320  ui->minimizeToTray->setChecked(false);
321  ui->minimizeToTray->setEnabled(false);
322  }
323 }
324 
326 {
327  ui->pruneWarning->setVisible(!ui->pruneWarning->isVisible());
328 }
329 
330 void OptionsDialog::showRestartWarning(bool fPersistent)
331 {
332  ui->statusLabel->setStyleSheet("QLabel { color: red; }");
333 
334  if(fPersistent)
335  {
336  ui->statusLabel->setText(tr("Client restart required to activate changes."));
337  }
338  else
339  {
340  ui->statusLabel->setText(tr("This change would require a client restart."));
341  // clear non-persistent status label after 10 seconds
342  // Todo: should perhaps be a class attribute, if we extend the use of statusLabel
343  QTimer::singleShot(10000, this, &OptionsDialog::clearStatusLabel);
344  }
345 }
346 
348 {
349  ui->statusLabel->clear();
350  if (model && model->isRestartRequired()) {
351  showRestartWarning(true);
352  }
353 }
354 
356 {
357  QValidatedLineEdit *pUiProxyIp = ui->proxyIp;
358  QValidatedLineEdit *otherProxyWidget = (pUiProxyIp == ui->proxyIpTor) ? ui->proxyIp : ui->proxyIpTor;
359  if (pUiProxyIp->isValid() && (!ui->proxyPort->isEnabled() || ui->proxyPort->text().toInt() > 0) && (!ui->proxyPortTor->isEnabled() || ui->proxyPortTor->text().toInt() > 0))
360  {
361  setOkButtonState(otherProxyWidget->isValid()); //only enable ok button if both proxys are valid
363  }
364  else
365  {
366  setOkButtonState(false);
367  ui->statusLabel->setStyleSheet("QLabel { color: red; }");
368  ui->statusLabel->setText(tr("The supplied proxy address is invalid."));
369  }
370 }
371 
373 {
374  proxyType proxy;
375  std::string strProxy;
376  QString strDefaultProxyGUI;
377 
378  model->node().getProxy(NET_IPV4, proxy);
379  strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
380  strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
381  (strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachIPv4->setChecked(true) : ui->proxyReachIPv4->setChecked(false);
382 
383  model->node().getProxy(NET_IPV6, proxy);
384  strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
385  strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
386  (strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachIPv6->setChecked(true) : ui->proxyReachIPv6->setChecked(false);
387 
388  model->node().getProxy(NET_ONION, proxy);
389  strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
390  strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
391  (strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachTor->setChecked(true) : ui->proxyReachTor->setChecked(false);
392 }
393 
395 QValidator(parent)
396 {
397 }
398 
399 QValidator::State ProxyAddressValidator::validate(QString &input, int &pos) const
400 {
401  Q_UNUSED(pos);
402  // Validate the proxy
403  CService serv(LookupNumeric(input.toStdString(), DEFAULT_GUI_PROXY_PORT));
404  proxyType addrProxy = proxyType(serv, true);
405  if (addrProxy.IsValid())
406  return QValidator::Acceptable;
407 
408  return QValidator::Invalid;
409 }
OptionsDialog
Preferences dialog.
Definition: optionsdialog.h:35
CService
A combination of a network address (CNetAddr) and a (TCP) port.
Definition: netaddress.h:557
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:303
NET_IPV4
@ NET_IPV4
IPv4.
Definition: netaddress.h:51
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:310
OptionsModel::ThreadsScriptVerif
@ ThreadsScriptVerif
Definition: optionsmodel.h:64
OptionsModel::PruneSize
@ PruneSize
Definition: optionsmodel.h:66
OptionsModel::DisplayUnit
@ DisplayUnit
Definition: optionsmodel.h:59
OptionsModel::getOverriddenByCommandLine
const QString & getOverriddenByCommandLine()
Definition: optionsmodel.h:91
OptionsModel::Listen
@ Listen
Definition: optionsmodel.h:70
nMaxDbCache
static const int64_t nMaxDbCache
max. -dbcache (MiB)
Definition: txdb.h:28
MAX_SCRIPTCHECK_THREADS
static const int MAX_SCRIPTCHECK_THREADS
Maximum number of dedicated script-checking threads allowed.
Definition: validation.h:76
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:372
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:355
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: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:201
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:101
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:548
nMinDbCache
static const int64_t nMinDbCache
min. -dbcache (MiB)
Definition: txdb.h:30
ProxyAddressValidator::validate
State validate(QString &input, int &pos) const override
Definition: optionsdialog.cpp:399
PACKAGE_NAME
#define PACKAGE_NAME
Definition: bitcoin-config.h:365
node.h
OptionsDialog::setMapper
void setMapper()
Definition: optionsdialog.cpp:225
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:273
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:169
guiutil.h
OptionsDialog::ui
Ui::OptionsDialog * ui
Definition: optionsdialog.h:73
optionsdialog.h
OptionsModel::ProxyIPTor
@ ProxyIPTor
Definition: optionsmodel.h:57
OptionsModel::ProxyUseTor
@ ProxyUseTor
Definition: optionsmodel.h:56
GetNumCores
int GetNumCores()
Return the number of cores available on the current system.
Definition: system.cpp:1332
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:347
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:315
OptionsModel::Prune
@ Prune
Definition: optionsmodel.h:65
OptionsDialog::showRestartWarning
void showRestartWarning(bool fPersistent=false)
Definition: optionsdialog.cpp:330
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:100
guiconstants.h
ProxyAddressValidator::ProxyAddressValidator
ProxyAddressValidator(QObject *parent)
Definition: optionsdialog.cpp:394
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:57
if
if(expired !=0)
Definition: validation.cpp:309
bitcoinunits.h
NET_IPV6
@ NET_IPV6
IPv6.
Definition: netaddress.h:54
OptionsDialog::~OptionsDialog
~OptionsDialog()
Definition: optionsdialog.cpp:164
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:229
OptionsDialog::setCurrentTab
void setCurrentTab(OptionsDialog::Tab tab)
Definition: optionsdialog.cpp:215
OptionsDialog::setOkButtonState
void setOkButtonState(bool fState)
Definition: optionsdialog.cpp:268
optionsmodel.h
OptionsDialog::on_openBitcoinConfButton_clicked
void on_openBitcoinConfButton_clicked()
Definition: optionsdialog.cpp:291
txdb.h
OptionsModel::UseEmbeddedMonospacedFont
@ UseEmbeddedMonospacedFont
Definition: optionsmodel.h:62
OptionsDialog::togglePruneWarning
void togglePruneWarning(bool enabled)
Definition: optionsdialog.cpp:325
proxyType::proxy
CService proxy
Definition: netbase.h:56