68
|
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);
|
74
|
42 |
void getFontSizes();
|
|
43 |
QString cleanupDisplayName( const QString &displayName );
|
68
|
44 |
|
|
45 |
private:
|
|
46 |
void createMessageItemLayout();
|
|
47 |
void setContentsToMessageItem(const NmMessageEnvelope &envelope);
|
|
48 |
void setFontsRead();
|
|
49 |
void setFontsUnread();
|
|
50 |
|
|
51 |
private:
|
|
52 |
HbIconItem *mSeparator; // Owned
|
|
53 |
HbTextItem *mSender; // Owned
|
|
54 |
HbTextItem *mSubject; // Owned
|
|
55 |
HbTextItem *mTime; // Owned
|
|
56 |
HbFrameItem *mNewMsgIcon; // Owned
|
|
57 |
HbIconItem *mIcon1; // Owned
|
|
58 |
HbIconItem *mIcon2; // Owned
|
|
59 |
QList <HbIconItem*> mStatusIcons;
|
|
60 |
qreal mPrimarySize;
|
|
61 |
qreal mSecondarySize;
|
|
62 |
|
|
63 |
public:
|
|
64 |
friend class TestNmHsWidgetListViewItem;
|
|
65 |
};
|
|
66 |
|
|
67 |
#endif /* NMHSWIDGETLISTVIEWITEM_H_ */
|