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