src/hbplugins/inputmethods/common/hbinputspellquerydialog.cpp
changeset 30 80e4d18b72f5
parent 28 b7da29130b0e
equal deleted inserted replaced
28:b7da29130b0e 30:80e4d18b72f5
    37 #include <hbinputregioncollector_p.h>
    37 #include <hbinputregioncollector_p.h>
    38 #include <hbinputmainwindow_p.h>
    38 #include <hbinputmainwindow_p.h>
    39 
    39 
    40 #include "hbinputspellquerydialog.h"
    40 #include "hbinputspellquerydialog.h"
    41 #include "hbinputmodehandler.h"
    41 #include "hbinputmodehandler.h"
       
    42 #include "hbinputdialog_p.h"
    42 
    43 
    43 static const qint16 MAXUDBWORDSIZE = 64;
    44 static const qint16 MAXUDBWORDSIZE = 64;
       
    45 
       
    46 class HbInputSpellQueryPrivate : public HbInputDialogPrivate
       
    47 {
       
    48     Q_DECLARE_PUBLIC(HbInputSpellQuery)
       
    49 
       
    50 public:
       
    51     HbInputSpellQueryPrivate() {};
       
    52     ~HbInputSpellQueryPrivate() {};
       
    53 };
    44 
    54 
    45 HbInputSpellQuery::HbInputSpellQuery(HbInputMethod *inputMethod, HbInputPredictionHandler *predictionHandler)
    55 HbInputSpellQuery::HbInputSpellQuery(HbInputMethod *inputMethod, HbInputPredictionHandler *predictionHandler)
    46  : mOwner(inputMethod), mPredictionHandler(predictionHandler), mPrimaryAction(0) 
    56  : mOwner(inputMethod), mPredictionHandler(predictionHandler), mPrimaryAction(0) 
    47 {
    57 {
    48     setInputMode(HbInputDialog::TextInput);
    58     setInputMode(HbInputDialog::TextInput);
    55 {
    65 {
    56 }
    66 }
    57 
    67 
    58 void HbInputSpellQuery::launch(QString editorText)
    68 void HbInputSpellQuery::launch(QString editorText)
    59 {
    69 {
       
    70     Q_D(HbInputSpellQuery);
       
    71 
    60     if (!mOwner) {
    72     if (!mOwner) {
    61         return;
    73         return;
    62     }
    74     }
    63     HbInputFocusObject *focusObject = mOwner->focusObject();
    75     HbInputFocusObject *focusObject = mOwner->focusObject();
    64     if (!focusObject) {
    76     if (!focusObject) {
    92         // we don't want prediction and automatic textcase in spell query dialog
   104         // we don't want prediction and automatic textcase in spell query dialog
    93         spellEdit->setInputMethodHints(spellEdit->inputMethodHints() | Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase);
   105         spellEdit->setInputMethodHints(spellEdit->inputMethodHints() | Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase);
    94         eInt.setLastFocusedState(mSavedState);
   106         eInt.setLastFocusedState(mSavedState);
    95         spellEdit->setFocus();
   107         spellEdit->setFocus();
    96     }
   108     }
       
   109 
       
   110     d->setPriority(focusObject->editorPriority());
       
   111 
    97     // execute the spell dialog
   112     // execute the spell dialog
    98     mSavedFocusObject = focusObject->object();
   113     mSavedFocusObject = focusObject->object();
    99     mSavedEditorText = editorText;
   114     mSavedEditorText = editorText;
   100     mDidHandleFinish = false;
   115     mDidHandleFinish = false;
   101     HbInputMainWindow::instance()->lockFocus();
   116     HbInputMainWindow::instance()->lockFocus();