Public Types | Public Slots | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
pqItemViewSearchWidget Class Reference

This is the search widget for QAbstractItemView type of widgets. More...

#include <pqItemViewSearchWidget.h>

Inherits QDialog.

Public Types

enum  ItemSearchType { Current, Next, Previous }
 

Public Slots

virtual void showSearchWidget ()
 

Public Member Functions

 pqItemViewSearchWidget (QWidget *parent=0)
 
 ~pqItemViewSearchWidget () override
 

Protected Slots

virtual void updateSearch (QString)
 Given the user entered text, update the GUI. More...
 
virtual void updateSearch ()
 
virtual void findNext ()
 Find the next/previous item. More...
 
virtual void findPrevious ()
 

Protected Member Functions

virtual void setBaseWidget (QWidget *baseWidget)
 
bool eventFilter (QObject *obj, QEvent *event) override
 Overridden to capture key presses. More...
 
void keyPressEvent (QKeyEvent *e) override
 
virtual bool searchModel (const QAbstractItemModel *M, const QModelIndex &Top, const QString &S, ItemSearchType searchType=Current) const
 Recursive to search all QModelIndices in the model. More...
 
void showEvent (QShowEvent *) override
 Overwrite to focus the lineEdit box. More...
 
virtual bool matchString (const QAbstractItemModel *M, const QModelIndex &curIdx, const QString &searchString) const
 match the input string with the index's text More...
 

Detailed Description

This is the search widget for QAbstractItemView type of widgets.

When Ctrl-F is invoked on the view widget, this widget will show up at the top of the view widget, and it will search through the items as user typing in the text field, and highlight the view item containing the input text

Definition at line 47 of file pqItemViewSearchWidget.h.

Member Enumeration Documentation

◆ ItemSearchType

Enumerator
Current 
Next 
Previous 

Definition at line 56 of file pqItemViewSearchWidget.h.

Constructor & Destructor Documentation

◆ pqItemViewSearchWidget()

pqItemViewSearchWidget::pqItemViewSearchWidget ( QWidget *  parent = 0)

◆ ~pqItemViewSearchWidget()

pqItemViewSearchWidget::~pqItemViewSearchWidget ( )
override

Member Function Documentation

◆ showSearchWidget

virtual void pqItemViewSearchWidget::showSearchWidget ( )
virtualslot

◆ updateSearch [1/2]

virtual void pqItemViewSearchWidget::updateSearch ( QString  )
protectedvirtualslot

Given the user entered text, update the GUI.

◆ updateSearch [2/2]

virtual void pqItemViewSearchWidget::updateSearch ( )
protectedvirtualslot

◆ findNext

virtual void pqItemViewSearchWidget::findNext ( )
protectedvirtualslot

Find the next/previous item.

◆ findPrevious

virtual void pqItemViewSearchWidget::findPrevious ( )
protectedvirtualslot

◆ setBaseWidget()

virtual void pqItemViewSearchWidget::setBaseWidget ( QWidget *  baseWidget)
protectedvirtual

◆ eventFilter()

bool pqItemViewSearchWidget::eventFilter ( QObject *  obj,
QEvent *  event 
)
overrideprotected

Overridden to capture key presses.

◆ keyPressEvent()

void pqItemViewSearchWidget::keyPressEvent ( QKeyEvent *  e)
overrideprotected

◆ searchModel()

virtual bool pqItemViewSearchWidget::searchModel ( const QAbstractItemModel *  M,
const QModelIndex &  Top,
const QString &  S,
ItemSearchType  searchType = Current 
) const
protectedvirtual

Recursive to search all QModelIndices in the model.

◆ showEvent()

void pqItemViewSearchWidget::showEvent ( QShowEvent *  )
overrideprotected

Overwrite to focus the lineEdit box.

◆ matchString()

virtual bool pqItemViewSearchWidget::matchString ( const QAbstractItemModel *  M,
const QModelIndex &  curIdx,
const QString &  searchString 
) const
protectedvirtual

match the input string with the index's text


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