diff options
author | Vlad Voicu <vladv@rosedu.org> | 2012-03-06 14:37:35 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-03-09 15:04:10 (GMT) |
commit | 7c868599331a7b4156c3572ba4f3dc75af57ce97 (patch) | |
tree | 37a2ce59535bb19dc5136f1f09da01e89290a44b /Swift/QtUI/QtTextEdit.h | |
parent | 91f344444c54f11de132cf22a7ba323727104989 (diff) | |
download | swift-contrib-7c868599331a7b4156c3572ba4f3dc75af57ce97.zip swift-contrib-7c868599331a7b4156c3572ba4f3dc75af57ce97.tar.bz2 |
Moved the settings from main window to chat window, also added lots of small improvments
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); }; } |