lbrycrd/src/qt/optionsdialog.h

72 lines
1.7 KiB
C
Raw Normal View History

// Copyright (c) 2011-2016 The Bitcoin Core developers
2014-12-13 05:09:33 +01:00
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
2014-11-03 16:16:40 +01:00
#ifndef BITCOIN_QT_OPTIONSDIALOG_H
#define BITCOIN_QT_OPTIONSDIALOG_H
#include <QDialog>
#include <QValidator>
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();
private Q_SLOTS:
[Qt] massive options/settings rework (no core changes) - add new options for database cache and script verification threads - add label which displays options that are overridden by command-line parameters - proxy settings are not applied on-the-fly anymore and require a client restart (ApplyProxySettings() was removed and was not working very well anyway) - re-work options reset and require a client shutdown (as it is much easier to do it this way without having to mess with what can be changed on-the-fly and what needs a restart anyway) - options reset now writes default values for every single option - when changing an option which requires a client restart display a 10 second warning message in statusLabel (via a QTimer) - when applying the changes via ok change that to a persistent message, which is displayed even after closing optionsdialog and re-open it, when no client restart was made - remove dialog boxes used when changing language or proxy settings - add setRestartRequired() and isRestartRequired() to OptionsModel and use the set function when updating options to signal OptionsDialog when a restart is needed - resize optionsdialog a little and add some min sizes for certain GUI elements - remove apply button from optionsdialog - save and restore optionsdialog window position - update nTransactionFee in QSettings with a set -paytxfee value when opening optionsdialog (I'm not sure about this yet, perhaps revert to not updating QSettings and just display current -paytxfee value in optionsdialog.)
2013-12-03 09:10:10 +01:00
/* 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_hideTrayIcon_stateChanged(int fState);
[Qt] massive options/settings rework (no core changes) - add new options for database cache and script verification threads - add label which displays options that are overridden by command-line parameters - proxy settings are not applied on-the-fly anymore and require a client restart (ApplyProxySettings() was removed and was not working very well anyway) - re-work options reset and require a client shutdown (as it is much easier to do it this way without having to mess with what can be changed on-the-fly and what needs a restart anyway) - options reset now writes default values for every single option - when changing an option which requires a client restart display a 10 second warning message in statusLabel (via a QTimer) - when applying the changes via ok change that to a persistent message, which is displayed even after closing optionsdialog and re-open it, when no client restart was made - remove dialog boxes used when changing language or proxy settings - add setRestartRequired() and isRestartRequired() to OptionsModel and use the set function when updating options to signal OptionsDialog when a restart is needed - resize optionsdialog a little and add some min sizes for certain GUI elements - remove apply button from optionsdialog - save and restore optionsdialog window position - update nTransactionFee in QSettings with a set -paytxfee value when opening optionsdialog (I'm not sure about this yet, perhaps revert to not updating QSettings and just display current -paytxfee value in optionsdialog.)
2013-12-03 09:10:10 +01:00
void showRestartWarning(bool fPersistent = false);
void clearStatusLabel();
void updateProxyValidationState();
/* query the networks, for which the default proxy is used */
void updateDefaultProxyNets();
Q_SIGNALS:
[Qt] massive options/settings rework (no core changes) - add new options for database cache and script verification threads - add label which displays options that are overridden by command-line parameters - proxy settings are not applied on-the-fly anymore and require a client restart (ApplyProxySettings() was removed and was not working very well anyway) - re-work options reset and require a client shutdown (as it is much easier to do it this way without having to mess with what can be changed on-the-fly and what needs a restart anyway) - options reset now writes default values for every single option - when changing an option which requires a client restart display a 10 second warning message in statusLabel (via a QTimer) - when applying the changes via ok change that to a persistent message, which is displayed even after closing optionsdialog and re-open it, when no client restart was made - remove dialog boxes used when changing language or proxy settings - add setRestartRequired() and isRestartRequired() to OptionsModel and use the set function when updating options to signal OptionsDialog when a restart is needed - resize optionsdialog a little and add some min sizes for certain GUI elements - remove apply button from optionsdialog - save and restore optionsdialog window position - update nTransactionFee in QSettings with a set -paytxfee value when opening optionsdialog (I'm not sure about this yet, perhaps revert to not updating QSettings and just display current -paytxfee value in optionsdialog.)
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:
Ui::OptionsDialog *ui;
OptionsModel *model;
QDataWidgetMapper *mapper;
};
2014-11-03 16:16:40 +01:00
#endif // BITCOIN_QT_OPTIONSDIALOG_H