mpviewplugins/mpmediawallviewplugin/inc/mpalbumcoverwidget.h
changeset 43 0f32e550d9d8
parent 38 b93f525c9244
child 45 612c4815aebe
equal deleted inserted replaced
38:b93f525c9244 43:0f32e550d9d8
     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:  Album Cover Widget for Music Player Media Wall.
       
    15 *
       
    16 */
       
    17 #ifndef MPALBUMCOVERWIDGET_H
       
    18 #define MPALBUMCOVERWIDGET_H
       
    19 
       
    20 #include <QPixmap>
       
    21 #include <QGesture>
       
    22 
       
    23 #include <hbwidget.h>
       
    24 #include <hbicon.h>
       
    25 
       
    26 class MpAlbumCoverWidget : public HbWidget
       
    27 
       
    28 {
       
    29     Q_OBJECT
       
    30 
       
    31 public:
       
    32 
       
    33     MpAlbumCoverWidget( QGraphicsItem *parent = 0 );
       
    34     virtual ~MpAlbumCoverWidget();
       
    35     void setIcon(const HbIcon &icon );
       
    36     void setDefaultIcon( const HbIcon &icon );
       
    37     void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, 
       
    38                 QWidget *widget = 0 );
       
    39     void gestureEvent(QGestureEvent *event);
       
    40 
       
    41 signals:
       
    42 
       
    43     void clicked();
       
    44     
       
    45 private:
       
    46 
       
    47     void mousePressEvent( QGraphicsSceneMouseEvent *event );
       
    48     void mouseReleaseEvent( QGraphicsSceneMouseEvent *event );
       
    49     
       
    50 private:
       
    51     
       
    52     HbIcon    mIcon;
       
    53     HbIcon    mDefaultIcon;
       
    54     QPixmap   mPixmap;
       
    55 };
       
    56 
       
    57 
       
    58 #endif //MPALBUMCOVERWIDGET_H
       
    59 
       
    60 // EOF