messagingapp/msgui/conversationview/src/msgconversationbaseview.cpp
changeset 52 12db4185673b
parent 44 36f374c67aa8
child 70 a15d9966050f
equal deleted inserted replaced
44:36f374c67aa8 52:12db4185673b
    18 #include "msgconversationbaseview.h"
    18 #include "msgconversationbaseview.h"
    19 
    19 
    20 // SYSTEM INCLUDES
    20 // SYSTEM INCLUDES
    21 #include <QGraphicsLinearLayout>
    21 #include <QGraphicsLinearLayout>
    22 #include <HbMainWindow>
    22 #include <HbMainWindow>
    23 #include <HbNotificationDialog>
    23 #include <HbDeviceNotificationDialog>
    24 
    24 
    25 #include <xqaiwrequest.h>
    25 #include <xqaiwrequest.h>
    26 #include <xqappmgr.h>
    26 #include <xqappmgr.h>
    27 
    27 
    28 #include <cntservicescontact.h>
    28 #include <cntservicescontact.h>
   121 
   121 
   122     connect(mConversationView, SIGNAL(switchView(const QVariantList&)), this,
   122     connect(mConversationView, SIGNAL(switchView(const QVariantList&)), this,
   123         SIGNAL(switchView(const QVariantList&)));
   123         SIGNAL(switchView(const QVariantList&)));
   124 
   124 
   125     connect(mConversationView, SIGNAL(vkbOpened(bool)), this, SLOT(hideChrome(bool)));
   125     connect(mConversationView, SIGNAL(vkbOpened(bool)), this, SLOT(hideChrome(bool)));
   126     connect(mConversationView, SIGNAL(vkbOpened(bool)), mContactCard, SLOT(ignoreSignals(bool)));
       
   127 
   126 
   128     this->setMenu(mConversationView->menu());
   127     this->setMenu(mConversationView->menu());
   129 
   128 
   130     mMainLayout->addItem(mConversationView);
   129     mMainLayout->addItem(mConversationView);
   131 
   130 
   160 // saves the editors content to drafts
   159 // saves the editors content to drafts
   161 //---------------------------------------------------------------
   160 //---------------------------------------------------------------
   162 int MsgConversationBaseView::saveContentToDrafts()
   161 int MsgConversationBaseView::saveContentToDrafts()
   163 {
   162 {
   164     int msgId = INVALID_MSGID;
   163     int msgId = INVALID_MSGID;
   165     bool result = false;
       
   166     if (mConversationId >= 0) {
   164     if (mConversationId >= 0) {
   167     msgId = mConversationView->saveContentToDrafts();
   165     msgId = mConversationView->saveContentToDrafts();
   168     }
   166     }
   169 
   167 
   170     if (msgId != INVALID_MSGID) {
   168     if (msgId != INVALID_MSGID) {
   171         HbNotificationDialog::launchDialog(LOC_SAVED_TO_DRAFTS);
   169         HbDeviceNotificationDialog::notification("", LOC_SAVED_TO_DRAFTS);
   172     }
   170     }
   173     return msgId;
   171     return msgId;
   174 }
   172 }
   175 
   173 
   176 //--------------------------------------------------------------- 
   174 //--------------------------------------------------------------- 
   266         if (!mContactCard->isVisible()) {
   264         if (!mContactCard->isVisible()) {
   267             mMainLayout->insertItem(0, mContactCard);
   265             mMainLayout->insertItem(0, mContactCard);
   268             mContactCard->show();
   266             mContactCard->show();
   269         }
   267         }
   270     }
   268     }
       
   269     
       
   270     //forcing relayouting
       
   271     mMainLayout->activate();
   271 }
   272 }
   272 
   273 
   273 //---------------------------------------------------------------
   274 //---------------------------------------------------------------
   274 // MsgConversationBaseView::setPSCVId
   275 // MsgConversationBaseView::setPSCVId
   275 //
   276 //