27#include "moc_qgsoptionsdialoghighlightwidget.cpp"
43 while ( ( parent = parent->parentWidget() ) )
47 if ( qobject_cast< QgsMessageBarItem * >( parent ) ||
48 qobject_cast< QgsFilterLineEdit * >( parent ) )
60 if ( qobject_cast<QLabel *>(
widget ) )
64 else if ( qobject_cast<QCheckBox *>(
widget ) )
68 else if ( qobject_cast<QAbstractButton *>(
widget ) )
72 else if ( qobject_cast<QGroupBox *>(
widget ) )
76 else if ( qobject_cast<QTreeView *>(
widget ) )
80 else if ( qobject_cast<QTableView *>(
widget ) )
101 mWidget->removeEventFilter( mEventFilter );
103 mEventFilter =
nullptr;
106 if ( !text.isEmpty() )
113 mChangedStyle =
false;
119 mChangedStyle =
false;
128 mWidget->installEventFilter( mEventFilter );
144 : QObject( highlightWidget->widget() )
145 , mHighlightWidget( highlightWidget )
148bool QgsOptionsDialogHighlightWidgetEventFilter::eventFilter( QObject *obj, QEvent *event )
150 if ( event->type() == QEvent::Show && obj == mHighlightWidget->widget() )
152 mHighlightWidget->widget()->removeEventFilter(
this );
157 mHighlightWidget->widget()->show();
158 mHighlightWidget->mChangedStyle = mHighlightWidget->highlightText( mHighlightWidget->mSearchText );
161 QTimer::singleShot( 500,
this, [ = ]
163 mChangedStyle = highlightText( mSearchText );
167 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.