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;
void message(KMessage::MessageType messageType, const QString &text, const QString &caption=QString())
QString i18n(const char *text)
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
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
void truncate(int position)
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
QString i18np(const char *sing, const char *plur, const A1 &a1)
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
bool isDigit() const
const T & at(int i) const
int size() const
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
bool isLetter() const
void clear()
int matchedLength() const
int indexIn(const QString &str, int offset, CaretMode caretMode) const
int count(const T &value) const
Definition: kstandardaction.h:129
Definition: kfind.h:139
void setData(const QString &data, int startPos=-1)
Call this when needData returns true, before calling find().
Definition: kfind.cpp:109
virtual void displayFinalDialog() const
Displays the final dialog saying "no match was found", if that was the case.
Definition: kfind.cpp:599
void highlight(const QString &text, int matchingIndex, int matchedLength)
Connect to this signal to implement highlighting of found text during the find operation.
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
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
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
static bool matchOk(const QString &text, int index, int matchedLength, long options)
Definition: kfind.cpp:415
static bool isWholeWords(const QString &text, int starts, int matchedLength)
Definition: kfind.cpp:403
static int doFind(const QString &text, const QRegExp &pattern, int index, long options, int *matchedLength)
Definition: kfind.cpp:487
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 bool shouldRestart(bool forceAsking=false, bool showNumMatches=true) const
Returns true if we should restart the search from scratch.
Definition: kfind.cpp:609
QString mid(int position, int n) const
QString escape(const QString &plain)
const QChar at(int position) const
KAction * create(StandardAction id, const QObject *recvr, const char *slot, QObject *parent)
Creates an action corresponding to one of the KStandardAction::StandardAction actions, which is connected to the given object and slot, and is owned by parent.
Definition: kstandardaction.cpp:82
QString pattern() const
int length() const
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
Definition: kmessagebox.h:72
void show()
static int lineBasedFind(const QString &text, const QRegExp &pattern, int index, long options, int *matchedLength)
Definition: kfind.cpp:528
Definition: kfind.h:139
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
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 Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.