KDEUI
kfind.cpp
Go to the documentation of this file.
55 setMainWidget( new QLabel( i18n("<qt>Find next occurrence of '<b>%1</b>'?</qt>", pattern), this ) );
317 d->incrementalPath.insert(d->pattern, Private::Match(d->currentId, d->index, d->matchedLength));
429 int KFind::find(const QString &text, const QString &pattern, int index, long options, int *matchedLength)
434 Qt::CaseSensitivity caseSensitive = (options & KFind::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive;
446 Qt::CaseSensitivity caseSensitive = (options & KFind::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive;
487 static int doFind(const QString &text, const QRegExp &pattern, int index, long options, int *matchedLength)
528 static int lineBasedFind(const QString &text, const QRegExp &pattern, int index, long options, int *matchedLength)
552 const int ret = doFind(line, pattern, lineNumber == startLineNumber ? index - offset : line.length(), options, matchedLength);
561 const int ret = doFind(line, pattern, lineNumber == startLineNumber ? (index - offset) : 0, options, matchedLength);
572 int KFind::find(const QString &text, const QRegExp &pattern, int index, long options, int *matchedLength)
661 Qt::CaseSensitivity caseSensitive = (d->options & KFind::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive;
static bool isWholeWords(const QString &text, int starts, int matchedLength)
Definition: kfind.cpp:403
static bool matchOk(const QString &text, int index, int matchedLength, long options)
Definition: kfind.cpp:415
static void information(QWidget *parent, const QString &text, const QString &caption=QString(), const QString &dontShowAgainName=QString(), Options options=Notify)
Display an "Information" dialog.
Definition: kmessagebox.cpp:960
void message(KMessage::MessageType messageType, const QString &text, const QString &caption=QString())
virtual bool validateMatch(const QString &text, int index, int matchedlength)
Virtual method, which allows applications to add extra checks for validating a candidate match.
Definition: kfind.cpp:705
static int lineBasedFind(const QString &text, const QRegExp &pattern, int index, long options, int *matchedLength)
Definition: kfind.cpp:528
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void highlight(const QString &text, int matchingIndex, int matchedLength)
Connect to this signal to implement highlighting of found text during the find operation.
KAction * create(StandardAction id, const QObject *recvr, const char *slot, QObject *parent)
Creates an action corresponding to one of the KStandardAction::StandardAction actions,...
Definition: kstandardaction.cpp:82
QString i18np(const char *sing, const char *plur, const A1 &a1)
void setData(const QString &data, int startPos=-1)
Call this when needData returns true, before calling find().
Definition: kfind.cpp:109
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.
Definition: kfind.cpp:61
QString i18n(const char *text)
virtual void displayFinalDialog() const
Displays the final dialog saying "no match was found", if that was the case.
Definition: kfind.cpp:599
static int questionYesNo(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonYes=KStandardGuiItem::yes(), const KGuiItem &buttonNo=KStandardGuiItem::no(), const QString &dontAskAgainName=QString(), Options options=Notify)
Display a simple "question" dialog.
Definition: kmessagebox.cpp:353
virtual void resetCounts()
Call this to reset the numMatches count (and the numReplacements count for a KReplace).
Definition: kfind.cpp:700
void setPattern(const QString &pattern)
Change the pattern we're looking for.
Definition: kfind.cpp:686
static int doFind(const QString &text, const QRegExp &pattern, int index, long options, int *matchedLength)
Definition: kfind.cpp:487
virtual bool shouldRestart(bool forceAsking=false, bool showNumMatches=true) const
Returns true if we should restart the search from scratch.
Definition: kfind.cpp:609
KDialog * findNextDialog(bool create=false)
Return (or create) the dialog that shows the "find next?" prompt.
Definition: kfind.cpp:153
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jan 19 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jan 19 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.