A base dialog for options and properties dialogs that offers vertical tabs.
It handles saving/restoring of geometry, splitter and current tab states, switching vertical tabs between icon/text to icon-only modes (splitter collapsed to left), and connecting QDialogButtonBox's accepted/rejected signals to dialog's accept/reject slots
To use:
Start with copy of qgsoptionsdialog_template.ui and build options/properties dialog.
In source file for dialog, inherit this class instead of QDialog, then in constructor:
... setupUi( this ); // set up .ui file objects initOptionsBase( false
); // set up this class to use .ui objects, optionally restoring base ui ... restoreOptionsBaseUi(); // restore the base ui with initOptionsBase or use this later on
Definition at line 86 of file qgsoptionsdialogbase.h.
void QgsOptionsDialogBase::addPage |
( |
const QString & |
title, |
|
|
const QString & |
tooltip, |
|
|
const QIcon & |
icon, |
|
|
QWidget * |
widget, |
|
|
const QStringList & |
path = QStringList() |
|
) |
| |
Adds a new page to the dialog pages.
The title, tooltip and icon arguments dictate the page list item title, tooltip and icon respectively.
The page content is specified via the widget argument. Ownership of widget is transferred to the dialog.
Since QGIS 3.22, the optional path argument can be used to set the path of the item's entry in the tree view (for dialogs which show a tree view of options pages only).
- See also
- insertPage()
- Since
- QGIS 3.14
Definition at line 328 of file qgsoptionsdialogbase.cpp.
void QgsOptionsDialogBase::insertPage |
( |
const QString & |
title, |
|
|
const QString & |
tooltip, |
|
|
const QIcon & |
icon, |
|
|
QWidget * |
widget, |
|
|
const QString & |
before, |
|
|
const QStringList & |
path = QStringList() |
|
) |
| |
Inserts a new page into the dialog pages.
The title, tooltip and icon arguments dictate the page list item title, tooltip and icon respectively.
The page content is specified via the widget argument. Ownership of widget is transferred to the dialog.
The before argument specifies the object name of an existing page. The new page will be inserted directly before the matching page.
Since QGIS 3.22, the optional path argument can be used to set the path of the item's entry in the tree view (for dialogs which show a tree view of options pages only).
- See also
- addPage()
- Since
- QGIS 3.14
Definition at line 402 of file qgsoptionsdialogbase.cpp.