|
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 #ifndef NMHSWIDGETLISTVIEWITEM_H_ |
|
19 #define NMHSWIDGETLISTVIEWITEM_H_ |
|
20 |
|
21 #include <hblistviewitem.h> |
|
22 |
|
23 class HbTextItem; |
|
24 class HbIconItem; |
|
25 class HbFrameItem; |
|
26 class NmMessageEnvelope; |
|
27 |
|
28 |
|
29 class NmHsWidgetListViewItem : public HbListViewItem |
|
30 { |
|
31 Q_OBJECT |
|
32 public: |
|
33 NmHsWidgetListViewItem(QGraphicsItem * parent); |
|
34 virtual ~NmHsWidgetListViewItem(); |
|
35 virtual bool canSetModelIndex(const QModelIndex &index) const; |
|
36 public: // from HbListViewItem |
|
37 virtual HbAbstractViewItem *createItem(); |
|
38 virtual void updateChildItems(); |
|
39 |
|
40 protected: |
|
41 void setFonts(const QColor &colorRole, HbFontSpec &fontSpec); |
|
42 void getFontSizes(); |
|
43 |
|
44 private: |
|
45 void createMessageItemLayout(); |
|
46 void setContentsToMessageItem(const NmMessageEnvelope &envelope); |
|
47 void setFontsRead(); |
|
48 void setFontsUnread(); |
|
49 |
|
50 private: |
|
51 HbIconItem *mSeparator; // Owned |
|
52 HbTextItem *mSender; // Owned |
|
53 HbTextItem *mSubject; // Owned |
|
54 HbTextItem *mTime; // Owned |
|
55 HbFrameItem *mNewMsgIcon; // Owned |
|
56 HbIconItem *mIcon1; // Owned |
|
57 HbIconItem *mIcon2; // Owned |
|
58 QList <HbIconItem*> mStatusIcons; |
|
59 qreal mPrimarySize; |
|
60 qreal mSecondarySize; |
|
61 |
|
62 public: |
|
63 friend class TestNmHsWidgetListViewItem; |
|
64 }; |
|
65 |
|
66 #endif /* NMHSWIDGETLISTVIEWITEM_H_ */ |