Class: QgsOptionsDialogHighlightWidget¶
Container for a widget to be used to search text in the option dialog If the widget type is handled, it is valid. It can perform a text search in the widget and highlight it in case of success. This uses stylesheets.
Class Hierarchy¶
Subclasses¶
A highlight widget for buttons. This is used to search and highlight text in |
|
A highlight widget for checkboxes. This is used to search and highlight text in |
|
A highlight widget for group boxes. This is used to search and highlight text in |
|
A highlight widget for labels. This is used to search and highlight text in |
|
A highlight widget for table widgets. This is used to search and highlight text in |
|
A highlight widget for trees. This is used to search and highlight text in |
|
|
Methods
Highlight the text in the widget. |
|
Returns if it valid: if the widget type is handled and if the widget is not still available |
|
reset the style of the widgets to its original state |
|
search for a text pattern and highlight the widget if the text is found |
|
Search for the text in the widget and return |
|
Returns the widget |
Static Methods
create a highlight widget implementation for the proper widget type. |
- class qgis.gui.QgsOptionsDialogHighlightWidget[source]¶
Bases:
object- __init__(widget: QWidget | None = None)
Constructor
- Parameters:
widget (Optional[QWidget] = None) – the widget used to search text into
- __init__(a0: QgsOptionsDialogHighlightWidget)
- Parameters:
- static createWidget(widget: QWidget | None) QgsOptionsDialogHighlightWidget | None[source]¶
create a highlight widget implementation for the proper widget type. For instance a
QgsOptionsDialogHighlightButtonfor button.- Return type:
Optional[QgsOptionsDialogHighlightWidget]
- Returns:
a
QgsOptionsDialogHighlightWidgetorNoneif there is no implementation for the given widget.- Parameters:
widget (Optional[QWidget])
- highlightText(self, text: str | None) bool[source]¶
Highlight the
textin the widget.- Return type:
bool
- Returns:
Trueif the text could be highlighted.- Parameters:
text (Optional[str])
- isValid(self) bool[source]¶
Returns if it valid: if the widget type is handled and if the widget is not still available
- Return type:
bool
- searchHighlight(self, text: str | None) bool[source]¶
search for a text pattern and highlight the widget if the text is found
- Return type:
bool
- Returns:
Trueif the text pattern is found- Parameters:
text (Optional[str])