phonebookui/pbkcommonui/inc/cnthistoryviewitem.h
changeset 24 0ba2181d7c28
child 27 de1630741fbe
equal deleted inserted replaced
0:e686773b3f54 24:0ba2181d7c28
       
     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:Message chat View decorator item prototype
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef CNTHISTORYVIEWITEM_H
       
    19 #define CNTHISTORYVIEWITEM_H
       
    20 
       
    21 // INCLUDES
       
    22 #include "cnthistoryviewitemwidget.h"
       
    23 #include <hbtextitem.h>
       
    24 #include <hbiconitem.h>
       
    25 #include <hbabstractviewitem.h>
       
    26 #include <QGraphicsLinearLayout>
       
    27 
       
    28 /**
       
    29  * This class represents the item decorator of 
       
    30  * the comm history view.  
       
    31  */
       
    32 class CntHistoryViewItem : public HbAbstractViewItem
       
    33     {    
       
    34 public:
       
    35     /*
       
    36      * Constructor
       
    37      * @param parent, reference of QGraphicsItem
       
    38      * default set to 0
       
    39      */
       
    40     CntHistoryViewItem(QGraphicsItem* parent=0);
       
    41     
       
    42     /*
       
    43      * Factory method to the items
       
    44      */
       
    45     HbAbstractViewItem* createItem();
       
    46     
       
    47     /*
       
    48      * Overriden method to postprocess custom item
       
    49      */
       
    50     void polish(HbStyleParameters& params);
       
    51     
       
    52     /*
       
    53      * Overriden method to draw the custom item int he list view
       
    54      */
       
    55     void updateChildItems();
       
    56     
       
    57 private:
       
    58     
       
    59     /*
       
    60      * Layout for the item (text fields and icon)
       
    61      * Not owned
       
    62      */
       
    63     QGraphicsLinearLayout* mLayout;
       
    64     
       
    65     /*
       
    66      * Custom widget containing text fields and icon
       
    67      * Not owned
       
    68      */
       
    69     CntHistoryViewItemWidget* itemWidget;
       
    70     };
       
    71 
       
    72 #endif // CNTHISTORYVIEWITEM_H