mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
After each addition of a page in the constructor, the list was resorted. This appears pointless. Instead, sort the list only after all pages were added. Since the add-page function is now a single line, remove it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
32 lines
704 B
C++
32 lines
704 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef PREFERENCES_WIDGET_H
|
|
#define PREFERENCES_WIDGET_H
|
|
|
|
#include <QDialog>
|
|
#include "core/pref.h"
|
|
|
|
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
|