KTextAddons

richtextbrowserfindbar.h
1/*
2 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.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 QTextBrowser;
13namespace TextCustomEditor
14{
15class RichTextBrowserFindBarPrivate;
16/**
17 * @brief The RichTextBrowserFindBar class
18 * @author Laurent Montel <montel@kde.org>
19 */
20class TEXTCUSTOMEDITOR_EXPORT RichTextBrowserFindBar : public TextEditFindBarBase
21{
22 Q_OBJECT
23public:
24 explicit RichTextBrowserFindBar(QTextBrowser *view, QWidget *parent = nullptr);
25 ~RichTextBrowserFindBar() 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<RichTextBrowserFindBarPrivate> const d;
43};
44}
The TextEditFindBarBase class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:29:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.