diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-09-17 17:16:40 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-30 10:36:49 -0700 |
commit | b7a476169d50dbf4d40b134faac5b88cabd4fa17 (patch) | |
tree | a5ee185f0b9683f5d4e8f8144bb5079c18598bb7 /desktop-widgets/preferences/preferencesdialog.h | |
parent | 255325e219f7d1922ac7740649fdbc89228a36c1 (diff) | |
download | subsurface-b7a476169d50dbf4d40b134faac5b88cabd4fa17.tar.gz |
Preferecnes: add the initial skeleton
This Preferences dialog should be visually similar to the
old one - the main difference is how it acts on the preferences.
It's also not based on .ui files since it's a very simple widget
I prefered to mount it by hand - no more than 6 lines of c++ code.
Right now we have only one preference page on this, and nothing
is hoocked up.
I've also changed mainwindow a bit to only show this dialog for
testing purposes.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/preferences/preferencesdialog.h')
-rw-r--r-- | desktop-widgets/preferences/preferencesdialog.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/desktop-widgets/preferences/preferencesdialog.h b/desktop-widgets/preferences/preferencesdialog.h new file mode 100644 index 000000000..a1db94b43 --- /dev/null +++ b/desktop-widgets/preferences/preferencesdialog.h @@ -0,0 +1,30 @@ +#ifndef PREFERENCES_WIDGET_H +#define PREFERENCES_WIDGET_H + +#include <QDialog> +#include "pref.h" + +class AbstractPreferencesWidget; +class QListWidget; +class QStackedWidget; +class QDialogButtonBox; + +class PreferencesDialogV2 : public QDialog { + Q_OBJECT +public: + PreferencesDialogV2(); + virtual ~PreferencesDialogV2(); + void addPreferencePage(AbstractPreferencesWidget *page); + void refreshPages(); +private: + void cancelRequested(); + void applyRequested(); + void defaultsRequested(); + + QList<AbstractPreferencesWidget*> pages; + QListWidget *pagesList; + QStackedWidget *pagesStack; + QDialogButtonBox *buttonBox; +}; + +#endif
\ No newline at end of file |