equal
deleted
inserted
replaced
29 class HbMarqueeItem; |
29 class HbMarqueeItem; |
30 class QGestureEvent; |
30 class QGestureEvent; |
31 |
31 |
32 QTM_BEGIN_NAMESPACE |
32 QTM_BEGIN_NAMESPACE |
33 class QContact; |
33 class QContact; |
|
34 class QContactName; |
34 QTM_END_NAMESPACE |
35 QTM_END_NAMESPACE |
35 |
36 |
36 QTM_USE_NAMESPACE |
37 QTM_USE_NAMESPACE |
37 |
38 |
38 class CntContactCardHeadingItem : public HbWidget |
39 class CntContactCardHeadingItem : public HbWidget |
39 { |
40 { |
|
41 friend class TestCntContactCardHeadingItem; |
|
42 |
40 Q_OBJECT |
43 Q_OBJECT |
|
44 |
41 Q_PROPERTY( QString first_line_text READ getFirstLineText ) |
45 Q_PROPERTY( QString first_line_text READ getFirstLineText ) |
42 Q_PROPERTY( QString primary_text READ getPrimaryText ) |
46 Q_PROPERTY( QString primary_text READ getPrimaryText ) |
43 Q_PROPERTY( QString second_line_text READ getSecondLineText ) |
47 Q_PROPERTY( QString second_line_text READ getSecondLineText ) |
44 Q_PROPERTY( QString secondary_text READ getSecondaryText ) |
48 Q_PROPERTY( QString secondary_text READ getSecondaryText ) |
45 Q_PROPERTY( QString marquee_item READ getTinyMarqueeText ) |
49 Q_PROPERTY( QString marquee_item READ getTinyMarqueeText ) |
55 void recreatePrimitives(); |
59 void recreatePrimitives(); |
56 void updatePrimitives(); |
60 void updatePrimitives(); |
57 void setDetails(const QContact* contact); |
61 void setDetails(const QContact* contact); |
58 void setIcon(const HbIcon newIcon); |
62 void setIcon(const HbIcon newIcon); |
59 void setGroupDetails(const QContact* contact); |
63 void setGroupDetails(const QContact* contact); |
60 void setSecondaryIcon(bool favoriteContact); |
64 void setFavoriteStatus(bool favoriteContact); |
61 |
65 |
62 signals: |
66 signals: |
63 void clicked(); |
67 void clicked(); |
64 void passLongPressed(const QPointF &point); |
68 void passLongPressed(const QPointF &point); |
65 void passShortPressed(const QPointF &point); |
69 void passShortPressed(const QPointF &point); |
66 |
70 |
67 public slots: |
71 public slots: |
68 void processLongPress(const QPointF &point); |
72 void processLongPress(const QPointF &point); |
69 void processShortPress(const QPointF &point); |
73 void processShortPress(const QPointF &point); |
|
74 void setOnlineStatus(bool online); |
70 |
75 |
71 protected: |
76 protected: |
72 void gestureEvent(QGestureEvent* event); |
77 void gestureEvent(QGestureEvent* event); |
73 QVariant itemChange(GraphicsItemChange change, const QVariant &value); |
78 QVariant itemChange(GraphicsItemChange change, const QVariant &value); |
74 |
79 |
76 void orientationChanged(Qt::Orientation); |
81 void orientationChanged(Qt::Orientation); |
77 |
82 |
78 private: |
83 private: |
79 void initGesture(); |
84 void initGesture(); |
80 |
85 |
81 #ifdef PBK_UNIT_TEST |
86 void setSecondaryIcon(); |
82 public: |
87 |
83 #else |
|
84 private: |
|
85 #endif |
|
86 bool isNickName(const QContact* contact); |
88 bool isNickName(const QContact* contact); |
87 bool isCompanyName(const QContact* contact); |
89 bool isCompanyName(const QContact* contact); |
88 |
90 |
89 QString getFirstLineText() const { return firstLineText; } |
91 QString getFirstLineText() const { return firstLineText; } |
90 QString getPrimaryText() const { return primaryText; } |
92 QString getPrimaryText() const { return primaryText; } |
92 QString getSecondaryText() const { return secondaryText; } |
94 QString getSecondaryText() const { return secondaryText; } |
93 QString getTinyMarqueeText() const { return tinyMarqueeText; } |
95 QString getTinyMarqueeText() const { return tinyMarqueeText; } |
94 |
96 |
95 HbIcon getIcon() const { return icon; } |
97 HbIcon getIcon() const { return icon; } |
96 HbIcon getSecondaryIcon() const { return secondaryIcon; } |
98 HbIcon getSecondaryIcon() const { return secondaryIcon; } |
|
99 QString createNameText(const QContactName name); |
97 |
100 |
98 #ifdef PBK_UNIT_TEST |
|
99 public: |
|
100 #else |
|
101 private: |
101 private: |
102 #endif |
|
103 HbIconItem *mIcon; |
102 HbIconItem *mIcon; |
104 HbIconItem *mSecondaryIcon; |
103 HbIconItem *mSecondaryIcon; |
105 HbTextItem *mFirstLineText; |
104 HbTextItem *mFirstLineText; |
106 HbTextItem *mPrimaryText; |
105 HbTextItem *mPrimaryText; |
107 HbTextItem *mSecondLineText; |
106 HbTextItem *mSecondLineText; |
115 QString secondLineText; |
114 QString secondLineText; |
116 QString secondaryText; |
115 QString secondaryText; |
117 QString tinyMarqueeText; |
116 QString tinyMarqueeText; |
118 HbIcon icon; |
117 HbIcon icon; |
119 HbIcon secondaryIcon; |
118 HbIcon secondaryIcon; |
|
119 |
|
120 bool mIsFavorite; |
|
121 bool mIsOnline; |
120 }; |
122 }; |
121 |
123 |
122 #endif // CNTHEADINGWIDGET_H |
124 #endif // CNTHEADINGWIDGET_H |