Class: QgsOptionsPageWidget¶
Base class for widgets for pages included in the options dialog.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: apply()
Class Hierarchy¶
Base classes¶
Abstract Methods
Called to permanently apply the settings shown in the options page (e.g. save them to |
Methods
Register a highlight widget to be used to search and highlight text in options dialogs. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsOptionsPageWidget. See the FAQ for more details.
Called to cancel settings changed in the options page (e.g. save them to |
|
Returns the optional help key for the options page. |
|
Validates the current state of the widget. |
- class qgis.gui.QgsOptionsPageWidget[source]¶
Bases:
QWidget
- __init__(parent: QWidget | None = None)
Constructor for QgsOptionsPageWidget.
- Parameters:
parent (Optional[QWidget] = None)
- abstract apply(self)[source]¶
Called to permanently apply the settings shown in the options page (e.g. save them to
QgsSettings
objects). This is usually called when the options dialog is accepted.
- virtual cancel(self)[source]¶
Called to cancel settings changed in the options page (e.g. save them to
QgsSettings
objects). This is usually called when the options dialog is canceled.
- virtual helpKey(self) str [source]¶
Returns the optional help key for the options page. The default implementation returns an empty string.
If a non-empty string is returned by this method, it will be used as the help key retrieved when the “help” button is clicked while this options page is active.
If an empty string is returned by this method the default QGIS options help will be retrieved.
- Return type:
str
- virtual isValid(self) bool [source]¶
Validates the current state of the widget.
Subclasses should return
True
if the widget state is currently valid and acceptable toapply()
.The default implementation returns
True
.Added in version 3.24.
- Return type:
bool
- registerHighlightWidget(self, highlightWidget: QgsOptionsDialogHighlightWidget | None)[source]¶
Register a highlight widget to be used to search and highlight text in options dialogs. This can be used to provide a custom implementation of
QgsOptionsDialogHighlightWidget
.- Parameters:
highlightWidget (Optional[QgsOptionsDialogHighlightWidget])