messagingapp/msgui/msgapp/src/msgviewmanager.cpp
changeset 51 3507212d340e
parent 48 4f501b74aeb1
child 56 f42d9a78f435
equal deleted inserted replaced
49:2a272ef608c4 51:3507212d340e
   189                 }
   189                 }
   190             else if(mPreviousView == MsgBaseView::UNIVIEWER){
   190             else if(mPreviousView == MsgBaseView::UNIVIEWER){
   191                 qint32 contactId = mViewerData.at(0).toLongLong();
   191                 qint32 contactId = mViewerData.at(0).toLongLong();
   192                 qint32 messageId = mViewerData.at(1).toInt();
   192                 qint32 messageId = mViewerData.at(1).toInt();
   193                 int msgCount = mViewerData.at(2).toInt();
   193                 int msgCount = mViewerData.at(2).toInt();
   194                 int canForwardMessage = mViewerData.at(3).toInt();
       
   195                 
   194                 
   196                 param << contactId;
   195                 param << contactId;
   197                 param << messageId;
   196                 param << messageId;
   198                 param << msgCount;
   197                 param << msgCount;
   199                 param << canForwardMessage;
       
   200             }
   198             }
   201             else if(mPreviousView == MsgBaseView::UNIEDITOR){
   199             else if(mPreviousView == MsgBaseView::UNIEDITOR){
   202                 //TODO: Remove error handling once Audio fetcher 
   200                 //TODO: Remove error handling once Audio fetcher 
   203                 //becomes dialog
   201                 //becomes dialog
   204                 param[0] = MsgBaseView::CLV;
   202                 param[0] = MsgBaseView::CLV;
   525         //wait for the back from viewer/editor
   523         //wait for the back from viewer/editor
   526         //and reset the open CV id
   524         //and reset the open CV id
   527         mConversationId = -1;
   525         mConversationId = -1;
   528         return;
   526         return;
   529     }
   527     }
   530     
   528 
   531     //delete UniEditor
   529     //delete UniEditor
   532     if (mUniEditor)
   530     if (mUniEditor)
   533     {
   531     {
   534         appendViewToBeDeleted(mUniEditor);
   532         appendViewToBeDeleted(mUniEditor);
   535         mUniEditor = NULL;
   533         mUniEditor = NULL;
   789     //switch to univiewer.
   787     //switch to univiewer.
   790     if (data.length() > 2) {
   788     if (data.length() > 2) {
   791         qint32 contactId = data.at(2).toLongLong();
   789         qint32 contactId = data.at(2).toLongLong();
   792         qint32 messageId = data.at(3).toInt();
   790         qint32 messageId = data.at(3).toInt();
   793         int msgCount = data.at(4).toInt();
   791         int msgCount = data.at(4).toInt();
   794         int canForwardMessage = data.at(5).toInt();
       
   795 
   792 
   796         //Save the viewer data to be used when u come back from Editor
   793         //Save the viewer data to be used when u come back from Editor
   797         mViewerData << contactId;
   794         mViewerData << contactId;
   798         mViewerData << messageId;
   795         mViewerData << messageId;
   799         mViewerData << msgCount;
   796         mViewerData << msgCount;
   800         mViewerData << canForwardMessage;
       
   801         
   797         
   802         if (!mUniViewer) {
   798         if (!mUniViewer) {
   803             mUniViewer = new UnifiedViewer(messageId, canForwardMessage);
   799             mUniViewer = new UnifiedViewer(messageId);
   804             mUniViewer->setNavigationAction(mBackAction);
   800             mUniViewer->setNavigationAction(mBackAction);
   805             mMainWindow->addView(mUniViewer);
   801             mMainWindow->addView(mUniViewer);
   806             connect(mUniViewer, SIGNAL(switchView(const QVariantList&)), this,
   802             connect(mUniViewer, SIGNAL(switchView(const QVariantList&)), this,
   807                 SLOT(switchView(const QVariantList&)));
   803                 SLOT(switchView(const QVariantList&)));
   808         }
   804         }