Qt Utilities
6.4.1
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
|
The SettingsDialog class provides a framework for creating settings dialogs with different categories and subcategories. More...
#include <settingsdialog.h>
Signals | |
void | applied () |
void | resetted () |
Public Member Functions | |
SettingsDialog (QWidget *parent=nullptr) | |
Constructs a settings dialog. More... | |
~SettingsDialog () override | |
Destroys the settings dialog. More... | |
bool | isTabBarAlwaysVisible () const |
Returns whether the tab bar is always visible. More... | |
void | setTabBarAlwaysVisible (bool value) |
Sets whether the tab bar is always visible. More... | |
OptionCategoryModel * | categoryModel () |
Returns the category model used by the settings dialog to manage the categories. More... | |
OptionCategory * | category (int categoryIndex) const |
Returns the category for the specified categoryIndex. More... | |
OptionPage * | page (int categoryIndex, int pageIndex) const |
Returns the page for the specified categoryIndex and the specified pageIndex. More... | |
void | showCategory (OptionCategory *category) |
Sets the current category to the specified category and updates the relevant widgets to show it. More... | |
void | setSingleCategory (OptionCategory *singleCategory) |
Enables single-category mode to show only the specified singleCategory. More... | |
Protected Member Functions | |
void | showEvent (QShowEvent *event) override |
Resets all pages before the dialog is shown by the application. More... | |
Properties | |
bool | tabBarAlwaysVisible |
The SettingsDialog class provides a framework for creating settings dialogs with different categories and subcategories.
Definition at line 21 of file settingsdialog.h.
|
explicit |
Constructs a settings dialog.
parent | Specifies the parent widget. |
Definition at line 30 of file settingsdialog.cpp.
|
override |
Destroys the settings dialog.
Definition at line 64 of file settingsdialog.cpp.
|
signal |
OptionCategory * QtUtilities::SettingsDialog::category | ( | int | categoryIndex | ) | const |
Returns the category for the specified categoryIndex.
The settings dialog keeps ownership over the returned category. If no category exists for the specified index a null pointer is returned.
Definition at line 86 of file settingsdialog.cpp.
|
inline |
Returns the category model used by the settings dialog to manage the categories.
Definition at line 74 of file settingsdialog.h.
|
inline |
Returns whether the tab bar is always visible.
The tab bar is always visible by default.
Definition at line 65 of file settingsdialog.h.
OptionPage * QtUtilities::SettingsDialog::page | ( | int | categoryIndex, |
int | pageIndex | ||
) | const |
Returns the page for the specified categoryIndex and the specified pageIndex.
The settings dialog keeps ownership over the returned category. If no page for the specified indices a null pointer is returned.
Definition at line 98 of file settingsdialog.cpp.
|
signal |
void QtUtilities::SettingsDialog::setSingleCategory | ( | OptionCategory * | singleCategory | ) |
Enables single-category mode to show only the specified singleCategory.
Definition at line 167 of file settingsdialog.cpp.
void QtUtilities::SettingsDialog::setTabBarAlwaysVisible | ( | bool | value | ) |
Sets whether the tab bar is always visible.
Definition at line 72 of file settingsdialog.cpp.
void QtUtilities::SettingsDialog::showCategory | ( | OptionCategory * | category | ) |
Sets the current category to the specified category and updates the relevant widgets to show it.
Definition at line 141 of file settingsdialog.cpp.
|
overrideprotected |
Resets all pages before the dialog is shown by the application.
Definition at line 111 of file settingsdialog.cpp.
|
readwrite |
Definition at line 74 of file settingsdialog.h.