QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
|
Container for a widget to be used to search text in the option dialog If the widget type is handled, it is valid. More...
#include <qgsoptionsdialoghighlightwidget.h>
Public Member Functions | |
virtual | ~QgsOptionsDialogHighlightWidget ()=default |
bool | isValid () |
Returns if it valid: if the widget type is handled and if the widget is not still available. | |
bool | searchHighlight (const QString &text) |
search for a text pattern and highlight the widget if the text is found | |
QWidget * | widget () |
Returns the widget. | |
Static Public Member Functions | |
static QgsOptionsDialogHighlightWidget * | createWidget (QWidget *widget) |
create a highlight widget implementation for the proper widget type. | |
Protected Member Functions | |
QgsOptionsDialogHighlightWidget (QWidget *widget=nullptr) | |
Constructor. | |
virtual bool | highlightText (const QString &text)=0 |
Highlight the text in the widget. | |
virtual void | reset ()=0 |
reset the style of the widgets to its original state | |
virtual bool | searchText (const QString &text)=0 |
Search for the text in the widget and return true if it was found. | |
Protected Attributes | |
QPointer< QWidget > | mWidget |
Pointer to the widget. | |
Friends | |
class | QgsOptionsDialogHighlightWidgetEventFilter |
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.
Definition at line 62 of file qgsoptionsdialoghighlightwidget.h.
|
virtualdefault |
|
explicitprotected |
Constructor.
widget | the widget used to search text into |
Definition at line 36 of file qgsoptionsdialoghighlightwidget.cpp.
|
static |
create a highlight widget implementation for the proper widget type.
For instance a QgsOptionsDialogHighlightButton for button.
nullptr
if there is no implementation for the given widget. Definition at line 40 of file qgsoptionsdialoghighlightwidget.cpp.
|
protectedpure virtual |
Highlight the text in the widget.
true
if the text could be highlighted. Implemented in QgsOptionsDialogHighlightLabel, QgsOptionsDialogHighlightCheckBox, QgsOptionsDialogHighlightButton, QgsOptionsDialogHighlightGroupBox, QgsOptionsDialogHighlightTree, QgsOptionsDialogHighlightTable, and QgsSettingsTreeWidget.
|
inline |
Returns if it valid: if the widget type is handled and if the widget is not still available.
Definition at line 79 of file qgsoptionsdialoghighlightwidget.h.
|
protectedpure virtual |
reset the style of the widgets to its original state
Implemented in QgsOptionsDialogHighlightLabel, QgsOptionsDialogHighlightCheckBox, QgsOptionsDialogHighlightButton, QgsOptionsDialogHighlightGroupBox, QgsOptionsDialogHighlightTree, QgsOptionsDialogHighlightTable, and QgsSettingsTreeWidget.
bool QgsOptionsDialogHighlightWidget::searchHighlight | ( | const QString & | text | ) |
search for a text pattern and highlight the widget if the text is found
true
if the text pattern is found Definition at line 91 of file qgsoptionsdialoghighlightwidget.cpp.
|
protectedpure virtual |
Search for the text in the widget and return true
if it was found.
Implemented in QgsOptionsDialogHighlightLabel, QgsOptionsDialogHighlightCheckBox, QgsOptionsDialogHighlightButton, QgsOptionsDialogHighlightGroupBox, QgsOptionsDialogHighlightTree, QgsOptionsDialogHighlightTable, and QgsSettingsTreeWidget.
|
inline |
Returns the widget.
Definition at line 90 of file qgsoptionsdialoghighlightwidget.h.
|
friend |
Definition at line 120 of file qgsoptionsdialoghighlightwidget.h.
|
protected |
Pointer to the widget.
Definition at line 117 of file qgsoptionsdialoghighlightwidget.h.