KTextWidgets
ktextedit.cpp
61 QObject::connect(spellDialog, &Sonnet::Dialog::replace, q, [this](const QString &oldWord, int pos, const QString &newWord) {
64 QObject::connect(spellDialog, &Sonnet::Dialog::misspelling, q, [this](const QString &text, int pos) {
67 QObject::connect(spellDialog, &Sonnet::Dialog::autoCorrect, q, &KTextEdit::spellCheckerAutoCorrect);
75 // Laurent in sonnet/dialog.cpp we emit done(QString) too => it calls here twice spellCheckerFinished not necessary
78 QObject::connect(spellDialog, &Sonnet::Dialog::spellCheckStatus, q, &KTextEdit::spellCheckStatus);
81 QObject::connect(spellDialog, &Sonnet::Dialog::spellCheckDone, q, &KTextEdit::spellCheckingFinished);
83 // Laurent in sonnet/dialog.cpp we emit done(QString) too => it calls here twice spellCheckerFinished not necessary
102void KTextEditPrivate::spellCheckerAutoCorrect(const QString ¤tWord, const QString &autoCorrectWord)
117void KTextEditPrivate::spellCheckerCorrected(const QString &oldWord, int pos, const QString &newWord)
181void KTextEditPrivate::slotFindHighlight(const QString &text, int matchingIndex, int matchingLength)
194void KTextEditPrivate::slotReplaceText(const QString &text, int replacementIndex, int replacedLength, int matchedLength)
198 // qDebug() << "Replace: [" << text << "] ri:" << replacementIndex << " rl:" << replacedLength << " ml:" << matchedLength;
349 // We use visual positioning here since keyboard arrows represents visual direction (left, right)
355 // We use visual positioning here since keyboard arrows represents visual direction (left, right)
501 d->spellCheckAction = popup->addAction(QIcon::fromTheme(QStringLiteral("tools-check-spelling")), i18nc("@action:inmenu", "Check Spelling…"));
517 languageAction->setChecked(language == i.value() || (language.isEmpty() && d->speller->defaultLanguage() == i.value()));
542 QAction *findPrevAction = KStandardActions::findPrev(this, &KTextEdit::slotFindPrevious, popup);
794 d->replace = new KReplace(d->repDlg->pattern(), d->repDlg->replacement(), d->repDlg->options(), this);
796 if (d->replace->options() & KFind::FromCursor || d->replace->options() & KFind::FindBackwards) {
801 connect(d->replace, &KFind::textFound, this, [d](const QString &text, int matchingIndex, int matchedLength) {
806 connect(d->replace, &KReplace::textReplaced, this, [d](const QString &text, int replacementIndex, int replacedLength, int matchedLength) {
848 d->replace->deleteLater(); // we are in a slot connected to m_replace, don't delete it right away
878 connect(d->find, &KFind::textFound, this, [d](const QString &text, int matchingIndex, int matchedLength) {
static void setAutoHideCursor(QWidget *w, bool enable, bool customEventFilter=false)
void textFound(const QString &text, int matchingIndex, int matchedLength)
Connect to this signal to implement highlighting of found text during the find operation.
@ PromptOnReplace
Should the user be prompted before the replace operation?
Definition kreplacedialog.h:54
void textReplaced(const QString &text, int replacementIndex, int replacedLength, int matchedLength)
Connect to this signal to implement updating of replaced text during the replace operation.
void setSpellCheckingLanguage(const QString &language)
Set the spell check language which will be used for highlighting spelling mistakes and for the spellc...
Definition ktextedit.cpp:267
virtual bool shouldBlockBeSpellChecked(const QString &block) const
Returns true if the given paragraph or block should be spellcheck.
Definition ktextedit.cpp:692
virtual void setCheckSpellingEnabled(bool check)
Turns background spell checking for this text edit on or off.
Definition ktextedit.cpp:648
virtual void createHighlighter()
Allows to create a specific highlighter if reimplemented.
Definition ktextedit.cpp:601
void addTextDecorator(Sonnet::SpellCheckDecorator *decorator)
Add custom spell checker decorator.
Definition ktextedit.cpp:628
void spellCheckingCanceled()
signal spellCheckingCanceled is sent when we cancel spell checking.
void showSpellConfigDialog(const QString &windowIcon=QString())
Opens a Sonnet::ConfigDialog for this text edit.
Definition ktextedit.cpp:282
void highlightWord(int length, int pos)
Selects the characters at the specified position.
Definition ktextedit.cpp:751
virtual void setReadOnly(bool readOnly)
Reimplemented to set a proper "deactivated" background color.
Definition ktextedit.cpp:697
KTextEdit(const QString &text, QWidget *parent=nullptr)
Constructs a KTextEdit object.
Definition ktextedit.cpp:230
virtual void deleteWordBack()
Deletes a word backwards from the current cursor position, if available.
Definition ktextedit.cpp:446
bool event(QEvent *) override
Reimplemented to catch "delete word" shortcut events.
Definition ktextedit.cpp:298
void contextMenuEvent(QContextMenuEvent *) override
Reimplemented from QTextEdit to add spelling related items when appropriate.
Definition ktextedit.cpp:591
void keyPressEvent(QKeyEvent *) override
Reimplemented for internal reasons.
Definition ktextedit.cpp:1031
void spellCheckingFinished()
signal spellCheckingFinished is sent when we finish spell check or we click on "Terminate" button in ...
void focusInEvent(QFocusEvent *) override
Reimplemented to instantiate a KDictSpellingHighlighter, if spellchecking is enabled.
Definition ktextedit.cpp:674
void spellCheckerAutoCorrect(const QString ¤tWord, const QString &autoCorrectWord)
void setHighlighter(Sonnet::Highlighter *_highLighter)
Sets a custom background spell highlighter for this text edit.
Definition ktextedit.cpp:635
void checkSpellingChanged(bool)
emit signal when we activate or not autospellchecking
void spellCheckStatus(const QString &)
Signal sends when spell checking is finished/stopped/completed.
void aboutToShowContextMenu(QMenu *menu)
Emitted before the context menu is displayed.
Sonnet::Highlighter * highlighter() const
Returns the current highlighter, which is 0 if spell checking is disabled.
Definition ktextedit.cpp:606
void languageChanged(const QString &language)
Emitted when the user changes the language in the spellcheck dialog shown by checkSpelling() or when ...
virtual void deleteWordForward()
Deletes a word forwards from the current cursor position, if available.
Definition ktextedit.cpp:453
QString language() const
void setLanguage(const QString &language)
void spellCheckDone(const QString &newBuffer)
void spellCheckStatus(const QString &)
void languageChanged(const QString &language)
void setCurrentLanguage(const QString &language)
Highlighter * highlighter() const
void setHighlighter(Highlighter *highlighter)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
void information(QWidget *parent, const QString &text, const QString &title=QString(), const QString &dontShowAgainName=QString(), Options options=Notify)
const QList< QKeySequence > & beginningOfLine()
const QList< QKeySequence > & begin()
const QList< QKeySequence > & cut()
const QList< QKeySequence > & undo()
const QList< QKeySequence > & next()
const QList< QKeySequence > & deleteWordBack()
const QList< QKeySequence > & find()
const QList< QKeySequence > & paste()
const QList< QKeySequence > & end()
const QList< QKeySequence > & copy()
const QList< QKeySequence > & backwardWord()
const QList< QKeySequence > & endOfLine()
const QList< QKeySequence > & forwardWord()
const QList< QKeySequence > & findPrev()
const QList< QKeySequence > & deleteWordForward()
const QList< QKeySequence > & findNext()
const QList< QKeySequence > & prior()
const QList< QKeySequence > & replace()
const QList< QKeySequence > & pasteSelection()
const QList< QKeySequence > & redo()
KOSM_EXPORT double distance(const std::vector< const OSM::Node * > &path, Coordinate coord)
virtual bool event(QEvent *event) override
QWidget * viewport() const const
SliderPageStepAdd
void setCheckable(bool)
void setChecked(bool)
QVariant data() const const
void setEnabled(bool)
void setIcon(const QIcon &icon)
void setActionGroup(QActionGroup *group)
void setData(const QVariant &data)
void triggered(bool checked)
void setExclusive(bool b)
Selection
QString text(Mode mode) const const
virtual int exec()
ShortcutOverride
void accept()
Type type() const const
QClipboard * clipboard()
QIcon fromTheme(const QString &name)
SelectAll
const_reference at(qsizetype i) const const
qsizetype count() const const
qsizetype indexOf(const AT &value, qsizetype from) const const
bool hasNext() const const
const Key & key() const const
Item next()
const T & value() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void setParent(QObject *parent)
Disabled
Window
const QColor & color(ColorGroup group, ColorRole role) const const
void setColor(ColorGroup group, ColorRole role, const QColor &color)
bool isEmpty() const const
qsizetype length() const const
QString mid(qsizetype position, qsizetype n) const const
void rehighlight()
WA_DeleteOnClose
KeepAnchor
Start
int anchor() const const
void beginEditBlock()
void clearSelection()
void endEditBlock()
void insertText(const QString &text)
bool movePosition(MoveOperation operation, MoveMode mode, int n)
void removeSelectedText()
QString selectedText() const const
void setPosition(int pos, MoveMode m)
virtual void clear()
QMenu * createStandardContextMenu()
document
void ensureCursorVisible()
virtual void focusInEvent(QFocusEvent *e) override
virtual void keyPressEvent(QKeyEvent *e) override
bool isReadOnly() const const
void setTextCursor(const QTextCursor &cursor)
tabChangesFocus
QTextCursor textCursor() const const
QString toPlainText() const const
QString toString() const const
QList< QAction * > actions() const const
cursor
enabled
bool hasFocus() const const
void insertAction(QAction *before, QAction *action)
palette
pos
void setAttribute(Qt::WidgetAttribute attribute, bool on)
void show()
bool testAttribute(Qt::WidgetAttribute attribute) const const
void update()
void setUpdatesEnabled(bool enable)
windowIcon
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.