Go to the documentation of this file.
25#include <QtCore/QRect>
122 Q_DECLARE_FLAGS(SearchOptions, Options)
128 KFind(
const QString &pattern,
long options,
QWidget *parent);
147 bool needData()
const;
158 void setData(
const QString& data,
int startPos = -1 );
171 void setData(
int id,
const QString& data,
int startPos = -1 );
189 long options()
const;
197 virtual void setOptions(
long options );
202 QString pattern()
const;
207 void setPattern(
const QString& pattern );
215 int numMatches()
const;
223 virtual void resetCounts();
235 virtual bool validateMatch(
const QString & text,
252 virtual bool shouldRestart(
bool forceAsking =
false,
bool showNumMatches =
true )
const;
268 static int find(
const QString &text,
const QString &pattern,
int index,
long options,
int *matchedlength );
270 static int find(
const QString &text,
const QRegExp &pattern,
int index,
long options,
int *matchedlength );
276 virtual void displayFinalDialog()
const;
285 KDialog* findNextDialog(
bool create =
false );
295 void closeFindNextDialog();
320 void highlight(
const QString &text,
int matchingIndex,
int matchedLength);
335 void highlight(
int id,
int matchingIndex,
int matchedLength);
369 Q_PRIVATE_SLOT( d,
void _k_slotFindNext() )
370 Q_PRIVATE_SLOT( d,
void _k_slotDialogClosed() )
373Q_DECLARE_OPERATORS_FOR_FLAGS(
KFind::SearchOptions)
A dialog base class with standard buttons and predefined layouts.
A generic implementation of the "find" function.
QWidget * dialogsParent() const
friend class KReplacePrivate
QWidget * parentWidget() const
void highlight(int id, int matchingIndex, int matchedLength)
Connect to this signal to implement highlighting of found text during the find operation.
void dialogClosed()
Emitted when the 'find next' dialog is being closed.
void optionsChanged()
Emitted when the options have changed.
KFind(const QString &pattern, long options, QWidget *parent)
Only use this constructor if you don't use KFindDialog, or if you use it as a modal dialog.
@ CaseSensitive
Consider case when matching.
@ SelectedText
Only search selected area.
@ RegularExpression
Interpret the pattern as a regular expression.
@ MinimumUserOption
user options start with this bit
@ FromCursor
Start from current cursor position.
@ FindBackwards
Go backwards.
@ FindIncremental
Find incremental.
@ WholeWordsOnly
Match whole words only.
void highlight(const QString &text, int matchingIndex, int matchedLength)
Connect to this signal to implement highlighting of found text during the find operation.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.