emailuis/nmailuiengine/src/nmmailboxlistmodelitem.cpp
changeset 18 578830873419
child 30 759dc5235cdb
equal deleted inserted replaced
4:e7aa27f58ae1 18:578830873419
       
     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 #include "nmuiengineheaders.h"
       
    19 
       
    20 
       
    21 /*!
       
    22     \class NmMailboxListModelItem
       
    23     \brief The NmMailboxListModelItem class represents data model for mailbox list.
       
    24 */
       
    25 
       
    26 /*!
       
    27     Constructor
       
    28  */
       
    29 NmMailboxListModelItem::NmMailboxListModelItem()
       
    30 :QStandardItem(),
       
    31 mMailbox(NULL)
       
    32 {
       
    33 }
       
    34 
       
    35 /*!
       
    36     Destructor
       
    37  */
       
    38 NmMailboxListModelItem::~NmMailboxListModelItem()
       
    39 {
       
    40     delete mMailbox;
       
    41 }
       
    42 
       
    43 /*!
       
    44     setItemMetaData. Set function for item related meta data object
       
    45  */
       
    46 void NmMailboxListModelItem::setItemMetaData(NmMailboxMetaData *mailbox)
       
    47 {
       
    48     if (mMailbox) {
       
    49         delete mMailbox;
       
    50     }
       
    51     mMailbox = mailbox;
       
    52     emitDataChanged();
       
    53 }
       
    54 
       
    55 /*!
       
    56     getItemMetaData. Get function for item related meta data object
       
    57  */
       
    58 NmMailboxMetaData *NmMailboxListModelItem::itemMetaData()
       
    59 {
       
    60     return mMailbox;
       
    61 }
       
    62 
       
    63 /*!
       
    64 
       
    65  */
       
    66 void NmMailboxListModelItem::callEmitDataChanged()
       
    67 {
       
    68     emitDataChanged();
       
    69 }
       
    70