Qt
Components
pqItemViewSearchWidget.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2
// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3
// SPDX-License-Identifier: BSD-3-Clause
4
5
#ifndef pqItemViewSearchWidget_h
6
#define pqItemViewSearchWidget_h
7
8
#include "
pqComponentsModule.h
"
9
#include <QDialog>
10
#include <QModelIndex>
11
19
class
PQCOMPONENTS_EXPORT
pqItemViewSearchWidget
:
public
QDialog
20
{
21
Q_OBJECT
22
Q_ENUMS(
ItemSearchType
)
23
typedef
QDialog Superclass;
24
25
public
:
26
pqItemViewSearchWidget
(QWidget* parent =
nullptr
);
27
~
pqItemViewSearchWidget
()
override
;
28
enum
ItemSearchType
29
{
30
Current
,
31
Next
,
32
Previous
33
};
34
35
public
Q_SLOTS:
// NOLINT(readability-redundant-access-specifiers)
36
virtual
void
showSearchWidget();
37
38
protected
Q_SLOTS:
39
43
virtual
void
updateSearch(QString);
44
virtual
void
updateSearch();
48
virtual
void
findNext();
49
virtual
void
findPrevious();
50
51
protected
:
// NOLINT(readability-redundant-access-specifiers)
52
virtual
void
setBaseWidget(QWidget* baseWidget);
56
bool
eventFilter(QObject* obj, QEvent* event)
override
;
57
void
keyPressEvent(QKeyEvent* e)
override
;
61
virtual
bool
searchModel(
const
QAbstractItemModel* M,
const
QModelIndex& Top,
const
QString& S,
62
ItemSearchType
searchType = Current)
const
;
66
void
showEvent(QShowEvent*)
override
;
70
virtual
bool
matchString(
71
const
QAbstractItemModel* M,
const
QModelIndex& curIdx,
const
QString& searchString)
const
;
72
73
private
:
74
Q_DISABLE_COPY(
pqItemViewSearchWidget
)
75
76
class
PIMPL;
77
PIMPL* Private;
78
};
79
#endif
pqComponentsModule.h
PQCOMPONENTS_EXPORT
#define PQCOMPONENTS_EXPORT
Definition:
pqComponentsModule.h:15
pqItemViewSearchWidget::Current
Definition:
pqItemViewSearchWidget.h:30
pqItemViewSearchWidget::ItemSearchType
ItemSearchType
Definition:
pqItemViewSearchWidget.h:28
pqItemViewSearchWidget
This is the search widget for QAbstractItemView type of widgets.
Definition:
pqItemViewSearchWidget.h:19
pqItemViewSearchWidget::Next
Definition:
pqItemViewSearchWidget.h:31
Generated by
1.8.13 on Tue Oct 1 2024