phonebookui/cntcommonui/views/cnthistoryviewitem.h
changeset 81 640d30f4fb64
parent 72 6abfb1094884
equal deleted inserted replaced
77:c18f9fa7f42e 81:640d30f4fb64
     1 /*
     1 /*
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009 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:Message chat View decorator item prototype
    14 * Description:
    15  *
    15 *
    16  */
    16 */
    17 
    17 
    18 #ifndef CNTHISTORYVIEWITEM_H
    18 #ifndef CNTHISTORYVIEWITEM_H
    19 #define CNTHISTORYVIEWITEM_H
    19 #define CNTHISTORYVIEWITEM_H
    20 
    20 
    21 // INCLUDES
       
    22 #include <hblistviewitem.h>
    21 #include <hblistviewitem.h>
    23 
    22 
    24 class HbFrameItem;
    23 class CntHistoryViewItemWidget;
    25 
    24 
    26 /**
    25 /**
    27  * This class represents the item decorator of 
    26  * This class represents the item decorator of 
    28  * the comm history view.  
    27  * the comm history view.  
    29  */
    28  */
    30 class CntHistoryViewItem : public HbListViewItem
    29 class CntHistoryViewItem : public HbListViewItem
    31 {
    30 {
       
    31     friend class TestCntHistoryView;
    32     Q_OBJECT
    32     Q_OBJECT
    33     Q_PROPERTY( bool incoming READ getIncoming )
       
    34     Q_PROPERTY( bool newmessage READ isNewMessage )
       
    35     
    33     
    36 public:
    34 public:
    37     /*
    35     CntHistoryViewItem(QGraphicsItem* parent = NULL);
    38      * Constructor
       
    39      * @param parent, reference of QGraphicsItem
       
    40      * default set to 0
       
    41      */
       
    42     CntHistoryViewItem(QGraphicsItem* parent=0);
       
    43 
    36 
    44     /*
       
    45      * Factory method to the items
       
    46      */
       
    47     HbAbstractViewItem* createItem();
    37     HbAbstractViewItem* createItem();
    48 
       
    49     /*
       
    50      * Overriden method to draw the custom item in the list view
       
    51      */
       
    52     void updateChildItems();
    38     void updateChildItems();
    53     
    39     
    54     bool getIncoming() const { return mIncoming; }
       
    55     bool isNewMessage() const { return mNewMessage; }
       
    56     
       
    57 protected:
    40 protected:
    58     /*
       
    59      * Overriden method to overwrite the default "pressed" effect
       
    60      */
       
    61     void pressStateChanged(bool pressed, bool animate);
    41     void pressStateChanged(bool pressed, bool animate);
    62     
    42     
    63 private:
    43 private:
    64     bool            mIncoming;
    44     CntHistoryViewItemWidget *mWidget;
    65     bool            mNewMessage;
       
    66 
       
    67     HbFrameItem*    mNewItem;
       
    68     HbFrameItem*    mFocusItem;
       
    69 };
    45 };
    70 
    46 
    71 #endif // CNTHISTORYVIEWITEM_H
    47 #endif /* CNTHISTORYVIEWITEM_H */