aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsdialog.h
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2012-06-08 15:21:55 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2012-06-13 16:24:25 +0200
commitc4443c2be141e5f45bb10376056f3083e97cde50 (patch)
tree437bad1af7dccf5ced0f0056757d134334f4b056 /src/qt/optionsdialog.h
parentc4879a0c2fea705b6ad7956502acc7897838e841 (diff)
downloadbitcoin-c4443c2be141e5f45bb10376056f3083e97cde50.tar.xz
re-work optionsdialog to a tabbed UI based on an ui-file
- extend network options with a SOCKS version selection - changing "Unit to show amounts in:" now also updates the unit used in the transaction fee box - string updates - link Apply button and OK button when enabling or disabling them - use LookupNumeric() from netbase to verify proxy address (via an EventFilter) - change proxy address field to QValidatedLineEdit and add visual feedback - add a status label used for displaying a message for invalid proxy addresses - allow usage of IPv6 address as proxy address - added warning message when enabling / disabling SOCKS proxy
Diffstat (limited to 'src/qt/optionsdialog.h')
-rw-r--r--src/qt/optionsdialog.h55
1 files changed, 30 insertions, 25 deletions
diff --git a/src/qt/optionsdialog.h b/src/qt/optionsdialog.h
index ea0cbb8bfc..7e91c96475 100644
--- a/src/qt/optionsdialog.h
+++ b/src/qt/optionsdialog.h
@@ -2,48 +2,53 @@
#define OPTIONSDIALOG_H
#include <QDialog>
-#include <QList>
-
-QT_BEGIN_NAMESPACE
-class QStackedWidget;
-class QListWidget;
-class QListWidgetItem;
-class QPushButton;
-QT_END_NAMESPACE
+
+namespace Ui {
+class OptionsDialog;
+}
class OptionsModel;
-class OptionsPage;
class MonitoredDataMapper;
/** Preferences dialog. */
class OptionsDialog : public QDialog
{
Q_OBJECT
+
public:
- explicit OptionsDialog(QWidget *parent=0);
+ explicit OptionsDialog(QWidget *parent = 0);
+ ~OptionsDialog();
void setModel(OptionsModel *model);
+ void setMapper();
-signals:
-
-public slots:
- /** Change the current page to \a index. */
- void changePage(int index);
+protected:
+ bool eventFilter(QObject *object, QEvent *event);
private slots:
- void okClicked();
- void cancelClicked();
- void applyClicked();
- void enableApply();
- void disableApply();
+ /* enable apply button and OK button */
+ void enableSaveButtons();
+ /* disable apply button and OK button */
+ void disableSaveButtons();
+ /* set apply button and OK button state (enabled / disabled) */
+ void setSaveButtonState(bool fState);
+ void on_okButton_clicked();
+ void on_cancelButton_clicked();
+ void on_applyButton_clicked();
+
+ void showRestartWarning_Proxy();
+ void showRestartWarning_Lang();
+ void updateDisplayUnit();
+
+signals:
+ void proxyIpValid(bool fValid);
private:
- QListWidget *contents_widget;
- QStackedWidget *pages_widget;
+ Ui::OptionsDialog *ui;
OptionsModel *model;
MonitoredDataMapper *mapper;
- QPushButton *apply_button;
-
- QList<OptionsPage*> pages;
+ bool fRestartWarningDisplayed_Proxy;
+ bool fRestartWarningDisplayed_Lang;
+ bool fProxyIpValid;
};
#endif // OPTIONSDIALOG_H