Bitcoin Core 28.99.0
P2P Digital Currency
optionsdialog.h
Go to the documentation of this file.
1// Copyright (c) 2011-2022 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 ClientModel;
12class OptionsModel;
14
15QT_BEGIN_NAMESPACE
16class QDataWidgetMapper;
17QT_END_NAMESPACE
18
19namespace Ui {
20class OptionsDialog;
21}
22
25class ProxyAddressValidator : public QValidator
26{
27 Q_OBJECT
28
29public:
30 explicit ProxyAddressValidator(QObject *parent);
31
32 State validate(QString &input, int &pos) const override;
33};
34
36class OptionsDialog : public QDialog
37{
38 Q_OBJECT
39
40public:
41 explicit OptionsDialog(QWidget *parent, bool enableWallet);
43
44 enum Tab {
47 };
48
49 void setClientModel(ClientModel* client_model);
51 void setMapper();
53
54private Q_SLOTS:
55 /* set OK button state (enabled / disabled) */
56 void setOkButtonState(bool fState);
61
62 void on_showTrayIcon_stateChanged(int state);
63
64 void togglePruneWarning(bool enabled);
65 void showRestartWarning(bool fPersistent = false);
66 void clearStatusLabel();
68 /* query the networks, for which the default proxy is used */
70
71Q_SIGNALS:
72 void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, uint16_t nProxyPort);
74
75private:
76 Ui::OptionsDialog *ui;
79 QDataWidgetMapper* mapper{nullptr};
80};
81
82#endif // BITCOIN_QT_OPTIONSDIALOG_H
Model for Bitcoin network client.
Definition: clientmodel.h:57
Preferences dialog.
Definition: optionsdialog.h:37
void setModel(OptionsModel *model)
OptionsModel * model
Definition: optionsdialog.h:78
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)
ClientModel * m_client_model
Definition: optionsdialog.h:77
void on_resetButton_clicked()
Ui::OptionsDialog * ui
Definition: optionsdialog.h:76
void quitOnReset()
OptionsDialog(QWidget *parent, bool enableWallet)
QDataWidgetMapper * mapper
Definition: optionsdialog.h:79
void clearStatusLabel()
void setClientModel(ClientModel *client_model)
void on_cancelButton_clicked()
void setOkButtonState(bool fState)
Interface from Qt to configuration data structure for Bitcoin client.
Definition: optionsmodel.h:43
Proxy address widget validator, checks for a valid proxy address.
Definition: optionsdialog.h:26
ProxyAddressValidator(QObject *parent)
State validate(QString &input, int &pos) const override
Line edit that can be marked as "invalid" to show input validation feedback.