17 |
17 |
18 #ifndef CNTHISTORYVIEWITEM_H |
18 #ifndef CNTHISTORYVIEWITEM_H |
19 #define CNTHISTORYVIEWITEM_H |
19 #define CNTHISTORYVIEWITEM_H |
20 |
20 |
21 // INCLUDES |
21 // INCLUDES |
22 #include "cnthistoryviewitemwidget.h" |
22 #include <hblistviewitem.h> |
23 #include <hbtextitem.h> |
23 |
24 #include <hbiconitem.h> |
24 class HbFrameItem; |
25 #include <hbabstractviewitem.h> |
|
26 #include <QGraphicsLinearLayout> |
|
27 |
25 |
28 /** |
26 /** |
29 * This class represents the item decorator of |
27 * This class represents the item decorator of |
30 * the comm history view. |
28 * the comm history view. |
31 */ |
29 */ |
32 class CntHistoryViewItem : public HbAbstractViewItem |
30 class CntHistoryViewItem : public HbListViewItem |
33 { |
31 { |
|
32 Q_OBJECT |
|
33 Q_PROPERTY( bool incoming READ getIncoming ) |
|
34 Q_PROPERTY( bool newmessage READ isNewMessage ) |
|
35 |
34 public: |
36 public: |
35 /* |
37 /* |
36 * Constructor |
38 * Constructor |
37 * @param parent, reference of QGraphicsItem |
39 * @param parent, reference of QGraphicsItem |
38 * default set to 0 |
40 * default set to 0 |
39 */ |
41 */ |
40 CntHistoryViewItem(QGraphicsItem* parent=0); |
42 CntHistoryViewItem(QGraphicsItem* parent=0); |
41 |
43 |
42 /* |
44 /* |
43 * Factory method to the items |
45 * Factory method to the items |
44 */ |
46 */ |
45 HbAbstractViewItem* createItem(); |
47 HbAbstractViewItem* createItem(); |
46 |
48 |
47 /* |
|
48 * Overriden method to postprocess custom item |
|
49 */ |
|
50 void polish(HbStyleParameters& params); |
|
51 |
|
52 /* |
49 /* |
53 * Overriden method to draw the custom item in the list view |
50 * Overriden method to draw the custom item in the list view |
54 */ |
51 */ |
55 void updateChildItems(); |
52 void updateChildItems(); |
56 |
53 |
|
54 bool getIncoming() const { return mIncoming; } |
|
55 bool isNewMessage() const { return mNewMessage; } |
|
56 |
57 private: |
57 private: |
58 |
58 bool mIncoming; |
59 /* |
59 bool mNewMessage; |
60 * Custom widget containing text fields and icon |
60 |
61 * Not owned |
61 HbFrameItem* mNewItem; |
62 */ |
62 }; |
63 CntHistoryViewItemWidget* itemWidget; |
|
64 }; |
|
65 |
63 |
66 #endif // CNTHISTORYVIEWITEM_H |
64 #endif // CNTHISTORYVIEWITEM_H |