1#ifndef DIALOGS_SETTINGSDIALOG_H
2#define DIALOGS_SETTINGSDIALOG_H
36 QWidget *
cornerWidget(Qt::Corner corner = Qt::TopRightCorner)
const;
37 void setCornerWidget(QWidget *widget, Qt::Corner corner = Qt::TopRightCorner);
39 void selectPage(
int categoryIndex,
int pageIndex);
55 void currentCategoryChanged(
const QModelIndex &index);
56 void updateTabWidget();
57 void retranslateTabWidget();
60 std::unique_ptr<Ui::SettingsDialog> m_ui;
64 bool m_tabBarAlwaysVisible;
76 return m_tabBarAlwaysVisible;
85 return m_categoryModel;
The OptionCategoryFilterModel class is used by SettingsDialog to filter option categories.
The OptionCategoryModel class is used by SettingsDialog to store and display option categories.
The OptionCategory class wraps associated option pages.
The OptionPage class is the base class for SettingsDialog pages.
OptionCategoryModel * categoryModel()
Returns the category model used by the settings dialog to manage the categories.
void setTabBarAlwaysVisible(bool value)
Sets whether the tab bar is always visible.
OptionCategory * category(int categoryIndex) const
Returns the category for the specified categoryIndex.
SettingsDialog(QWidget *parent=nullptr)
Constructs a settings dialog.
void retranslationRequired()
void showCategory(OptionCategory *category)
Sets the current category to the specified category and updates the relevant widgets to show it.
bool event(QEvent *event) override
OptionPage * page(int categoryIndex, int pageIndex) const
Returns the page for the specified categoryIndex and the specified pageIndex.
void reset()
Resets all changes.
bool apply()
Applies all changes.
void addHeadingWidget(QWidget *widget)
Adds a widget next to the heading.
QWidget * cornerWidget(Qt::Corner corner=Qt::TopRightCorner) const
Returns the tab-widget's corner widget.
void translateCategory(OptionCategory *category, const std::function< QString()> &translator)
Allows to set the categories display name so that it is retranslated as needed.
void showEvent(QShowEvent *event) override
Resets all pages before the dialog is shown by the application.
bool isTabBarAlwaysVisible() const
Returns whether the tab bar is always visible.
void setSingleCategory(OptionCategory *singleCategory)
Enables single-category mode to show only the specified singleCategory.
void setCornerWidget(QWidget *widget, Qt::Corner corner=Qt::TopRightCorner)
Sets the tab-widget's corner widget.
void selectPage(int categoryIndex, int pageIndex)
Selects the specified page within the specified category.
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.