ganeswidgets/tsrc/fute/HgWidgetTest/inc/hgcoverflowwidget.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 03 May 2010 13:32:54 +0300
changeset 1 e48454f237ca
permissions -rw-r--r--
Revision: 201015 Kit: 201018

/*
* Copyright (c) 2010 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:  Another view for test application.
*
*/
#ifndef HGCOVERFLOWWIDGET_H_
#define HGCOVERFLOWWIDGET_H_

#include <hbwidget>
#include <hblabel>
#include <qgraphicssceneresizeevent>
#include <hgwidgets/hgmediawall.h>
#include <QAbstractListModel>

/**
 * Coverflowwidget class which adds labels to normal MediaWall
 */
class HgCoverflowWidget : public HgMediawall
{
    Q_OBJECT
public:
    
	HgCoverflowWidget(QGraphicsItem *parent=0);
	virtual ~HgCoverflowWidget();

	void updateTextPositions();
	
private slots:
    void frontItemChanged ( const QModelIndex & current, const QModelIndex & previous );	

private:
    void resizeEvent(QGraphicsSceneResizeEvent *event);
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    
private:
    HbLabel* mTitleLabel;
    HbLabel* mDescLabel;
    bool mTextPositionsDirty;
};

#endif /* HGTESTVIEW_H_ */