Bitcoin Core 22.99.0
P2P Digital Currency
optionsdialog.h
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#ifndef BITCOIN_QT_OPTIONSDIALOG_H
6#define BITCOIN_QT_OPTIONSDIALOG_H
7
8#include <QDialog>
9#include <QValidator>
10
11class OptionsModel;
13
14QT_BEGIN_NAMESPACE
15class QDataWidgetMapper;
16QT_END_NAMESPACE
17
18namespace Ui {
19class OptionsDialog;
20}
21
24class ProxyAddressValidator : public QValidator
25{
26 Q_OBJECT
27
28public:
29 explicit ProxyAddressValidator(QObject *parent);
30
31 State validate(QString &input, int &pos) const override;
32};
33
35class OptionsDialog : public QDialog
36{
37 Q_OBJECT
38
39public:
40 explicit OptionsDialog(QWidget *parent, bool enableWallet);
42
43 enum Tab {
46 };
47
49 void setMapper();
51
52private Q_SLOTS:
53 /* set OK button state (enabled / disabled) */
54 void setOkButtonState(bool fState);
59
60 void on_showTrayIcon_stateChanged(int state);
61
62 void togglePruneWarning(bool enabled);
63 void showRestartWarning(bool fPersistent = false);
64 void clearStatusLabel();
66 /* query the networks, for which the default proxy is used */
68
69Q_SIGNALS:
70 void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, uint16_t nProxyPort);
71 void quitOnReset();
72
73private:
76 QDataWidgetMapper *mapper;
77};
78
79#endif // BITCOIN_QT_OPTIONSDIALOG_H
Preferences dialog.
Definition: optionsdialog.h:36
void setModel(OptionsModel *model)
OptionsModel * model
Definition: optionsdialog.h:75
void setCurrentTab(OptionsDialog::Tab tab)
void on_showTrayIcon_stateChanged(int state)
void on_okButton_clicked()
void on_openBitcoinConfButton_clicked()
void updateDefaultProxyNets()
void updateProxyValidationState()
void togglePruneWarning(bool enabled)
void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, uint16_t nProxyPort)
void showRestartWarning(bool fPersistent=false)
void on_resetButton_clicked()
Ui::OptionsDialog * ui
Definition: optionsdialog.h:74
OptionsDialog(QWidget *parent, bool enableWallet)
QDataWidgetMapper * mapper
Definition: optionsdialog.h:76
void clearStatusLabel()
void on_cancelButton_clicked()
void setOkButtonState(bool fState)
Interface from Qt to configuration data structure for Bitcoin client.
Definition: optionsmodel.h:39
Proxy address widget validator, checks for a valid proxy address.
Definition: optionsdialog.h:25
ProxyAddressValidator(QObject *parent)
State validate(QString &input, int &pos) const override
Line edit that can be marked as "invalid" to show input validation feedback.