phonebookui/phonebookservices/src/cntservicesubeditview.cpp
changeset 27 de1630741fbe
parent 25 76a2435edfd4
--- a/phonebookui/phonebookservices/src/cntservicesubeditview.cpp	Fri Apr 16 14:53:18 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntservicesubeditview.cpp	Mon May 03 12:24:20 2010 +0300
@@ -1,4 +1,4 @@
-/*
+    /*
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
@@ -16,12 +16,10 @@
 */
 
 #include "cntservicesubeditview.h"
-
 #include "cntservicehandler.h"
 
-CntServiceSubEditView::CntServiceSubEditView(CntServiceHandler *aServiceHandler, CntViewManager *aViewManager, QGraphicsItem *aParent) : 
-    CntEditView(aViewManager, aParent),
-    mServiceHandler(aServiceHandler)
+CntServiceSubEditView::CntServiceSubEditView(CntServiceHandler *aServiceHandler) : CntEditView(),
+mServiceHandler(aServiceHandler)
 {   
 
 }
@@ -30,48 +28,53 @@
 {
 
 }
-
-/*!
-Saves the contact
-*/
-void CntServiceSubEditView::aboutToCloseView()
-{
-    // save contact if there is one
-    if (contact())
-    {
-        contactManager()->saveContact(contact());
-    }
     
-    CntViewParameters viewParameters;//(CntViewParameters::serviceContactCardView);
-    viewParameters.setSelectedContact(*contact());   
-    viewManager()->back(viewParameters);
-}
-
-/*!
-Cancel all changes made and return to comm launcher view
-*/
-void CntServiceSubEditView::discardAllChanges()
-{
-    QContact oldContact = contactManager()->contact(contact()->localId());
-    CntViewParameters viewParameters;//(CntViewParameters::serviceContactCardView);
-    viewParameters.setSelectedContact(oldContact);   
-    viewManager()->back(viewParameters);
-}
-
-/*
-Handle signals emitted from CntCommands, only used for delete command for now.
-*/
-int CntServiceSubEditView::handleExecutedCommand(QString aCommand, const QContact &aContact)
-{
-    Q_UNUSED(aContact);
-    int result = -1;
-    if (aCommand == "delete")
-    {
-        connect(mServiceHandler, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
-        mServiceHandler->completeEdit(result);
-        result = 0;
-    }
-    return result;
-}
+///*!
+//Saves the contact
+//*/
+//void CntServiceSubEditView::aboutToCloseView()
+//{
+//    // save contact if there is one
+//    if (contact())
+//    {
+//        contactManager()->saveContact(contact());
+//    }
+//    
+//    CntViewParameters viewParameters;
+//    QVariant var;
+//    var.setValue(*contact());
+//    viewParameters.insert(ESelectedContact, var);
+//    viewManager()->back(viewParameters);
+//}
+//
+///*!
+//Cancel all changes made and return to comm launcher view
+//*/
+//void CntServiceSubEditView::discardAllChanges()
+//{
+//    QContact oldContact = contactManager()->contact(contact()->localId());
+//    
+//    CntViewParameters viewParameters;
+//    QVariant var;
+//    var.setValue(oldContact);
+//    viewParameters.insert(ESelectedContact, var);
+//    viewManager()->back(viewParameters);
+//}
+//
+///*
+//Handle signals emitted from CntCommands, only used for delete command for now.
+//*/
+//int CntServiceSubEditView::handleExecutedCommand(QString aCommand, const QContact &aContact)
+//{
+//    Q_UNUSED(aContact);
+//    int result = -1;
+//    if (aCommand == "delete")
+//    {
+//        connect(mServiceHandler, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
+//        mServiceHandler->completeEdit(result);
+//        result = 0;
+//    }
+//    return result;
+//}
 
 // EOF