KTextWidgets
kfind.cpp
52 layout->addWidget(new QLabel(i18n("<qt>Find next occurrence of '<b>%1</b>'?</qt>", pattern), this));
94KFind::KFind(KFindPrivate &dd, const QString &pattern, long options, QWidget *parent, QWidget *findDialog)
449static int findRegex(const QString &text, const QString &pattern, int index, long options, int *matchedLength, QRegularExpressionMatch *rmatch)
489int KFind::find(const QString &text, const QString &pattern, int index, long options, int *matchedLength, QRegularExpressionMatch *rmatch)
502 Qt::CaseSensitivity caseSensitive = (options & KFind::CaseSensitive) ? Qt::CaseSensitive : Qt::CaseInsensitive;
606 message += QLatin1String("<br><br>"); // can't be in the i18n() of the first if() because of the plural form.
608 message += (d->options & KFind::FindBackwards) ? i18n("Continue from the end?") : i18n("Continue from the beginning?");
708 return d->findDialog ? static_cast<QWidget *>(d->findDialog) : (d->dialog ? d->dialog : parentWidget());
void textFound(const QString &text, int matchingIndex, int matchedLength)
Connect to this signal to implement highlighting of found text during the find operation.
void setPattern(const QString &pattern)
Change the pattern we're looking for.
Definition kfind.cpp:661
virtual bool shouldRestart(bool forceAsking=false, bool showNumMatches=true) const
Returns true if we should restart the search from scratch.
Definition kfind.cpp:580
virtual void resetCounts()
Call this to reset the numMatches count (and the numReplacements count for a KReplace).
Definition kfind.cpp:684
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:74
void setData(const QString &data, int startPos=-1)
Call this when needData returns true, before calling find().
Definition kfind.cpp:141
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:691
void textFoundAtId(int id, int matchingIndex, int matchedLength)
Connect to this signal to implement highlighting of found text during the find operation.
virtual void displayFinalDialog() const
Displays the final dialog saying "no match was found", if that was the case.
Definition kfind.cpp:567
QDialog * findNextDialog(bool create=false)
Return (or create) the dialog that shows the "find next?" prompt.
Definition kfind.cpp:188
static void assign(QPushButton *button, const KGuiItem &item)
QString i18np(const char *singular, const char *plural, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
KCOREADDONS_EXPORT Result match(QStringView pattern, QStringView str)
PrimaryAction
void information(QWidget *parent, const QString &text, const QString &title=QString(), const QString &dontShowAgainName=QString(), Options options=Notify)
ButtonCode questionTwoActions(QWidget *parent, const QString &text, const QString &title, const KGuiItem &primaryAction, const KGuiItem &secondaryAction, const QString &dontAskAgainName=QString(), Options options=Notify)
KGuiItem cont()
KGuiItem stop()
KGuiItem find()
void clicked(bool checked)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
bool isDigit(char32_t ucs4)
bool isLetter(char32_t ucs4)
virtual void accept()
void finished(int result)
virtual void reject()
ActionRole
void accepted()
QPushButton * addButton(StandardButton button)
void rejected()
void setStandardButtons(StandardButtons buttons)
Q_EMITQ_EMIT
Q_OBJECTQ_OBJECT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const
PatternOptions
const QChar at(qsizetype position) const const
void clear()
QChar * data()
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
qsizetype lastIndexOf(QChar ch, Qt::CaseSensitivity cs) const const
qsizetype length() const const
qsizetype size() const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
void truncate(qsizetype position)
QStringView mid(qsizetype start, qsizetype length) const const
CaseSensitivity
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void show()
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:20 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:20 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.