--- a/phonebookui/phonebookservices/src/cntservicecontactcardview.cpp Tue Jul 06 14:05:47 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntservicecontactcardview.cpp Wed Aug 18 09:39:00 2010 +0300
@@ -16,18 +16,21 @@
*/
#include "cntservicecontactcardview.h"
-#include "cntservicehandler.h"
-#include <QCoreApplication>
+#include "cntabstractserviceprovider.h"
+#include "cntdebug.h"
+#include <cntservicescontact.h>
/*!
Constructor, initialize member variables.
\a viewManager is the parent that creates this view. \a parent is a pointer to parent QGraphicsItem (by default this is 0)
*/
-CntServiceContactCardView::CntServiceContactCardView(CntServiceHandler *aServiceHandler) :
+CntServiceContactCardView::CntServiceContactCardView( CntAbstractServiceProvider& aServiceProvider ) :
CntContactCardView(),
- mServiceHandler(aServiceHandler)
+ mProvider( aServiceProvider )
{
- connect(this, SIGNAL(backPressed()), this, SLOT(doShowPreviousView()));
+ CNT_ENTRY
+ connect(this, SIGNAL(backPressed()), this, SLOT(closeContactCard()));
+ CNT_EXIT
}
/*!
@@ -35,17 +38,20 @@
*/
CntServiceContactCardView::~CntServiceContactCardView()
{
-
+ CNT_ENTRY
+ CNT_EXIT
}
/*!
Close the view (quits the service as well)
*/
-void CntServiceContactCardView::doShowPreviousView()
+void CntServiceContactCardView::closeContactCard()
{
- int result = -2;
- connect(mServiceHandler, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
- mServiceHandler->completeEdit(result);
+ CNT_ENTRY
+ QVariant variant;
+ variant.setValue(KCntServicesTerminated);
+ mProvider.CompleteServiceAndCloseApp(variant);
+ CNT_EXIT
}
// end of file