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 | |
4 | #ifndef TEXTEDITFINDWIDGET_H |
5 | #define TEXTEDITFINDWIDGET_H |
6 | |
7 | #include "abstractfindwidget.h" |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | class QTextEdit; |
12 | |
13 | class TextEditFindWidget : public AbstractFindWidget |
14 | { |
15 | Q_OBJECT |
16 | |
17 | public: |
18 | explicit TextEditFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0); |
19 | |
20 | QTextEdit *textEdit() const |
21 | { return m_textEdit; } |
22 | |
23 | void setTextEdit(QTextEdit *textEdit); |
24 | |
25 | protected: |
26 | void deactivate() override; |
27 | void find(const QString &textToFind, bool skipCurrent, |
28 | bool backward, bool *found, bool *wrapped) override; |
29 | |
30 | private: |
31 | QTextEdit *m_textEdit; |
32 | }; |
33 | |
34 | QT_END_NAMESPACE |
35 | |
36 | #endif // TEXTEDITFINDWIDGET_H |
37 | |