Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1// Copyright (c) 2011-present The Bitcoin Core developers2// Distributed under the MIT software license, see the accompanying3// file COPYING or http://www.opensource.org/licenses/mit-license.php.5#ifndef BITCOIN_QT_OPTIONSDIALOG_H6#define BITCOIN_QT_OPTIONSDIALOG_H8#include <QDialog>9#include <QValidator>11class ClientModel;12class OptionsModel;13class QValidatedLineEdit;15QT_BEGIN_NAMESPACE16class QDataWidgetMapper;17QT_END_NAMESPACE19namespace Ui {20class OptionsDialog;21}23/** Proxy address widget validator, checks for a valid proxy address.24*/25class ProxyAddressValidator : public QValidator26{27Q_OBJECT29public:30explicit ProxyAddressValidator(QObject *parent);32State validate(QString &input, int &pos) const override;33};35/** Preferences dialog. */36class OptionsDialog : public QDialog37{38Q_OBJECT40public:41explicit OptionsDialog(QWidget *parent, bool enableWallet);42~OptionsDialog();44enum Tab {45TAB_MAIN,46TAB_NETWORK,47};49void setClientModel(ClientModel* client_model);50void setModel(OptionsModel *model);51void setMapper();52void setCurrentTab(OptionsDialog::Tab tab);54private Q_SLOTS:55/* set OK button state (enabled / disabled) */56void setOkButtonState(bool fState);57void on_resetButton_clicked();58void on_openBitcoinConfButton_clicked();59void on_okButton_clicked();60void on_cancelButton_clicked();62void on_showTrayIcon_stateChanged(int state);64void togglePruneWarning(bool enabled);65void showRestartWarning(bool fPersistent = false);66void clearStatusLabel();67void updateProxyValidationState();68/* query the networks, for which the default proxy is used */69void updateDefaultProxyNets();71Q_SIGNALS:72void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, uint16_t nProxyPort);73void quitOnReset();75private:76Ui::OptionsDialog *ui;77ClientModel* m_client_model{nullptr};78OptionsModel* model{nullptr};79QDataWidgetMapper* mapper{nullptr};80};82#endif // BITCOIN_QT_OPTIONSDIALOG_H
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.