equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2010 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 #include <nmmessageenvelope.h> |
|
19 #include "nmhswidgetlistmodelitem.h" |
|
20 |
|
21 /*! |
|
22 \class NmHsWidgetListModelItem |
|
23 \brief The NmHsWidgetListModelItem class represents data model for mailbox list. |
|
24 */ |
|
25 |
|
26 /*! |
|
27 Constructor |
|
28 */ |
|
29 NmHsWidgetListModelItem::NmHsWidgetListModelItem() : |
|
30 QStandardItem(), |
|
31 mMessageEnvelope(NULL) |
|
32 { |
|
33 NM_FUNCTION; |
|
34 } |
|
35 |
|
36 /*! |
|
37 Destructor |
|
38 */ |
|
39 NmHsWidgetListModelItem::~NmHsWidgetListModelItem() |
|
40 { |
|
41 NM_FUNCTION; |
|
42 |
|
43 delete mMessageEnvelope; |
|
44 } |
|
45 |
|
46 /*! |
|
47 setItemMetaData. Set function for item related meta data object |
|
48 */ |
|
49 void NmHsWidgetListModelItem::setItemMetaData(NmMessageEnvelope *metaData) |
|
50 { |
|
51 NM_FUNCTION; |
|
52 |
|
53 if (mMessageEnvelope) { |
|
54 delete mMessageEnvelope; |
|
55 } |
|
56 mMessageEnvelope = metaData; |
|
57 emitDataChanged(); |
|
58 } |
|
59 |
|
60 /*! |
|
61 itemMetaData. Get function for item related meta data object |
|
62 */ |
|
63 NmMessageEnvelope *NmHsWidgetListModelItem::itemMetaData() |
|
64 { |
|
65 NM_FUNCTION; |
|
66 |
|
67 return mMessageEnvelope; |
|
68 } |
|
69 |