24 #include <kdialogbase.h>
118 KFind(
const TQString &pattern,
long options, TQWidget *parent);
130 KFind(
const TQString &pattern,
long options, TQWidget *parent, TQWidget* findDialog);
151 bool needData()
const;
162 void setData(
const TQString& data,
int startPos = -1 );
177 void setData(
int id,
const TQString& data,
int startPos = -1 );
204 virtual void setOptions(
long options );
209 TQString
pattern()
const {
return m_pattern; }
215 void setPattern(
const TQString& pattern );
244 virtual bool validateMatch(
const TQString & text,
int index,
int matchedlength ) {
245 Q_UNUSED(text); Q_UNUSED(index); Q_UNUSED(matchedlength);
return true; }
262 virtual bool shouldRestart(
bool forceAsking =
false,
bool showNumMatches =
true )
const;
278 static int find(
const TQString &text,
const TQString &pattern,
int index,
long options,
int *matchedlength );
293 static int find(
const TQString &text,
const TQRegExp &pattern,
int index,
long options,
int *matchedlength );
299 virtual void displayFinalDialog()
const;
309 KDialogBase* findNextDialog(
bool create =
false );
319 void closeFindNextDialog();
348 void highlight(
const TQString &text,
int matchingIndex,
int matchedLength);
368 void highlight(
int id,
int matchingIndex,
int matchedLength);
380 void optionsChanged();
392 TQWidget* parentWidget()
const {
return (TQWidget *)parent(); }
393 TQWidget* dialogsParent()
const;
398 void slotDialogClosed();
401 void init(
const TQString& pattern );
402 void startNewIncrementalSearch();
404 static bool isInWord( TQChar ch );
405 static bool isWholeWords(
const TQString &text,
int starts,
int matchedLength );
virtual void resetCounts()
Call this to reset the numMatches count (and the numReplacements count for a KReplace).
virtual bool validateMatch(const TQString &text, int index, int matchedlength)
Virtual method, which allows applications to add extra checks for validating a candidate match...
A generic implementation of the "replace" function.
int numMatches() const
Return the number of matches found (i.e.
A generic implementation of the "find" function.
long options() const
Return the current options.