emailuis/nmailuiengine/inc/nmmessagelistmodelitem.h
changeset 18 578830873419
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 #ifndef NMMESSAGELISTMODELITEM_H_
       
    19 #define NMMESSAGELISTMODELITEM_H_
       
    20 
       
    21 #include <QMetaType>
       
    22 #include <QStandardItem>
       
    23 #include "nmuienginedef.h"
       
    24 #include "nmcommon.h"
       
    25 
       
    26 class NmMessageListModelItemPrivate;
       
    27 class NmMessageEnvelope;
       
    28 
       
    29 
       
    30 class NMUIENGINE_EXPORT NmMessageListModelItem : public QStandardItem
       
    31 {
       
    32 public:
       
    33 
       
    34     enum NmMessageItemType
       
    35     {
       
    36         NmMessageItemMessage = 1,
       
    37         NmMessageItemTitleDivider
       
    38     };
       
    39 
       
    40     NmMessageListModelItem();
       
    41     virtual ~NmMessageListModelItem();
       
    42     void setEnvelope(const NmMessageEnvelope &envelope);
       
    43     void setEnvelope(NmMessageEnvelope *envelope);
       
    44     const NmMessageEnvelope &envelope() const;
       
    45     NmMessageEnvelope *envelopePtr();
       
    46     NmMessageItemType itemType() const;
       
    47     void setItemType(NmMessageItemType type);
       
    48     QString titleDivider() const;
       
    49     void setTitleDivider(const QString &divider);
       
    50     bool expanded() const;
       
    51     void setExpanded(bool expanded);
       
    52     void callEmitDataChanged();
       
    53 
       
    54 private:
       
    55 
       
    56     NmMessageListModelItemPrivate *d;
       
    57 };
       
    58 
       
    59 Q_DECLARE_METATYPE(NmMessageListModelItem*)
       
    60 
       
    61 #endif /* NMMESSAGELISTMODELITEM_H_ */