KTextAddons

richtexteditfindbar.h
1/*
2 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "textcustomeditor_export.h"
10#include <TextCustomEditor/TextEditFindBarBase>
11
12class QTextEdit;
13namespace TextCustomEditor
14{
15class RichTextEditFindBarPrivate;
16/**
17 * @brief The RichTextEditFindBar class
18 * @author Laurent Montel <montel@kde.org>
19 */
20class TEXTCUSTOMEDITOR_EXPORT RichTextEditFindBar : public TextEditFindBarBase
21{
22 Q_OBJECT
23public:
24 explicit RichTextEditFindBar(QTextEdit *view, QWidget *parent = nullptr);
25 ~RichTextEditFindBar() override;
26
27protected:
28 [[nodiscard]] bool viewIsReadOnly() const override;
29 [[nodiscard]] bool documentIsEmpty() const override;
30 [[nodiscard]] bool searchInDocument(const QString &text, TextEditFindBarBase::FindFlags searchOptions) override;
31 [[nodiscard]] bool searchInDocument(const QRegularExpression &regExp, TextEditFindBarBase::FindFlags searchOptions) override;
32 void autoSearchMoveCursor() override;
33
34public Q_SLOTS:
35 void slotSearchText(bool backward = false, bool isAutoSearch = true) override;
36
37private Q_SLOTS:
38 void slotReplaceText() override;
39 void slotReplaceAllText() override;
40
41private:
42 std::unique_ptr<RichTextEditFindBarPrivate> const d;
43};
44}
The RichTextEditFindBar class.
The TextEditFindBarBase class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.