42 while ( ( parent = parent->parentWidget() ) )
46 if ( qobject_cast< QgsMessageBarItem * >( parent ) ||
47 qobject_cast< QgsFilterLineEdit * >( parent ) )
59 if ( qobject_cast<QLabel *>(
widget ) )
63 else if ( qobject_cast<QCheckBox *>(
widget ) )
67 else if ( qobject_cast<QAbstractButton *>(
widget ) )
71 else if ( qobject_cast<QGroupBox *>(
widget ) )
75 else if ( qobject_cast<QTreeView *>(
widget ) )
79 else if ( qobject_cast<QTableView *>(
widget ) )
100 mWidget->removeEventFilter( mEventFilter );
102 mEventFilter =
nullptr;
105 if ( !text.isEmpty() )
112 mChangedStyle =
false;
118 mChangedStyle =
false;
127 mWidget->installEventFilter( mEventFilter );
143 : QObject( highlightWidget->widget() )
144 , mHighlightWidget( highlightWidget )
147bool QgsOptionsDialogHighlightWidgetEventFilter::eventFilter( QObject *obj, QEvent *event )
149 if ( event->type() == QEvent::Show && obj == mHighlightWidget->widget() )
151 mHighlightWidget->widget()->removeEventFilter(
this );
156 mHighlightWidget->widget()->show();
157 mHighlightWidget->mChangedStyle = mHighlightWidget->highlightText( mHighlightWidget->mSearchText );
160 QTimer::singleShot( 500,
this, [ = ]
162 mChangedStyle = highlightText( mSearchText );
166 return QObject::eventFilter( obj, event );
A highlight widget for checkboxes.
A highlight widget for group boxes.
A highlight widget for labels.
A highlight widget for table widgets.
A highlight widget for trees.