diff options
author | Vlad Voicu <vladvoic@gmail.com> | 2011-11-28 16:37:32 (GMT) |
---|---|---|
committer | vlad <vlad@tyrion.(none)> | 2012-10-13 13:55:44 (GMT) |
commit | 4ef710cfcc4aa4f171426ef55cbece00cd69af62 (patch) | |
tree | 243974bc3ae35199d7e4317bc737552e1a2a6f0b /Swift/QtUI/QtTextEdit.h | |
parent | 3cf3828562d54db0ddaacfcea755b15c5b8c5e90 (diff) | |
download | swift-contrib-4ef710cfcc4aa4f171426ef55cbece00cd69af62.zip swift-contrib-4ef710cfcc4aa4f171426ef55cbece00cd69af62.tar.bz2 |
Initial, buggy version of a minimal spell-checker
Diffstat (limited to 'Swift/QtUI/QtTextEdit.h')
-rw-r--r-- | Swift/QtUI/QtTextEdit.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Swift/QtUI/QtTextEdit.h b/Swift/QtUI/QtTextEdit.h index 075728b..a940879 100644 --- a/Swift/QtUI/QtTextEdit.h +++ b/Swift/QtUI/QtTextEdit.h @@ -5,20 +5,30 @@ */ #pragma once + #include <QTextEdit> namespace Swift { + class SpellChecker; class QtTextEdit : public QTextEdit { Q_OBJECT public: QtTextEdit(QWidget* parent = 0); + virtual ~QtTextEdit(); virtual QSize sizeHint() const; signals: + void wordCorrected(QString& word); void returnPressed(); void unhandledKeyPressEvent(QKeyEvent* event); + public slots: + void handleReplaceMisspellWord(const QString& word, const QPoint& position); protected: virtual void keyPressEvent(QKeyEvent* event); + virtual void contextMenuEvent(QContextMenuEvent* event); private slots: void handleTextChanged(); + private: + SpellChecker *checker_; + void underlineMisspells(); }; } |