mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-04 10:07:27 -05:00
b7f6a89a3e
7b7cd11244
clang-tidy, qt: Force checks for headers in `src/qt` (Hennadii Stepanov)69eacf2c5e
clang-tidy, qt: Fix `modernize-use-default-member-init` in headers (Hennadii Stepanov) Pull request description: This PR split from bitcoin/bitcoin#26705 and contains only changes in `src/qt`. Effectively, it fixes the clang-tidy's `modernize-use-default-member-init` errors, and forces clang-tidy checks for all headers in the `src/qt` directory. ACKs for top commit: jarolrod: ACK7b7cd11244
Tree-SHA512: 79525bb0f31ae7cad88c781e55091a21467c0485ddc1ed03ad62e051480fda3b3710619ea11af480437edba3c6e038f7c40edc6b373e3a37408c006d11b34686
82 lines
2 KiB
C++
82 lines
2 KiB
C++
// Copyright (c) 2011-2022 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_QT_OPTIONSDIALOG_H
|
|
#define BITCOIN_QT_OPTIONSDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include <QValidator>
|
|
|
|
class ClientModel;
|
|
class OptionsModel;
|
|
class QValidatedLineEdit;
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
class QDataWidgetMapper;
|
|
QT_END_NAMESPACE
|
|
|
|
namespace Ui {
|
|
class OptionsDialog;
|
|
}
|
|
|
|
/** Proxy address widget validator, checks for a valid proxy address.
|
|
*/
|
|
class ProxyAddressValidator : public QValidator
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ProxyAddressValidator(QObject *parent);
|
|
|
|
State validate(QString &input, int &pos) const override;
|
|
};
|
|
|
|
/** Preferences dialog. */
|
|
class OptionsDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit OptionsDialog(QWidget *parent, bool enableWallet);
|
|
~OptionsDialog();
|
|
|
|
enum Tab {
|
|
TAB_MAIN,
|
|
TAB_NETWORK,
|
|
};
|
|
|
|
void setClientModel(ClientModel* client_model);
|
|
void setModel(OptionsModel *model);
|
|
void setMapper();
|
|
void setCurrentTab(OptionsDialog::Tab tab);
|
|
|
|
private Q_SLOTS:
|
|
/* set OK button state (enabled / disabled) */
|
|
void setOkButtonState(bool fState);
|
|
void on_resetButton_clicked();
|
|
void on_openBitcoinConfButton_clicked();
|
|
void on_okButton_clicked();
|
|
void on_cancelButton_clicked();
|
|
|
|
void on_showTrayIcon_stateChanged(int state);
|
|
|
|
void togglePruneWarning(bool enabled);
|
|
void showRestartWarning(bool fPersistent = false);
|
|
void clearStatusLabel();
|
|
void updateProxyValidationState();
|
|
/* query the networks, for which the default proxy is used */
|
|
void updateDefaultProxyNets();
|
|
|
|
Q_SIGNALS:
|
|
void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, uint16_t nProxyPort);
|
|
void quitOnReset();
|
|
|
|
private:
|
|
Ui::OptionsDialog *ui;
|
|
ClientModel* m_client_model{nullptr};
|
|
OptionsModel* model{nullptr};
|
|
QDataWidgetMapper* mapper{nullptr};
|
|
};
|
|
|
|
#endif // BITCOIN_QT_OPTIONSDIALOG_H
|