QGIS API Documentation  3.0.2-Girona (307d082)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsOptionsDialogHighlightTree Class Reference

A highlight widget for trees. More...

#include <qgsoptionsdialoghighlightwidgetsimpl.h>

Inheritance diagram for QgsOptionsDialogHighlightTree:
Inheritance graph
[legend]

Public Member Functions

 QgsOptionsDialogHighlightTree (QTreeView *treeView)
 constructs a highlight widget for a tree view or widget. More...
 
- Public Member Functions inherited from QgsOptionsDialogHighlightWidget
bool eventFilter (QObject *obj, QEvent *event) override
 
bool isValid ()
 Returns if it valid: if the widget type is handled and if the widget is not still available. More...
 
bool searchHighlight (const QString &text)
 search for a text pattern and highlight the widget if the text is found More...
 
QWidget * widget ()
 Return the widget. More...
 

Protected Member Functions

virtual bool highlightText (const QString &text) override
 Highlight the text in the widget. More...
 
virtual void reset () override
 reset the style of the widgets to its original state More...
 
virtual bool searchText (const QString &text) override
 Search for the text in the widget and return true if it was found. More...
 
- Protected Member Functions inherited from QgsOptionsDialogHighlightWidget
 QgsOptionsDialogHighlightWidget (QWidget *widget=nullptr)
 Constructor. More...
 

Protected Attributes

QMap< QTreeWidgetItem *, bool > mTreeInitialExpand = QMap<QTreeWidgetItem *, bool>()
 
QMap< QTreeWidgetItem *, QPair< QBrush, QBrush > > mTreeInitialStyle = QMap<QTreeWidgetItem *, QPair<QBrush, QBrush>>()
 
QMap< QTreeWidgetItem *, bool > mTreeInitialVisible = QMap<QTreeWidgetItem *, bool>()
 
QPointer< QTreeView > mTreeView
 
- Protected Attributes inherited from QgsOptionsDialogHighlightWidget
QPointer< QWidget > mWidget
 Pointer to the widget. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from QgsOptionsDialogHighlightWidget
static QgsOptionsDialogHighlightWidgetcreateWidget (QWidget *widget)
 create a highlight widget implementation for the proper widget type. More...
 

Detailed Description

A highlight widget for trees.

This is used to search and highlight text in QgsOptionsDialogBase implementations. Highlighting is only available for tree widgets only while searching can be performed in any tree view or inherited class.

Since
QGIS 3.0

Definition at line 129 of file qgsoptionsdialoghighlightwidgetsimpl.h.

Constructor & Destructor Documentation

◆ QgsOptionsDialogHighlightTree()

QgsOptionsDialogHighlightTree::QgsOptionsDialogHighlightTree ( QTreeView *  treeView)

constructs a highlight widget for a tree view or widget.

Definition at line 204 of file qgsoptionsdialoghighlightwidgetsimpl.cpp.

Member Function Documentation

◆ highlightText()

bool QgsOptionsDialogHighlightTree::highlightText ( const QString &  text)
overrideprotectedvirtual

Highlight the text in the widget.

Returns
true if the text could be highlighted.

Implements QgsOptionsDialogHighlightWidget.

Definition at line 218 of file qgsoptionsdialoghighlightwidgetsimpl.cpp.

◆ reset()

void QgsOptionsDialogHighlightTree::reset ( )
overrideprotectedvirtual

reset the style of the widgets to its original state

Implements QgsOptionsDialogHighlightWidget.

Definition at line 263 of file qgsoptionsdialoghighlightwidgetsimpl.cpp.

◆ searchText()

bool QgsOptionsDialogHighlightTree::searchText ( const QString &  text)
overrideprotectedvirtual

Search for the text in the widget and return true if it was found.

Implements QgsOptionsDialogHighlightWidget.

Definition at line 210 of file qgsoptionsdialoghighlightwidgetsimpl.cpp.

Member Data Documentation

◆ mTreeInitialExpand

QMap<QTreeWidgetItem *, bool> QgsOptionsDialogHighlightTree::mTreeInitialExpand = QMap<QTreeWidgetItem *, bool>()
protected

Definition at line 142 of file qgsoptionsdialoghighlightwidgetsimpl.h.

◆ mTreeInitialStyle

QMap<QTreeWidgetItem *, QPair<QBrush, QBrush> > QgsOptionsDialogHighlightTree::mTreeInitialStyle = QMap<QTreeWidgetItem *, QPair<QBrush, QBrush>>()
protected

Definition at line 141 of file qgsoptionsdialoghighlightwidgetsimpl.h.

◆ mTreeInitialVisible

QMap<QTreeWidgetItem *, bool> QgsOptionsDialogHighlightTree::mTreeInitialVisible = QMap<QTreeWidgetItem *, bool>()
protected

Definition at line 143 of file qgsoptionsdialoghighlightwidgetsimpl.h.

◆ mTreeView

QPointer<QTreeView> QgsOptionsDialogHighlightTree::mTreeView
protected

Definition at line 139 of file qgsoptionsdialoghighlightwidgetsimpl.h.


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