Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
itemviewfindwidget_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
//
6
// W A R N I N G
7
// -------------
8
//
9
// This file is not part of the Qt API. It exists for the convenience
10
// of Qt Designer. This header file may change from version to version
11
// without notice, or even be removed.
12
//
13
// We mean it.
14
//
15
16
#
ifndef
ITEMVIEWFINDWIDGET_H
17
#
define
ITEMVIEWFINDWIDGET_H
18
19
#
include
"abstractfindwidget_p.h"
20
21
#
include
<
QModelIndex
>
22
23
QT_BEGIN_NAMESPACE
24
25
class
QAbstractItemView;
26
27
class
ItemViewFindWidget
:
public
AbstractFindWidget
28
{
29
Q_OBJECT
30
31
public
:
32
explicit
ItemViewFindWidget
(
FindFlags
flags
=
FindFlags
(),
QWidget
*
parent
=
nullptr
);
33
34
QAbstractItemView
*
itemView
()
const
35
{
return
m_itemView; }
36
37
void
setItemView
(QAbstractItemView *itemView);
38
39
protected
:
40
void
deactivate
()
override
;
41
void
find
(
const
QString &textToFind,
bool
skipCurrent,
42
bool
backward,
bool
*found,
bool
*wrapped)
override
;
43
44
private
:
45
QModelIndex findHelper(
const
QString &textToFind,
bool
skipCurrent,
bool
backward,
46
QModelIndex parent,
int
row,
int
column);
47
48
QAbstractItemView *m_itemView;
49
};
50
51
QT_END_NAMESPACE
52
53
#
endif
// ITEMVIEWFINDWIDGET_H
AbstractFindWidget
A search bar that is commonly added below a searchable widget.
Definition
abstractfindwidget_p.h:34
AbstractFindWidget::deactivate
virtual void deactivate()
Deactivates the find widget, making it invisible and handing focus to any associated QTextEdit.
Definition
abstractfindwidget.cpp:206
ItemViewFindWidget
A search bar that is commonly added below the searchable item view.
Definition
itemviewfindwidget_p.h:28
ItemViewFindWidget::setItemView
void setItemView(QAbstractItemView *itemView)
Associates a QAbstractItemView with this find widget.
Definition
itemviewfindwidget.cpp:66
ItemViewFindWidget::itemView
QAbstractItemView * itemView() const
Definition
itemviewfindwidget_p.h:34
ItemViewFindWidget::find
void find(const QString &textToFind, bool skipCurrent, bool backward, bool *found, bool *wrapped) override
\reimp
Definition
itemviewfindwidget.cpp:143
ItemViewFindWidget::deactivate
void deactivate() override
\reimp
Definition
itemviewfindwidget.cpp:80
skipForward
static bool skipForward(const QAbstractItemModel *model, QModelIndex &parent, int &row, int &column)
Definition
itemviewfindwidget.cpp:192
skipBackward
static bool skipBackward(const QAbstractItemModel *model, QModelIndex &parent, int &row, int &column)
Definition
itemviewfindwidget.cpp:221
indexLessThan
static bool indexLessThan(const QModelIndex &a, const QModelIndex &b)
Definition
itemviewfindwidget.cpp:90
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qttools
src
shared
findwidget
itemviewfindwidget_p.h
Generated on
for Qt by
1.18.0