|
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 "cntcontactcarddataitem.h" |
|
19 |
|
20 CntContactCardDataItem::CntContactCardDataItem(const QString& aTitle, int aPosition, bool aIsFocusable) : |
|
21 mIcon(HbIcon()), |
|
22 mSecondaryIcon(HbIcon()), |
|
23 mTitle(aTitle), |
|
24 mValueText(QString("")), |
|
25 mAction(QString("")), |
|
26 mActionDescriptor(QContactActionDescriptor()), |
|
27 mValueTextElideMode(Qt::ElideRight), |
|
28 mIsFocusable(aIsFocusable), |
|
29 mExtension(NULL), |
|
30 mExtensionActionIndex(0), |
|
31 mPosition(aPosition) |
|
32 { |
|
33 |
|
34 } |
|
35 |
|
36 CntContactCardDataItem::~CntContactCardDataItem() |
|
37 { |
|
38 |
|
39 } |
|
40 |
|
41 void CntContactCardDataItem::setTitleText(const QString& aTitle) |
|
42 { |
|
43 mTitle = aTitle; |
|
44 } |
|
45 |
|
46 void CntContactCardDataItem::setValueText( |
|
47 const QString& aValueText, |
|
48 Qt::TextElideMode aValueTextElideMode) |
|
49 { |
|
50 mValueText = aValueText; |
|
51 mValueTextElideMode = aValueTextElideMode; |
|
52 } |
|
53 |
|
54 void CntContactCardDataItem::setIcon(HbIcon aIcon) |
|
55 { |
|
56 mIcon = aIcon; |
|
57 } |
|
58 |
|
59 void CntContactCardDataItem::setSecondaryIcon(HbIcon aSecondaryIcon) |
|
60 { |
|
61 mSecondaryIcon = aSecondaryIcon; |
|
62 } |
|
63 |
|
64 void CntContactCardDataItem::setAction(const QString& aAction) |
|
65 { |
|
66 mAction = aAction; |
|
67 } |
|
68 |
|
69 void CntContactCardDataItem::setContactDetail(QContactDetail aDetail) |
|
70 { |
|
71 mDetail = aDetail; |
|
72 } |
|
73 |
|
74 void CntContactCardDataItem::setActionDescriptor(const QContactActionDescriptor& aActionDescriptor) |
|
75 { |
|
76 mActionDescriptor = aActionDescriptor; |
|
77 } |
|
78 |
|
79 void CntContactCardDataItem::setLongPressText(const QString& aLongPressText) |
|
80 { |
|
81 mLongPressText = aLongPressText; |
|
82 } |
|
83 |
|
84 void CntContactCardDataItem::setContactCardExtensionAndActionIndex( CntUiContactCardExtension& aExtension, int aIndex ) |
|
85 { |
|
86 mExtension = &aExtension; |
|
87 mExtensionActionIndex = aIndex; |
|
88 } |
|
89 |