KTextEditor
12#include <KActionCollection>
14#include <ktexteditor/movingrange.h>
15#include <ktexteditor/movingrangefeedback.h>
16#include <ktexteditor/range.h>
17#include <ktexteditor/view.h>
23class KateOnTheFlyChecker;
25class KateSpellingMenu :
public QObject
28 friend class KateOnTheFlyChecker;
31 explicit KateSpellingMenu(KTextEditor::ViewPrivate *view);
32 ~KateSpellingMenu()
override;
34 bool isEnabled()
const;
35 bool isVisible()
const;
37 void createActions(KActionCollection *ac);
43 void prepareToBeShown(QMenu *contextMenu);
48 void cleanUpAfterShown();
50 void setEnabled(
bool b);
51 void setVisible(
bool b);
54 KTextEditor::ViewPrivate *m_view;
55 KActionMenu *m_spellingMenuAction;
56 QAction *m_ignoreWordAction, *m_addToDictionaryAction;
57 QActionGroup *m_dictionaryGroup;
58 QList<QAction *> m_menuOnTopSuggestionList;
59 QMenu *m_spellingMenu;
60 KTextEditor::MovingRange *m_currentMisspelledRange;
65 bool m_currentMisspelledRangeNeedCleanUp =
false;
66 KTextEditor::Range m_selectedRange;
67 QString m_currentDictionary;
68 QStringList m_currentSuggestions;
72 void rangeDeleted(KTextEditor::MovingRange *range);
73 void caretEnteredMisspelledRange(KTextEditor::MovingRange *range);
74 void caretExitedMisspelledRange(KTextEditor::MovingRange *range);
77 void populateSuggestionsMenu();
78 void replaceWordBySuggestion(
const QString &suggestion);
80 void addCurrentWordToDictionary();
81 void ignoreCurrentWord();
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:55:24 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.