equal
deleted
inserted
replaced
21 #include <QObject> |
21 #include <QObject> |
22 #include <qmobilityglobal.h> |
22 #include <qmobilityglobal.h> |
23 #include <qtcontacts.h> |
23 #include <qtcontacts.h> |
24 #include <hbicon.h> |
24 #include <hbicon.h> |
25 |
25 |
|
26 class CntUiContactCardExtension; |
|
27 |
26 QTM_USE_NAMESPACE |
28 QTM_USE_NAMESPACE |
27 |
29 |
28 class CntContactCardDataItem: public QObject |
30 class CntContactCardDataItem: public QObject |
29 { |
31 { |
30 Q_OBJECT |
32 Q_OBJECT |
31 |
33 |
32 public: |
34 public: |
33 |
35 |
34 enum CntContactCardPosition |
36 enum CntContactCardPosition |
35 { |
37 { |
|
38 |
|
39 // Communication methods >>>>> |
36 EInternalServices = 0, |
40 EInternalServices = 0, |
37 ECallMobile = 100, |
41 ECallMobile = 100, |
38 ECallMobileSendMessage, |
42 ECallMobileSendMessage, |
39 ECallMobileHome, |
43 ECallMobileHome, |
40 ECallMobileHomeSendMessage, |
44 ECallMobileHomeSendMessage, |
75 ELastAction = 200, |
79 ELastAction = 200, |
76 ELastActionHome, |
80 ELastActionHome, |
77 ELastActionWork, |
81 ELastActionWork, |
78 EExternalServices = 250, |
82 EExternalServices = 250, |
79 ESeparator = 300, |
83 ESeparator = 300, |
|
84 // <<<<< Communication methods end here. |
|
85 |
80 EInternetTelephone, |
86 EInternetTelephone, |
81 EInternetTelephoneHome, |
87 EInternetTelephoneHome, |
82 EInternetTelephoneWork, |
88 EInternetTelephoneWork, |
83 ESip, |
89 ESip, |
84 EAddress, |
90 EAddress, |
107 void setSecondaryIcon(HbIcon aSecondaryIcon); |
113 void setSecondaryIcon(HbIcon aSecondaryIcon); |
108 void setAction(const QString& aAction); |
114 void setAction(const QString& aAction); |
109 void setContactDetail(QContactDetail aDetail); |
115 void setContactDetail(QContactDetail aDetail); |
110 void setActionDescriptor(const QContactActionDescriptor& aActionDescriptor); |
116 void setActionDescriptor(const QContactActionDescriptor& aActionDescriptor); |
111 void setLongPressText(const QString& aLongPressText); |
117 void setLongPressText(const QString& aLongPressText); |
|
118 void setContactCardExtensionAndActionIndex( CntUiContactCardExtension& aExtension, int aIndex ); |
112 |
119 |
113 public: |
120 public: |
114 QString titleText() const { return mTitle; } |
121 QString titleText() const { return mTitle; } |
115 QString valueText() const { return mValueText; } |
122 QString valueText() const { return mValueText; } |
116 HbIcon icon() const { return mIcon; } |
123 HbIcon icon() const { return mIcon; } |
119 QContactDetail detail() const { return mDetail; } |
126 QContactDetail detail() const { return mDetail; } |
120 Qt::TextElideMode elideMode() const { return mValueTextElideMode; } |
127 Qt::TextElideMode elideMode() const { return mValueTextElideMode; } |
121 bool isFocusable() const { return mIsFocusable; } |
128 bool isFocusable() const { return mIsFocusable; } |
122 QContactActionDescriptor actionDescriptor() const { return mActionDescriptor; } |
129 QContactActionDescriptor actionDescriptor() const { return mActionDescriptor; } |
123 QString longPressText() const { return mLongPressText; } |
130 QString longPressText() const { return mLongPressText; } |
|
131 |
|
132 /// Can return NULL which means this item is not from an extension. |
|
133 CntUiContactCardExtension* contactCardExtension() const {return mExtension;} |
|
134 int contactCardExtensionActionIndex() const {return mExtensionActionIndex;} |
|
135 |
124 int position() const { return mPosition; } |
136 int position() const { return mPosition; } |
125 |
137 |
126 private: |
138 private: |
127 HbIcon mIcon; |
139 HbIcon mIcon; |
128 HbIcon mSecondaryIcon; |
140 HbIcon mSecondaryIcon; |
132 QContactActionDescriptor mActionDescriptor; |
144 QContactActionDescriptor mActionDescriptor; |
133 QContactDetail mDetail; |
145 QContactDetail mDetail; |
134 Qt::TextElideMode mValueTextElideMode; |
146 Qt::TextElideMode mValueTextElideMode; |
135 bool mIsFocusable; |
147 bool mIsFocusable; |
136 QString mLongPressText; |
148 QString mLongPressText; |
|
149 CntUiContactCardExtension* mExtension; |
|
150 int mExtensionActionIndex; |
137 |
151 |
138 public: |
152 public: |
139 int mPosition; |
153 int mPosition; |
140 }; |
154 }; |
141 |
155 |