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, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &OptionsDialog::showRestartWarning);
201  connect(ui->databaseCache, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &OptionsDialog::showRestartWarning);
202  connect(ui->threadsScriptVerif, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &OptionsDialog::showRestartWarning);
203  /* Wallet */
204  connect(ui->spendZeroConfChange, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
205  /* Network */
206  connect(ui->allowIncoming, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
207  connect(ui->connectSocks, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
208  connect(ui->connectSocksTor, &QCheckBox::clicked, this, &OptionsDialog::showRestartWarning);
209  /* Display */
210  connect(ui->lang, static_cast<void (QValueComboBox::*)()>(&QValueComboBox::valueChanged), [this]{ showRestartWarning(); });
211  connect(ui->thirdPartyTxUrls, &QLineEdit::textChanged, [this]{ showRestartWarning(); });
212 }
213 
215 {
216  QWidget *tab_widget = nullptr;
217  if (tab == OptionsDialog::Tab::TAB_NETWORK) tab_widget = ui->tabNetwork;
218  if (tab == OptionsDialog::Tab::TAB_MAIN) tab_widget = ui->tabMain;
219  if (tab_widget && ui->tabWidget->currentWidget() != tab_widget) {
220  ui->tabWidget->setCurrentWidget(tab_widget);
221  }
222 }
223 
225 {
226  /* Main */
227  mapper->addMapping(ui->bitcoinAtStartup, OptionsModel::StartAtStartup);
228  mapper->addMapping(ui->threadsScriptVerif, OptionsModel::ThreadsScriptVerif);
229  mapper->addMapping(ui->databaseCache, OptionsModel::DatabaseCache);
230  mapper->addMapping(ui->prune, OptionsModel::Prune);
231  mapper->addMapping(ui->pruneSize, OptionsModel::PruneSize);
232 
233  /* Wallet */
234  mapper->addMapping(ui->spendZeroConfChange, OptionsModel::SpendZeroConfChange);
235  mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures);
236 
237  /* Network */
238  mapper->addMapping(ui->mapPortUpnp, OptionsModel::MapPortUPnP);
239  mapper->addMapping(ui->mapPortNatpmp, OptionsModel::MapPortNatpmp);
240  mapper->addMapping(ui->allowIncoming, OptionsModel::Listen);
241 
242  mapper->addMapping(ui->connectSocks, OptionsModel::ProxyUse);
243  mapper->addMapping(ui->proxyIp, OptionsModel::ProxyIP);
244  mapper->addMapping(ui->proxyPort, OptionsModel::ProxyPort);
245 
246  mapper->addMapping(ui->connectSocksTor, OptionsModel::ProxyUseTor);
247  mapper->addMapping(ui->proxyIpTor, OptionsModel::ProxyIPTor);
248  mapper->addMapping(ui->proxyPortTor, OptionsModel::ProxyPortTor);
249 
250  /* Window */
251 #ifndef Q_OS_MAC
252  if (QSystemTrayIcon::isSystemTrayAvailable()) {
253  mapper->addMapping(ui->showTrayIcon, OptionsModel::ShowTrayIcon);
254  mapper->addMapping(ui->minimizeToTray, OptionsModel::MinimizeToTray);
255  }
256  mapper->addMapping(ui->minimizeOnClose, OptionsModel::MinimizeOnClose);
257 #endif
258 
259  /* Display */
260  mapper->addMapping(ui->lang, OptionsModel::Language);
261  mapper->addMapping(ui->unit, OptionsModel::DisplayUnit);
262  mapper->addMapping(ui->thirdPartyTxUrls, OptionsModel::ThirdPartyTxUrls);
263  mapper->addMapping(ui->embeddedFont_radioButton, OptionsModel::UseEmbeddedMonospacedFont);
264 }
265 
267 {
268  ui->okButton->setEnabled(fState);
269 }
270 
272 {
273  if(model)
274  {
275  // confirmation dialog
276  QMessageBox::StandardButton btnRetVal = QMessageBox::question(this, tr("Confirm options reset"),
277  tr("Client restart required to activate changes.") + "<br><br>" + tr("Client will be shut down. Do you want to proceed?"),
278  QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
279 
280  if(btnRetVal == QMessageBox::Cancel)
281  return;
282 
283  /* reset all options and close GUI */
284  model->Reset();
285  QApplication::quit();
286  }
287 }
288 
290 {
291  /* explain the purpose of the config file */
292  QMessageBox::information(this, tr("Configuration options"),
293  tr("The configuration file is used to specify advanced user options which override GUI settings. "
294  "Additionally, any command-line options will override this configuration file."));
295 
296  /* show an error if there was some problem opening the file */
298  QMessageBox::critical(this, tr("Error"), tr("The configuration file could not be opened."));
299 }
300 
302 {
303  mapper->submit();
304  accept();
306 }
307 
309 {
310  reject();
311 }
312 
314 {
315  if (state == Qt::Checked) {
316  ui->minimizeToTray->setEnabled(true);
317  } else {
318  ui->minimizeToTray->setChecked(false);
319  ui->minimizeToTray->setEnabled(false);
320  }
321 }
322 
324 {
325  ui->pruneWarning->setVisible(!ui->pruneWarning->isVisible());
326 }
327 
328 void OptionsDialog::showRestartWarning(bool fPersistent)
329 {
330  ui->statusLabel->setStyleSheet("QLabel { color: red; }");
331 
332  if(fPersistent)
333  {
334  ui->statusLabel->setText(tr("Client restart required to activate changes."));
335  }
336  else
337  {
338  ui->statusLabel->setText(tr("This change would require a client restart."));
339  // clear non-persistent status label after 10 seconds
340  // Todo: should perhaps be a class attribute, if we extend the use of statusLabel
341  QTimer::singleShot(10000, this, &OptionsDialog::clearStatusLabel);
342  }
343 }
344 
346 {
347  ui->statusLabel->clear();
348  if (model && model->isRestartRequired()) {
349  showRestartWarning(true);
350  }
351 }
352 
354 {
355  QValidatedLineEdit *pUiProxyIp = ui->proxyIp;
356  QValidatedLineEdit *otherProxyWidget = (pUiProxyIp == ui->proxyIpTor) ? ui->proxyIp : ui->proxyIpTor;
357  if (pUiProxyIp->isValid() && (!ui->proxyPort->isEnabled() || ui->proxyPort->text().toInt() > 0) && (!ui->proxyPortTor->isEnabled() || ui->proxyPortTor->text().toInt() > 0))
358  {
359  setOkButtonState(otherProxyWidget->isValid()); //only enable ok button if both proxys are valid
361  }
362  else
363  {
364  setOkButtonState(false);
365  ui->statusLabel->setStyleSheet("QLabel { color: red; }");
366  ui->statusLabel->setText(tr("The supplied proxy address is invalid."));
367  }
368 }
369 
371 {
372  proxyType proxy;
373  std::string strProxy;
374  QString strDefaultProxyGUI;
375 
376  model->node().getProxy(NET_IPV4, proxy);
377  strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
378  strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
379  (strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachIPv4->setChecked(true) : ui->proxyReachIPv4->setChecked(false);
380 
381  model->node().getProxy(NET_IPV6, proxy);
382  strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
383  strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
384  (strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachIPv6->setChecked(true) : ui->proxyReachIPv6->setChecked(false);
385 
386  model->node().getProxy(NET_ONION, proxy);
387  strProxy = proxy.proxy.ToStringIP() + ":" + proxy.proxy.ToStringPort();
388  strDefaultProxyGUI = ui->proxyIp->text() + ":" + ui->proxyPort->text();
389  (strProxy == strDefaultProxyGUI.toStdString()) ? ui->proxyReachTor->setChecked(true) : ui->proxyReachTor->setChecked(false);
390 }
391 
393 QValidator(parent)
394 {
395 }
396 
397 QValidator::State ProxyAddressValidator::validate(QString &input, int &pos) const
398 {
399  Q_UNUSED(pos);
400  // Validate the proxy
401  CService serv(LookupNumeric(input.toStdString(), DEFAULT_GUI_PROXY_PORT));
402  proxyType addrProxy = proxyType(serv, true);
403  if (addrProxy.IsValid())
404  return QValidator::Acceptable;
405 
406  return QValidator::Invalid;
407 }
OptionsDialog
Preferences dialog.
Definition: optionsdialog.h:35
CService
A combination of a network address (CNetAddr) and a (TCP) port.
Definition: netaddress.h:551
QValidatedLineEdit::isValid
bool isValid()
Definition: qvalidatedlineedit.cpp:111
OptionsDialog::Tab
Tab
Definition: optionsdialog.h:43
GUIUtil::openBitcoinConf
bool openBitcoinConf()
Definition: guiutil.cpp:407
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:301
NET_IPV4
@ NET_IPV4
IPv4.
Definition: netaddress.h:49
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:308
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:90
OptionsModel::Listen
@ Listen
Definition: optionsmodel.h:69
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:75
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:370
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:58
OptionsModel::ProxyPort
@ ProxyPort
Definition: optionsmodel.h:55
OptionsDialog::updateProxyValidationState
void updateProxyValidationState()
Definition: optionsdialog.cpp:353
OptionsModel::DatabaseCache
@ DatabaseCache
Definition: optionsmodel.h:67
OptionsModel::SpendZeroConfChange
@ SpendZeroConfChange
Definition: optionsmodel.h:68
GUIUtil::ItemDelegate
Definition: guiutil.h:247
bitcoin-config.h
GUIUtil::ItemDelegate::keyEscapePressed
void keyEscapePressed()
QValueComboBox::valueChanged
void valueChanged()
GUIUtil::dialog_flags
constexpr auto dialog_flags
Definition: guiutil.h:51
proxyType
Definition: netbase.h:48
OptionsModel::MinimizeToTray
@ MinimizeToTray
Definition: optionsmodel.h:49
OptionsModel::Reset
void Reset()
Definition: optionsmodel.cpp:193
OptionsModel::ProxyUse
@ ProxyUse
Definition: optionsmodel.h:53
CNetAddr::ToStringIP
std::string ToStringIP() const
Definition: netaddress.cpp:570
QValueComboBox
Definition: qvaluecombobox.h:12
OptionsModel::node
interfaces::Node & node() const
Definition: optionsmodel.h:100
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:532
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:397
PACKAGE_NAME
#define PACKAGE_NAME
Definition: bitcoin-config.h:365
node.h
OptionsDialog::setMapper
void setMapper()
Definition: optionsdialog.cpp:224
CService::ToStringPort
std::string ToStringPort() const
Definition: netaddress.cpp:1014
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:271
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:1336
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:83
GB_BYTES
static constexpr uint64_t GB_BYTES
Definition: guiconstants.h:53
OptionsDialog::clearStatusLabel
void clearStatusLabel()
Definition: optionsdialog.cpp:345
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:313
OptionsModel::Prune
@ Prune
Definition: optionsmodel.h:65
OptionsDialog::showRestartWarning
void showRestartWarning(bool fPersistent=false)
Definition: optionsdialog.cpp:328
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:392
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:55
if
if(expired !=0)
Definition: validation.cpp:349
bitcoinunits.h
NET_IPV6
@ NET_IPV6
IPv6.
Definition: netaddress.h:52
OptionsDialog::~OptionsDialog
~OptionsDialog()
Definition: optionsdialog.cpp:164
netbase.h
GUIUtil::handleCloseWindowShortcut
void handleCloseWindowShortcut(QWidget *w)
Definition: guiutil.cpp:393
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:214
OptionsDialog::setOkButtonState
void setOkButtonState(bool fState)
Definition: optionsdialog.cpp:266
optionsmodel.h
OptionsDialog::on_openBitcoinConfButton_clicked
void on_openBitcoinConfButton_clicked()
Definition: optionsdialog.cpp:289
txdb.h
OptionsModel::UseEmbeddedMonospacedFont
@ UseEmbeddedMonospacedFont
Definition: optionsmodel.h:62
OptionsDialog::togglePruneWarning
void togglePruneWarning(bool enabled)
Definition: optionsdialog.cpp:323
proxyType::proxy
CService proxy
Definition: netbase.h:56