emailuis/nmailui/inc/nmmessagelistviewitem.h
changeset 57 ae34e1715e21
parent 56 15bc1d5d6267
child 66 084b5b1f02a7
equal deleted inserted replaced
56:15bc1d5d6267 57:ae34e1715e21
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3  * All rights reserved.
     4 * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8  *
     9 * Initial Contributors:
     9  * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    11 *
    11  *
    12 * Contributors:
    12  * Contributors:
    13 *
    13  *
    14 * Description:
    14  * Description:
    15 *
    15  *
    16 */
    16  */
    17 
    17 
    18 #ifndef NMMESSAGELISTVIEWITEM_H_
    18 #ifndef NMMESSAGELISTVIEWITEM_H_
    19 #define NMMESSAGELISTVIEWITEM_H_
    19 #define NMMESSAGELISTVIEWITEM_H_
    20 
    20 
    21 #include <hbtreeviewitem.h>
    21 #include <hbtreeviewitem.h>
    30 class QColor;
    30 class QColor;
    31 
    31 
    32 class NmMessageListViewItem : public HbTreeViewItem
    32 class NmMessageListViewItem : public HbTreeViewItem
    33 {
    33 {
    34     Q_OBJECT
    34     Q_OBJECT
    35 
    35     
    36 public:
    36 public:
    37     explicit NmMessageListViewItem(QGraphicsItem *parent = 0);
    37     explicit NmMessageListViewItem(QGraphicsItem *parent = 0);
    38     virtual ~NmMessageListViewItem();
    38     virtual ~NmMessageListViewItem();
    39     void updateChildItems();
    39     void updateChildItems();
    40     HbTreeViewItem *createItem();
    40     HbTreeViewItem *createItem();
    41     bool canSetModelIndex(const QModelIndex &index) const;
    41     bool canSetModelIndex(const QModelIndex &index) const;
    42     QRectF contiguousSelectionArea() const { return QRectF(); };
    42     QRectF contiguousSelectionArea() const { return QRectF(); };
    43 
    43     
    44 private:
    44 private:
    45     void createMessageItemLayout();
    45     void createMessageItemLayout();
    46     void setContentsToMessageItem(const NmMessageEnvelope &envelope, bool dividersActive);
    46     void setContentsToMessageItem(const NmMessageEnvelope &envelope, bool dividersActive);
    47     void setFontsRead();
    47     void setFontsRead();
    48     void setFontsUnread();
    48     void setFontsUnread();
    49     void setFonts(const QColor &colorRole, HbFontSpec &fontSpec);
    49     void setFonts(const QColor &colorRole, HbFontSpec &fontSpec);
    50     void getFontSizes();    
    50     void getFontSizes();    
    51     QString senderFieldText(const NmMessageEnvelope &envelope);
    51     QString senderFieldText(const NmMessageEnvelope &envelope);
    52 
    52     
    53 private:
    53 private:
    54     HbTextItem *mSender;                   // Owned
    54     HbTextItem *mSender;      // Owned
    55     HbTextItem *mSubject;                  // Owned
    55     HbTextItem *mSubject;     // Owned
    56     HbTextItem *mTime;                     // Owned
    56     HbTextItem *mTime;        // Owned
    57     HbLabel *mDividerTitle;                // Owned
    57     HbLabel *mDividerTitle;   // Owned
    58     HbFrameItem *mNewMsgIcon;              // Owned
    58     HbFrameItem *mNewMsgIcon; // Owned
    59     HbIconItem *mIcon1;                    // Owned
    59     HbIconItem *mIcon1;       // Owned
    60     HbIconItem *mIcon2;                    // Owned
    60     HbIconItem *mIcon2;       // Owned
    61     qreal mPrimarySize;
    61     qreal mPrimarySize;
    62     qreal mSecondarySize;
    62     qreal mSecondarySize;
    63 };
    63 };
    64 
    64 
    65 
       
    66 #endif /* NMMESSAGELISTVIEWITEM_H_ */
    65 #endif /* NMMESSAGELISTVIEWITEM_H_ */