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 | // |
5 | // W A R N I N G |
6 | // ------------- |
7 | // |
8 | // This file is not part of the Qt API. It exists for the convenience |
9 | // of Qt Designer. This header file may change from version to version |
10 | // without notice, or even be removed. |
11 | // |
12 | // We mean it. |
13 | // |
14 | |
15 | #ifndef TEXTEDITFINDWIDGET_H |
16 | #define TEXTEDITFINDWIDGET_H |
17 | |
18 | #include "abstractfindwidget_p.h" |
19 | |
20 | QT_BEGIN_NAMESPACE |
21 | |
22 | class QTextEdit; |
23 | |
24 | class TextEditFindWidget : public AbstractFindWidget |
25 | { |
26 | Q_OBJECT |
27 | |
28 | public: |
29 | explicit TextEditFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0); |
30 | |
31 | QTextEdit *textEdit() const |
32 | { return m_textEdit; } |
33 | |
34 | void setTextEdit(QTextEdit *textEdit); |
35 | |
36 | protected: |
37 | void deactivate() override; |
38 | void find(const QString &textToFind, bool skipCurrent, |
39 | bool backward, bool *found, bool *wrapped) override; |
40 | |
41 | private: |
42 | QTextEdit *m_textEdit; |
43 | }; |
44 | |
45 | QT_END_NAMESPACE |
46 | |
47 | #endif // TEXTEDITFINDWIDGET_H |
48 |