QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
QgsOptionsDialogHighlightWidget Class Referenceabstract

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>

Inheritance diagram for QgsOptionsDialogHighlightWidget:
Inheritance graph
[legend]

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 QgsOptionsDialogHighlightWidgetcreateWidget (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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~QgsOptionsDialogHighlightWidget()

virtual QgsOptionsDialogHighlightWidget::~QgsOptionsDialogHighlightWidget ( )
virtualdefault

◆ QgsOptionsDialogHighlightWidget()

QgsOptionsDialogHighlightWidget::QgsOptionsDialogHighlightWidget ( QWidget *  widget = nullptr)
explicitprotected

Constructor.

Parameters
widgetthe widget used to search text into

Definition at line 36 of file qgsoptionsdialoghighlightwidget.cpp.

Member Function Documentation

◆ createWidget()

QgsOptionsDialogHighlightWidget * QgsOptionsDialogHighlightWidget::createWidget ( QWidget *  widget)
static

create a highlight widget implementation for the proper widget type.

For instance a QgsOptionsDialogHighlightButton for button.

Returns
a QgsOptionsDialogHighlightWidget or nullptr if there is no implementation for the given widget.

Definition at line 40 of file qgsoptionsdialoghighlightwidget.cpp.

◆ highlightText()

virtual bool QgsOptionsDialogHighlightWidget::highlightText ( const QString &  text)
protectedpure virtual

◆ isValid()

bool QgsOptionsDialogHighlightWidget::isValid ( )
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.

◆ reset()

virtual void QgsOptionsDialogHighlightWidget::reset ( )
protectedpure virtual

◆ searchHighlight()

bool QgsOptionsDialogHighlightWidget::searchHighlight ( const QString &  text)

search for a text pattern and highlight the widget if the text is found

Returns
true if the text pattern is found

Definition at line 91 of file qgsoptionsdialoghighlightwidget.cpp.

◆ searchText()

virtual bool QgsOptionsDialogHighlightWidget::searchText ( const QString &  text)
protectedpure virtual

◆ widget()

QWidget * QgsOptionsDialogHighlightWidget::widget ( )
inline

Returns the widget.

Definition at line 90 of file qgsoptionsdialoghighlightwidget.h.

Friends And Related Symbol Documentation

◆ QgsOptionsDialogHighlightWidgetEventFilter

friend class QgsOptionsDialogHighlightWidgetEventFilter
friend

Definition at line 120 of file qgsoptionsdialoghighlightwidget.h.

Member Data Documentation

◆ mWidget

QPointer< QWidget > QgsOptionsDialogHighlightWidget::mWidget
protected

Pointer to the widget.

Definition at line 117 of file qgsoptionsdialoghighlightwidget.h.


The documentation for this class was generated from the following files: