|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "cntservicecontactcardview.h" |
|
19 |
|
20 #include "cntservicehandler.h" |
|
21 |
|
22 /*! |
|
23 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 */ |
|
26 CntServiceContactCardView::CntServiceContactCardView(CntServiceHandler *aServiceHandler, CntViewManager *viewManager, QGraphicsItem *parent) : |
|
27 CntContactCardView(viewManager, parent), |
|
28 mServiceHandler(aServiceHandler) |
|
29 { |
|
30 |
|
31 } |
|
32 |
|
33 /*! |
|
34 Destructor |
|
35 */ |
|
36 CntServiceContactCardView::~CntServiceContactCardView() |
|
37 { |
|
38 |
|
39 } |
|
40 |
|
41 /*! |
|
42 Launch contact editor |
|
43 */ |
|
44 void CntServiceContactCardView::editContact() |
|
45 { |
|
46 CntViewParameters viewParameters(CntViewParameters::serviceSubEditView); |
|
47 viewParameters.setSelectedContact(*mContact); |
|
48 viewManager()->onActivateView(viewParameters); |
|
49 } |
|
50 |
|
51 /*! |
|
52 Close the view (quits the service as well) |
|
53 */ |
|
54 void CntServiceContactCardView::aboutToCloseView() |
|
55 { |
|
56 int result = -2; |
|
57 connect(mServiceHandler, SIGNAL(returnValueDelivered()), qApp, SLOT(quit())); |
|
58 mServiceHandler->completeEdit(result); |
|
59 } |
|
60 |
|
61 // end of file |