messagingapp/msgsettings/settingsview/src/msgsmscenterview.cpp
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
equal deleted inserted replaced
23:238255e8b033 25:84d9eb65b26f
    12  * Contributors:
    12  * Contributors:
    13  *
    13  *
    14  * Description:This class is for sms message center view 
    14  * Description:This class is for sms message center view 
    15  *
    15  *
    16  */
    16  */
       
    17 #include <hbaction.h>
    17 
    18 
    18 #include "msgsmscenterview.h"
    19 #include "msgsmscenterview.h"
    19 #include "msgsmscentersettingsform.h"
    20 #include "msgsmscentersettingsform.h"
    20 
       
    21 #include <cpbasesettingview.h>
       
    22 #include "debugtraces.h"
    21 #include "debugtraces.h"
    23 
    22 
    24 MsgSMSCenterView::MsgSMSCenterView(int view, QGraphicsItem *parent) :
    23 MsgSMSCenterView::MsgSMSCenterView(int view, QGraphicsItem *parent) :
    25 MsgBaseView(parent)
    24     MsgBaseView(parent)
    26 {
    25 {
    27     mSMSCenterSettingsForm = new MsgSMSCenterSettingsForm(view);
    26     mSMSCenterSettingsForm = new MsgSMSCenterSettingsForm(view);
    28 
    27 
    29     setWidget(mSMSCenterSettingsForm);
    28     setWidget(mSMSCenterSettingsForm);
       
    29 
       
    30     HbAction* backAction = new HbAction(Hb::BackAction, this);
       
    31     setNavigationAction(backAction);
       
    32 
       
    33     connect(mSMSCenterSettingsForm,
       
    34             SIGNAL(deleteMessageCentreAndClose()),
       
    35             this,
       
    36             SLOT(onCloseMessageCenterView()));
       
    37     
       
    38     connect(backAction, SIGNAL(triggered()), this, SLOT(onBackAction()));
    30 }
    39 }
    31 
    40 
    32 MsgSMSCenterView::~MsgSMSCenterView()
    41 MsgSMSCenterView::~MsgSMSCenterView()
    33 {
    42 {
       
    43     setParent(NULL);
    34 }
    44 }
    35 
    45 
    36 void MsgSMSCenterView::commitChanges()
    46 void MsgSMSCenterView::onBackAction()
    37 {
    47 {
    38 	QDEBUG_WRITE("MsgSMSCenterView::commitChanges");
    48     QDEBUG_WRITE("MsgSMSCenterView::onBackAction");
       
    49 
       
    50     //commit the change
    39     mSMSCenterSettingsForm->commitChanges();
    51     mSMSCenterSettingsForm->commitChanges();
       
    52     setNavigationAction(NULL);
       
    53     emit smsCenterEditViewClosed();
    40 }
    54 }
       
    55 
       
    56 void MsgSMSCenterView::onCloseMessageCenterView()
       
    57 {
       
    58     QDEBUG_WRITE("MsgSMSCenterView::onCloseMessageCenterView");
       
    59 
       
    60     setNavigationAction(NULL);
       
    61     emit smsCenterEditViewClosed();
       
    62 }
       
    63 
       
    64 //eof