2013-11-04 16:20:43 +01:00
|
|
|
// Copyright (c) 2011-2013 The Bitcoin developers
|
|
|
|
// Distributed under the MIT/X11 software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2011-05-12 09:40:40 +02:00
|
|
|
#ifndef OPTIONSDIALOG_H
|
|
|
|
#define OPTIONSDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2012-06-08 15:21:55 +02:00
|
|
|
|
2013-04-13 07:13:08 +02:00
|
|
|
class MonitoredDataMapper;
|
|
|
|
class OptionsModel;
|
|
|
|
class QValidatedLineEdit;
|
|
|
|
|
2012-06-08 15:21:55 +02:00
|
|
|
namespace Ui {
|
|
|
|
class OptionsDialog;
|
|
|
|
}
|
2011-05-12 09:40:40 +02:00
|
|
|
|
2011-11-13 13:19:52 +01:00
|
|
|
/** Preferences dialog. */
|
2011-05-12 09:40:40 +02:00
|
|
|
class OptionsDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2012-06-08 15:21:55 +02:00
|
|
|
|
2011-05-12 09:40:40 +02:00
|
|
|
public:
|
2013-11-14 19:47:45 +01:00
|
|
|
explicit OptionsDialog(QWidget *parent);
|
2012-06-08 15:21:55 +02:00
|
|
|
~OptionsDialog();
|
2011-05-31 22:24:53 +02:00
|
|
|
|
|
|
|
void setModel(OptionsModel *model);
|
2012-06-08 15:21:55 +02:00
|
|
|
void setMapper();
|
2011-05-12 09:40:40 +02:00
|
|
|
|
2012-06-08 15:21:55 +02:00
|
|
|
protected:
|
|
|
|
bool eventFilter(QObject *object, QEvent *event);
|
2011-07-25 21:35:45 +02:00
|
|
|
|
2011-06-01 09:33:48 +02:00
|
|
|
private slots:
|
2013-12-03 09:10:10 +01:00
|
|
|
/* enable OK button */
|
|
|
|
void enableOkButton();
|
|
|
|
/* disable OK button */
|
|
|
|
void disableOkButton();
|
|
|
|
/* set OK button state (enabled / disabled) */
|
|
|
|
void setOkButtonState(bool fState);
|
2012-08-18 15:54:39 +02:00
|
|
|
void on_resetButton_clicked();
|
2012-06-08 15:21:55 +02:00
|
|
|
void on_okButton_clicked();
|
|
|
|
void on_cancelButton_clicked();
|
|
|
|
|
2013-12-03 09:10:10 +01:00
|
|
|
void showRestartWarning(bool fPersistent = false);
|
|
|
|
void clearStatusLabel();
|
2012-06-08 15:21:55 +02:00
|
|
|
void updateDisplayUnit();
|
2013-12-03 09:10:10 +01:00
|
|
|
void doProxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
|
2012-06-08 15:21:55 +02:00
|
|
|
|
|
|
|
signals:
|
2013-12-03 09:10:10 +01:00
|
|
|
void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
|
2011-11-13 13:19:52 +01:00
|
|
|
|
2011-05-12 14:44:52 +02:00
|
|
|
private:
|
2012-06-08 15:21:55 +02:00
|
|
|
Ui::OptionsDialog *ui;
|
2011-05-31 22:24:53 +02:00
|
|
|
OptionsModel *model;
|
2011-06-01 14:40:06 +02:00
|
|
|
MonitoredDataMapper *mapper;
|
2012-06-08 15:21:55 +02:00
|
|
|
bool fProxyIpValid;
|
2011-05-12 09:40:40 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // OPTIONSDIALOG_H
|