KTextWidgets
kfinddialog.cpp
32KFindDialog::KFindDialog(QWidget *parent, long options, const QStringList &findStrings, bool hasSelection, bool replaceDialog)
33 : KFindDialog(*new KFindDialogPrivate(this), parent, options, findStrings, hasSelection, replaceDialog)
38KFindDialog::KFindDialog(KFindDialogPrivate &dd, QWidget *parent, long options, const QStringList &findStrings, bool hasSelection, bool replaceDialog)
69void KFindDialogPrivate::init(bool forReplace, const QStringList &_findStrings, bool hasSelection)
220 find->setWhatsThis(i18n("Enter a pattern to search for, or select a previous pattern from the list."));
222 regExpItem->setWhatsThis(i18n("Click here to edit your regular expression using a graphical editor."));
223 replace->setWhatsThis(i18n("Enter a replacement string, or select a previous one from the list."));
232 wholeWordsOnly->setWhatsThis(i18n("Require word boundaries in both ends of a match to succeed."));
233 fromCursor->setWhatsThis(i18n("Start searching at the current cursor location rather than at the top."));
235 caseSensitive->setWhatsThis(i18n("Perform a case sensitive search: entering the pattern 'Joe' will not match 'joe' or 'JOE', only 'Joe'."));
439 d->caseSensitive->setChecked((d->enabled & KFind::CaseSensitive) && (options & KFind::CaseSensitive));
440 d->wholeWordsOnly->setChecked((d->enabled & KFind::WholeWordsOnly) && (options & KFind::WholeWordsOnly));
442 d->findBackwards->setChecked((d->enabled & KFind::FindBackwards) && (options & KFind::FindBackwards));
443 d->selectedText->setChecked((d->enabled & KFind::SelectedText) && (options & KFind::SelectedText));
444 d->regExp->setChecked((d->enabled & KFind::RegularExpression) && (options & KFind::RegularExpression));
508 patterns->addAction(new RegExpAction(patterns, item.description.toString(), QLatin1String(item.regExp), item.cursorAdjustment));
564 QAction *action = placeholders->exec(backRefItem->mapToGlobal(backRefItem->rect().bottomLeft()));
581 const int n = QRegularExpression(q->pattern(), QRegularExpression::UseUnicodePropertiesOption).captureCount();
599 if (!QRegularExpression(q->pattern(), QRegularExpression::UseUnicodePropertiesOption).isValid()) {
void optionsChanged()
This signal is sent whenever one of the option checkboxes is toggled.
void setSupportsBackwardsFind(bool supports)
Enable/disable the 'Find backwards' option, depending on whether the application supports it.
Definition kfinddialog.cpp:373
KFindDialog(QWidget *parent=nullptr, long options=0, const QStringList &findStrings=QStringList(), bool hasSelection=false, bool replaceDialog=false)
Construct a modal find dialog.
Definition kfinddialog.cpp:32
void setHasCursor(bool hasCursor)
Hide/show the 'from cursor' option, depending on whether the application implements a cursor.
Definition kfinddialog.cpp:360
void setSupportsWholeWordsFind(bool supports)
Enable/disable the 'Whole words only' option, depending on whether the application supports it.
Definition kfinddialog.cpp:401
void setSupportsCaseSensitiveFind(bool supports)
Enable/disable the 'Case sensitive' option, depending on whether the application supports it.
Definition kfinddialog.cpp:387
void setFindHistory(const QStringList &history)
Provide the list of strings to be displayed as the history of find strings.
Definition kfinddialog.cpp:322
void setSupportsRegularExpressionFind(bool supports)
Enable/disable the 'Regular expression' option, depending on whether the application supports it.
Definition kfinddialog.cpp:415
void setHasSelection(bool hasSelection)
Enable/disable the 'search in selection' option, depending on whether there actually is a selection.
Definition kfinddialog.cpp:335
QWidget * findExtension() const
Returns an empty widget which the user may fill with additional UI elements as required.
Definition kfinddialog.cpp:50
static void assign(QPushButton *button, const KGuiItem &item)
QString text() const
void setWhatsThis(const QString &whatsThis)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
QAction * replace(const QObject *recvr, const char *slot, QObject *parent)
KGuiItem find()
void clicked(bool checked)
void toggled(bool checked)
void setWhatsThis(const QString &what)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
void editTextChanged(const QString &text)
virtual void showEvent(QShowEvent *event) override
void accepted()
void rejected()
void addWidget(QWidget *widget, int fromRow, int fromColumn, int rowSpan, int columnSpan, Qt::Alignment alignment)
void setBuddy(QWidget *buddy)
void setCursorPosition(int)
void insert(const QString &newText)
T & first()
bool isEmpty() const const
const QObjectList & children() const const
QList< T > findChildren(Qt::FindChildOptions options) const const
QObject * parent() const const
UseUnicodePropertiesOption
int captureCount() const const
bool isValid() const const
bool isEmpty() const const
NonModal
QWidget(QWidget *parent, Qt::WindowFlags f)
void setEnabled(bool)
void setTabOrder(QWidget *first, QWidget *second)
void setWindowTitle(const QString &)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:47:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:47:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.