Files
thehub/hub-qt/optionsdialog.h
T

83 lines
2.1 KiB
C++
Raw Permalink Normal View History

2017-11-09 19:34:51 +01:00
/*
* This file is part of the Flowee project
* Copyright (C) 2011-2015 The Bitcoin Core developers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2013-11-04 16:20:43 +01:00
2018-01-16 10:47:52 +00:00
#ifndef FLOWEE_QT_OPTIONSDIALOG_H
#define FLOWEE_QT_OPTIONSDIALOG_H
#include <QDialog>
#include <QValidator>
2011-05-13 22:00:27 +02:00
2013-04-13 00:13:08 -05:00
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;
};
2011-11-13 13:19:52 +01:00
/** Preferences dialog. */
class OptionsDialog : public QDialog
{
Q_OBJECT
public:
explicit OptionsDialog(QWidget *parent, bool enableWallet);
~OptionsDialog();
void setModel(OptionsModel *model);
void setMapper();
2015-07-14 13:59:05 +02:00
private Q_SLOTS:
/* set OK button state (enabled / disabled) */
void setOkButtonState(bool fState);
void on_resetButton_clicked();
void on_okButton_clicked();
void on_cancelButton_clicked();
void showRestartWarning(bool fPersistent = false);
void clearStatusLabel();
void updateProxyValidationState();
2014-07-25 18:20:40 +02:00
/* query the networks, for which the default proxy is used */
void updateDefaultProxyNets();
2015-07-14 13:59:05 +02:00
Q_SIGNALS:
void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
2011-11-13 13:19:52 +01:00
2011-05-12 14:44:52 +02:00
private:
Ui::OptionsDialog *ui;
OptionsModel *model;
2014-10-23 19:08:10 +02:00
QDataWidgetMapper *mapper;
};
2018-01-16 10:47:52 +00:00
#endif