KTextAddons
9#include "textcustomeditor_export.h"
10#include <QRegularExpression>
12namespace TextCustomEditor
15class TextReplaceWidget;
20class TEXTCUSTOMEDITOR_EXPORT TextEditFindBarBase :
public QWidget
26 FindBackward = 0x00001,
27 FindCaseSensitively = 0x00002,
28 FindWholeWords = 0x00004,
29 FindRespectDiacritics = 0x00008,
31 Q_DECLARE_FLAGS(FindFlags, FindFlag)
34 ~TextEditFindBarBase()
override;
36 [[nodiscard]]
QString text()
const;
37 void setText(
const QString &text);
39 void focusAndSetCursor();
43 void setHideWhenClose(
bool hide);
46 void displayMessageIndicator(
const QString &message);
50 [[nodiscard]]
virtual bool viewIsReadOnly()
const = 0;
51 [[nodiscard]]
virtual bool documentIsEmpty()
const = 0;
52 virtual bool searchInDocument(
const QString &text, TextEditFindBarBase::FindFlags searchOptions) = 0;
53 virtual bool searchInDocument(
const QRegularExpression ®Exp, TextEditFindBarBase::FindFlags searchOptions) = 0;
54 virtual void autoSearchMoveCursor() = 0;
56 [[nodiscard]]
bool event(
QEvent *e)
override;
57 void clearSelections();
58 bool searchText(
bool backward,
bool isAutoSearch);
60 void setFoundMatch(
bool match);
61 void messageInfo(
bool backward,
bool isAutoSearch,
bool found);
66 void autoSearch(
const QString &str);
67 virtual void slotSearchText(
bool backward =
false,
bool isAutoSearch =
true) = 0;
71 TEXTCUSTOMEDITOR_NO_EXPORT
void slotClearSearch();
72 TEXTCUSTOMEDITOR_NO_EXPORT
void slotUpdateSearchOptions();
73 virtual void slotReplaceText() = 0;
74 virtual void slotReplaceAllText() = 0;
79 TextFindWidget *
const mFindWidget;
80 TextReplaceWidget *
const mReplaceWidget;
81 bool mHideWhenClose =
true;
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:49:24 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.