14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include "cntservicecontactcardview.h" |
18 #include "cntservicecontactcardview.h" |
19 #include "cntservicehandler.h" |
19 #include "cntabstractserviceprovider.h" |
20 #include <QCoreApplication> |
20 #include "cntdebug.h" |
|
21 #include <cntservicescontact.h> |
21 |
22 |
22 /*! |
23 /*! |
23 Constructor, initialize member variables. |
24 Constructor, initialize member variables. |
24 \a viewManager is the parent that creates this view. \a parent is a pointer to parent QGraphicsItem (by default this is 0) |
25 \a viewManager is the parent that creates this view. \a parent is a pointer to parent QGraphicsItem (by default this is 0) |
25 */ |
26 */ |
26 CntServiceContactCardView::CntServiceContactCardView(CntServiceHandler *aServiceHandler) : |
27 CntServiceContactCardView::CntServiceContactCardView( CntAbstractServiceProvider& aServiceProvider ) : |
27 CntContactCardView(), |
28 CntContactCardView(), |
28 mServiceHandler(aServiceHandler) |
29 mProvider( aServiceProvider ) |
29 { |
30 { |
30 connect(this, SIGNAL(backPressed()), this, SLOT(doShowPreviousView())); |
31 CNT_ENTRY |
|
32 connect(this, SIGNAL(backPressed()), this, SLOT(closeContactCard())); |
|
33 CNT_EXIT |
31 } |
34 } |
32 |
35 |
33 /*! |
36 /*! |
34 Destructor |
37 Destructor |
35 */ |
38 */ |
36 CntServiceContactCardView::~CntServiceContactCardView() |
39 CntServiceContactCardView::~CntServiceContactCardView() |
37 { |
40 { |
38 |
41 CNT_ENTRY |
|
42 CNT_EXIT |
39 } |
43 } |
40 |
44 |
41 /*! |
45 /*! |
42 Close the view (quits the service as well) |
46 Close the view (quits the service as well) |
43 */ |
47 */ |
44 void CntServiceContactCardView::doShowPreviousView() |
48 void CntServiceContactCardView::closeContactCard() |
45 { |
49 { |
46 int result = -2; |
50 CNT_ENTRY |
47 connect(mServiceHandler, SIGNAL(returnValueDelivered()), qApp, SLOT(quit())); |
51 QVariant variant; |
48 mServiceHandler->completeEdit(result); |
52 variant.setValue(KCntServicesTerminated); |
|
53 mProvider.CompleteServiceAndCloseApp(variant); |
|
54 CNT_EXIT |
49 } |
55 } |
50 |
56 |
51 // end of file |
57 // end of file |