Implement Apply / Close without Saving for preferences

This hooks up the buttons correctly

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2013-06-03 05:58:50 +09:00 committed by Dirk Hohndel
parent de8395e09e
commit 77c4b8ef87
2 changed files with 42 additions and 8 deletions

View file

@ -6,23 +6,25 @@
#include "../pref.h"
namespace Ui{
class PreferencesDialog;
class PreferencesDialog;
}
class QAbstractButton;
class PreferencesDialog :public QDialog{
Q_OBJECT
public:
static PreferencesDialog* instance();
void showEvent(QShowEvent* );
signals:
void settingsChanged();
public slots:
void buttonClicked(QAbstractButton* button);
void syncSettings();
void resetSettings();
private:
explicit PreferencesDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
void reloadPrefs();
Ui::PreferencesDialog* ui;
struct preferences oldPrefs;
};