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:
Tomaz Canabrava 2015-09-17 17:16:40 -03:00 committed by Dirk Hohndel
parent 255325e219
commit b7a476169d
5 changed files with 118 additions and 1 deletions

View 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