subsurface/desktop-widgets/preferences/preferencesdialog.h
Berthold Stoeger 712e4680ca preferences: connect() dialog page only once
Weirdly, the settingsChanged() signal of the dialog-pages was
connected() to the settingsChanged() signal of the dialog
every time the settings were accepted. Do it only once
in the constructor.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-12 15:52:40 -08:00

31 lines
681 B
C++

// SPDX-License-Identifier: GPL-2.0
#ifndef PREFERENCES_WIDGET_H
#define PREFERENCES_WIDGET_H
#include <QDialog>
class AbstractPreferencesWidget;
class QListWidget;
class QStackedWidget;
class QDialogButtonBox;
class QAbstractButton;
class PreferencesDialog : public QDialog {
Q_OBJECT
public:
static PreferencesDialog *instance();
~PreferencesDialog();
void refreshPages();
void defaultsRequested();
private:
PreferencesDialog();
void cancelRequested();
void applyRequested(bool closeIt);
void buttonClicked(QAbstractButton *btn);
QList<AbstractPreferencesWidget*> pages;
QListWidget *pagesList;
QStackedWidget *pagesStack;
QDialogButtonBox *buttonBox;
};
#endif