KTextAddons

plaintexteditfindbar.h
1/*
2 SPDX-FileCopyrightText: 2012-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 QPlainTextEdit;
13namespace TextCustomEditor
14{
15class PlainTextEditFindBarPrivate;
16/**
17 * @brief The PlainTextEditFindBar class
18 * @author Laurent Montel <montel@kde.org>
19 */
20class TEXTCUSTOMEDITOR_EXPORT PlainTextEditFindBar : public TextEditFindBarBase
21{
22 Q_OBJECT
23
24public:
25 explicit PlainTextEditFindBar(QPlainTextEdit *view, QWidget *parent = nullptr);
26 ~PlainTextEditFindBar() override;
27
28protected:
29 [[nodiscard]] bool viewIsReadOnly() const override;
30 [[nodiscard]] bool documentIsEmpty() const override;
31 [[nodiscard]] bool searchInDocument(const QString &text, TextEditFindBarBase::FindFlags searchOptions) override;
32 [[nodiscard]] bool searchInDocument(const QRegularExpression &regExp, TextEditFindBarBase::FindFlags searchOptions) override;
33 void autoSearchMoveCursor() override;
34
35public Q_SLOTS:
36 void slotSearchText(bool backward = false, bool isAutoSearch = true) override;
37
38private Q_SLOTS:
39 void slotReplaceText() override;
40 void slotReplaceAllText() override;
41
42private:
43 std::unique_ptr<PlainTextEditFindBarPrivate> const d;
44};
45}
The PlainTextEditFindBar class.
The TextEditFindBarBase class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:49:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.