2014-12-16 17:47:57 -08:00
|
|
|
// Copyright (c) 2011-2013 The Bitcoin Core developers
|
2014-12-12 20:09:33 -08:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
2013-11-04 07:20:43 -08:00
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2014-11-03 07:16:40 -08:00
|
|
|
#ifndef BITCOIN_QT_OPTIONSDIALOG_H
|
|
|
|
#define BITCOIN_QT_OPTIONSDIALOG_H
|
2011-05-12 00:40:40 -07:00
|
|
|
|
|
|
|
#include <QDialog>
|
2012-06-08 06:21:55 -07:00
|
|
|
|
2013-04-12 22:13:08 -07:00
|
|
|
class OptionsModel;
|
|
|
|
class QValidatedLineEdit;
|
|
|
|
|
2014-10-31 01:36:30 -07:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class QDataWidgetMapper;
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
2012-06-08 06:21:55 -07:00
|
|
|
namespace Ui {
|
|
|
|
class OptionsDialog;
|
|
|
|
}
|
2011-05-12 00:40:40 -07:00
|
|
|
|
2011-11-13 04:19:52 -08:00
|
|
|
/** Preferences dialog. */
|
2011-05-12 00:40:40 -07:00
|
|
|
class OptionsDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2012-06-08 06:21:55 -07:00
|
|
|
|
2011-05-12 00:40:40 -07:00
|
|
|
public:
|
2014-11-08 10:48:35 -08:00
|
|
|
explicit OptionsDialog(QWidget *parent, bool enableWallet);
|
2012-06-08 06:21:55 -07:00
|
|
|
~OptionsDialog();
|
2011-05-31 13:24:53 -07:00
|
|
|
|
|
|
|
void setModel(OptionsModel *model);
|
2012-06-08 06:21:55 -07:00
|
|
|
void setMapper();
|
2011-05-12 00:40:40 -07:00
|
|
|
|
2012-06-08 06:21:55 -07:00
|
|
|
protected:
|
|
|
|
bool eventFilter(QObject *object, QEvent *event);
|
2011-07-25 12:35:45 -07:00
|
|
|
|
2015-07-14 04:59:05 -07:00
|
|
|
private Q_SLOTS:
|
2013-12-03 00:10:10 -08:00
|
|
|
/* enable OK button */
|
|
|
|
void enableOkButton();
|
|
|
|
/* disable OK button */
|
|
|
|
void disableOkButton();
|
|
|
|
/* set OK button state (enabled / disabled) */
|
|
|
|
void setOkButtonState(bool fState);
|
2012-08-18 06:54:39 -07:00
|
|
|
void on_resetButton_clicked();
|
2012-06-08 06:21:55 -07:00
|
|
|
void on_okButton_clicked();
|
|
|
|
void on_cancelButton_clicked();
|
|
|
|
|
2013-12-03 00:10:10 -08:00
|
|
|
void showRestartWarning(bool fPersistent = false);
|
|
|
|
void clearStatusLabel();
|
|
|
|
void doProxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
|
2014-07-25 09:20:40 -07:00
|
|
|
/* query the networks, for which the default proxy is used */
|
|
|
|
void updateDefaultProxyNets();
|
2012-06-08 06:21:55 -07:00
|
|
|
|
2015-07-14 04:59:05 -07:00
|
|
|
Q_SIGNALS:
|
2013-12-03 00:10:10 -08:00
|
|
|
void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
|
2011-11-13 04:19:52 -08:00
|
|
|
|
2011-05-12 05:44:52 -07:00
|
|
|
private:
|
2012-06-08 06:21:55 -07:00
|
|
|
Ui::OptionsDialog *ui;
|
2011-05-31 13:24:53 -07:00
|
|
|
OptionsModel *model;
|
2014-10-23 10:08:10 -07:00
|
|
|
QDataWidgetMapper *mapper;
|
2014-07-25 09:20:40 -07:00
|
|
|
bool fProxyIpsValid;
|
2011-05-12 00:40:40 -07:00
|
|
|
};
|
|
|
|
|
2014-11-03 07:16:40 -08:00
|
|
|
#endif // BITCOIN_QT_OPTIONSDIALOG_H
|