KTextEditor
spellingmenu.cpp
80 connect(m_addToDictionaryAction, &QAction::triggered, this, &KateSpellingMenu::addCurrentWordToDictionary);
172 m_currentSuggestions = KTextEditor::EditorPrivate::self()->spellCheckManager()->suggestions(misspelledWord, m_currentDictionary);
176 for (QStringList::const_iterator i = m_currentSuggestions.cbegin(); i != m_currentSuggestions.cend() && counter > 0; ++i) {
226 for (QStringList::const_iterator i = m_currentSuggestions.cbegin(); i != m_currentSuggestions.cend() && counter > 0; ++i) {
250 const QString dictionary = m_view->doc()->dictionaryForMisspelledRange(*m_currentMisspelledRange);
252 newRange.setEnd(KTextEditor::Cursor(newRange.start().line(), newRange.start().column() + suggestion.size()));
255 KTextEditor::EditorPrivate::self()->spellCheckManager()->replaceCharactersEncodedIfNecessary(suggestion, doc, *m_currentMisspelledRange);
259 m_view->clearSelection(); // Ensure cursor move and next right click works properly if there was a selection
268 const QString dictionary = m_view->doc()->dictionaryForMisspelledRange(*m_currentMisspelledRange);
269 KTextEditor::EditorPrivate::self()->spellCheckManager()->addToDictionary(misspelledWord, dictionary);
270 m_view->doc()->clearMisspellingForWord(misspelledWord); // WARNING: 'm_currentMisspelledRange' is deleted here!
280 const QString dictionary = m_view->doc()->dictionaryForMisspelledRange(*m_currentMisspelledRange);
281 KTextEditor::EditorPrivate::self()->spellCheckManager()->ignoreWord(misspelledWord, dictionary);
282 m_view->doc()->clearMisspellingForWord(misspelledWord); // WARNING: 'm_currentMisspelledRange' is deleted here!
QAction * addAction(const QString &name, const QObject *receiver=nullptr, const char *member=nullptr)
constexpr int column() const noexcept
Retrieve the column on which this cursor is situated.
Definition cursor.h:192
constexpr int line() const noexcept
Retrieve the line on which this cursor is situated.
Definition cursor.h:174
Backend of KTextEditor::Document related public KTextEditor interfaces.
Definition katedocument.h:68
QString text(KTextEditor::Range range, bool blockwise=false) const override
Get the document content within the given range.
Definition katedocument.cpp:442
A range that is bound to a specific Document, and maintains its position.
Definition movingrange.h:131
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
constexpr Cursor start() const noexcept
Get the start position of this range.
Definition include/ktexteditor/range.h:153
void setEnd(Cursor end) noexcept
Set the end cursor to end.
Definition include/ktexteditor/range.h:234
constexpr bool isEmpty() const noexcept
Returns true if this range contains no characters, ie.
Definition include/ktexteditor/range.h:301
QMap< QString, QString > availableDictionaries() const
QString i18n(const char *text, const TYPE &arg...)
void setCheckable(bool)
void setChecked(bool)
QVariant data() const const
bool isEnabled() const const
void setFont(const QFont &font)
void setData(const QVariant &data)
void setText(const QString &text)
void triggered(bool checked)
bool isVisible() const const
QList< QAction * > actions() const const
QAction * addAction(QAction *action)
void setBold(bool enable)
const_iterator cbegin() const const
const_iterator cend() const const
Key key(const T &value, const Key &defaultKey) const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
T qobject_cast(QObject *object)
bool isEmpty() const const
qsizetype size() const const
singleShot
QString toString() const const
void insertActions(QAction *before, const QList< QAction * > &actions)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:07:21 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:07:21 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.