mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
255325e219
commit
b7a476169d
5 changed files with 118 additions and 1 deletions
30
desktop-widgets/preferences/preferencesdialog.h
Normal file
30
desktop-widgets/preferences/preferencesdialog.h
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue