emailuis/nmailui/src/nmeditorcontent.cpp
changeset 23 2dc6caa42ec3
parent 20 ecc8def7944a
child 30 759dc5235cdb
equal deleted inserted replaced
20:ecc8def7944a 23:2dc6caa42ec3
    49     // Set body editor to use NmEditorTextDocument
    49     // Set body editor to use NmEditorTextDocument
    50     NmEditorTextDocument *textDocument = new NmEditorTextDocument(manager);
    50     NmEditorTextDocument *textDocument = new NmEditorTextDocument(manager);
    51     mEditorWidget->setDocument(textDocument); 
    51     mEditorWidget->setDocument(textDocument); 
    52     textDocument->setParent(mEditorWidget); // ownership changes
    52     textDocument->setParent(mEditorWidget); // ownership changes
    53 
    53 
    54     mEditorWidget->init(this, mBackgroundScrollArea);
    54     mEditorWidget->init(mBackgroundScrollArea);
    55     
    55     // we are interested in the editor widget's height changes
    56     // Remove the comment to enable style picker menu item.
    56     connect(mEditorWidget, SIGNAL(editorContentHeightChanged()), this,
       
    57         SLOT(setEditorContentHeight()));
       
    58 
       
    59     // Enable style picker menu item.
    57     mEditorWidget->setFormatDialog(new HbFormatDialog());
    60     mEditorWidget->setFormatDialog(new HbFormatDialog());
    58 
    61 
    59     // Create signal slot connections
    62     // Create signal slot connections
    60     createConnections();
    63     createConnections();
    61 }
    64 }
   110     }
   113     }
   111     
   114     
   112     // Original message text to editor content fiel
   115     // Original message text to editor content fiel
   113     if (replyMsgEnvelope && mEditorWidget) {          
   116     if (replyMsgEnvelope && mEditorWidget) {          
   114         QTextCursor cursor = mEditorWidget->textCursor();
   117         QTextCursor cursor = mEditorWidget->textCursor();
   115         cursor.setPosition(1);
   118         cursor.setPosition(0);
   116         cursor.insertHtml(NmUtilities::createReplyHeader(*replyMsgEnvelope));
   119         cursor.insertHtml(NmUtilities::createReplyHeader(*replyMsgEnvelope));
   117     }
   120     }
   118 }  
   121 }  
   119 
   122 
   120 /*!
   123 /*!