2017-04-27 18:26:05 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2015-09-17 20:16:40 +00:00
|
|
|
#ifndef PREFERENCES_WIDGET_H
|
|
|
|
#define PREFERENCES_WIDGET_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
|
|
class AbstractPreferencesWidget;
|
|
|
|
class QListWidget;
|
|
|
|
class QStackedWidget;
|
|
|
|
class QDialogButtonBox;
|
2015-09-17 20:53:39 +00:00
|
|
|
class QAbstractButton;
|
2015-09-17 20:16:40 +00:00
|
|
|
|
2015-10-31 23:02:16 +00:00
|
|
|
class PreferencesDialog : public QDialog {
|
2015-09-17 20:16:40 +00:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2020-11-24 13:10:53 +00:00
|
|
|
static PreferencesDialog *instance();
|
2018-07-31 05:41:19 +00:00
|
|
|
~PreferencesDialog();
|
2015-09-17 20:16:40 +00:00
|
|
|
void refreshPages();
|
2019-12-10 13:02:13 +00:00
|
|
|
void defaultsRequested();
|
2015-09-17 20:16:40 +00:00
|
|
|
private:
|
2015-10-31 23:02:16 +00:00
|
|
|
PreferencesDialog();
|
2015-09-17 20:16:40 +00:00
|
|
|
void cancelRequested();
|
2015-11-02 20:50:17 +00:00
|
|
|
void applyRequested(bool closeIt);
|
2015-09-17 20:53:39 +00:00
|
|
|
void buttonClicked(QAbstractButton *btn);
|
2015-09-17 20:16:40 +00:00
|
|
|
QList<AbstractPreferencesWidget*> pages;
|
|
|
|
QListWidget *pagesList;
|
|
|
|
QStackedWidget *pagesStack;
|
|
|
|
QDialogButtonBox *buttonBox;
|
|
|
|
};
|
|
|
|
|
2015-11-02 20:50:17 +00:00
|
|
|
#endif
|