diff options
Diffstat (limited to 'Swift/QtUI/QtTextEdit.h')
-rw-r--r-- | Swift/QtUI/QtTextEdit.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Swift/QtUI/QtTextEdit.h b/Swift/QtUI/QtTextEdit.h index 38d5d0a..b40c935 100644 --- a/Swift/QtUI/QtTextEdit.h +++ b/Swift/QtUI/QtTextEdit.h @@ -12,9 +12,11 @@ #include <Swift/Controllers/SettingConstants.h> #include <QTextEdit> +#include <QPointer> namespace Swift { class SpellChecker; + class QtSpellCheckerWindow; class QtTextEdit : public QTextEdit { Q_OBJECT public: @@ -26,7 +28,7 @@ namespace Swift { void returnPressed(); void unhandledKeyPressEvent(QKeyEvent* event); public slots: - void handleReplaceMisspellWord(const QString& word, const boost::tuple<int,int>& wordPosition); + void handleModifiedSettings(); protected: virtual void keyPressEvent(QKeyEvent* event); virtual void contextMenuEvent(QContextMenuEvent* event); @@ -34,10 +36,15 @@ namespace Swift { void handleTextChanged(); private: SpellChecker *checker_; + std::vector<QAction*> replaceWordActions_; PositionPairList misspelledPositions_; SettingsProvider *settings_; + QPointer<QtSpellCheckerWindow> spellCheckerWindow_; + void addSuggestions(QMenu* menu, QContextMenuEvent* event); + void replaceMisspelledWord(const QString& word, int cursorPosition); void setUpSpellChecker(); void underlineMisspells(); + void spellCheckerSettingsWindow(); boost::tuple<int,int> getWordFromCursor(int cursorPosition); }; } |