ganeswidgets/tsrc/fute/HgWidgetTest/inc/hgcoverflowwidget.h
branchGCC_SURGE
changeset 10 c348b9772569
parent 4 463f1934e292
parent 9 dde80bf4a8c7
equal deleted inserted replaced
4:463f1934e292 10:c348b9772569
     1 /*
       
     2 * Copyright (c) 2010 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:  Another view for test application.
       
    15 *
       
    16 */
       
    17 #ifndef HGCOVERFLOWWIDGET_H_
       
    18 #define HGCOVERFLOWWIDGET_H_
       
    19 
       
    20 #include <hbwidget>
       
    21 #include <hblabel>
       
    22 #include <qgraphicssceneresizeevent>
       
    23 #include <hgwidgets/hgmediawall.h>
       
    24 #include <QAbstractListModel>
       
    25 
       
    26 /**
       
    27  * Coverflowwidget class which adds labels to normal MediaWall
       
    28  */
       
    29 class HgCoverflowWidget : public HgMediawall
       
    30 {
       
    31     Q_OBJECT
       
    32 public:
       
    33     
       
    34 	HgCoverflowWidget(QGraphicsItem *parent=0);
       
    35 	virtual ~HgCoverflowWidget();
       
    36 
       
    37 	void updateTextPositions();
       
    38 	
       
    39 private slots:
       
    40     void frontItemChanged ( const QModelIndex & current, const QModelIndex & previous );	
       
    41 
       
    42 private:
       
    43     void resizeEvent(QGraphicsSceneResizeEvent *event);
       
    44     void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
       
    45     
       
    46 private:
       
    47     HbLabel* mTitleLabel;
       
    48     HbLabel* mDescLabel;
       
    49     bool mTextPositionsDirty;
       
    50 };
       
    51 
       
    52 #endif /* HGTESTVIEW_H_ */