phonebookui/pbkcommonui/inc/cnthistoryviewitem.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 14 May 2010 15:42:23 +0300
changeset 31 2a11b5b00470
parent 27 de1630741fbe
child 37 fd64c38c277d
permissions -rw-r--r--
Revision: 201017 Kit: 201019

/*
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
 *
 * Contributors:
 * 
 * Description:Message chat View decorator item prototype
 *
 */

#ifndef CNTHISTORYVIEWITEM_H
#define CNTHISTORYVIEWITEM_H

// INCLUDES
#include <hblistviewitem.h>

class HbFrameItem;

/**
 * This class represents the item decorator of 
 * the comm history view.  
 */
class CntHistoryViewItem : public HbListViewItem
{
    Q_OBJECT
    Q_PROPERTY( bool incoming READ getIncoming )
    Q_PROPERTY( bool newmessage READ isNewMessage )
    
public:
    /*
     * Constructor
     * @param parent, reference of QGraphicsItem
     * default set to 0
     */
    CntHistoryViewItem(QGraphicsItem* parent=0);

    /*
     * Factory method to the items
     */
    HbAbstractViewItem* createItem();

    /*
     * Overriden method to draw the custom item in the list view
     */
    void updateChildItems();
    
    bool getIncoming() const { return mIncoming; }
    bool isNewMessage() const { return mNewMessage; }
    
private:
    bool            mIncoming;
    bool            mNewMessage;

    HbFrameItem*    mNewItem;
};

#endif // CNTHISTORYVIEWITEM_H