From e315ff15daf26cbc70b6f2da50e6ca18081fc7c4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 19 Sep 2012 23:22:13 +0200 Subject: Integrated spell checking for rekonq2 (lindsay's work imported) - inline spell highlighter. This requires WebKit 2.3 to work. - Addition of a suggested replacement word list to the context menu, for the word right clicked on - A standard modeless spell check dialog that works on the current editable text (or selection). Heavily cribbed from Dawit's work on kdewebkitpart. oops... also a codingstyle script round here... :) --- src/webtab/webview.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/webtab/webview.h') diff --git a/src/webtab/webview.h b/src/webtab/webview.h index b1648d0d..5487a59f 100644 --- a/src/webtab/webview.h +++ b/src/webtab/webview.h @@ -39,6 +39,7 @@ #include #include #include +#include // Forward Declarations class WebPage; @@ -72,6 +73,7 @@ public: const QByteArray & body = QByteArray()); protected: + bool popupSpellMenu(QContextMenuEvent *event); void contextMenuEvent(QContextMenuEvent *event); void mouseMoveEvent(QMouseEvent *event); @@ -95,6 +97,10 @@ private Q_SLOTS: void openLinkInNewWindow(); void openLinkInNewTab(); void bookmarkLink(); + void spellCheck(); + void spellCheckerCorrected(const QString& original, int pos, const QString& replacement); + void spellCheckerMisspelling(const QString& text, int pos); + void slotSpellCheckDone(const QString&); void sendByMail(); void viewImage(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); @@ -130,6 +136,11 @@ private: private: QPoint m_clickPos; + QWebHitTestResult m_contextMenuHitResult; + + // Spell Checking + int m_spellTextSelectionStart; + int m_spellTextSelectionEnd; // Auto Scroll QTimer *const m_autoScrollTimer; -- cgit v1.2.1