lbrycrd/src/qt/optionsdialog.h
Philip Kaufmann 7e195e8459 [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.)
2014-01-06 16:19:04 +01:00

59 lines
1.4 KiB
C++

// 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.
#ifndef OPTIONSDIALOG_H
#define OPTIONSDIALOG_H
#include <QDialog>
class MonitoredDataMapper;
class OptionsModel;
class QValidatedLineEdit;
namespace Ui {
class OptionsDialog;
}
/** Preferences dialog. */
class OptionsDialog : public QDialog
{
Q_OBJECT
public:
explicit OptionsDialog(QWidget *parent);
~OptionsDialog();
void setModel(OptionsModel *model);
void setMapper();
protected:
bool eventFilter(QObject *object, QEvent *event);
private slots:
/* enable OK button */
void enableOkButton();
/* disable OK button */
void disableOkButton();
/* 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 updateDisplayUnit();
void doProxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
signals:
void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
private:
Ui::OptionsDialog *ui;
OptionsModel *model;
MonitoredDataMapper *mapper;
bool fProxyIpValid;
};
#endif // OPTIONSDIALOG_H