inc/mpnowplayingwidget.h
changeset 19 4e84c994a771
child 20 82baf59ce8dd
equal deleted inserted replaced
5:2a40e88564c8 19:4e84c994a771
       
     1 /*
       
     2 * Copyright (c) 2009 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: Music Player now playing widget.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MPNOWPLAYINGWIDGET_H
       
    19 #define MPNOWPLAYINGWIDGET_H
       
    20 
       
    21 //includes
       
    22 #include <QtGlobal>
       
    23 #include <hbwidget.h>
       
    24 
       
    25 #ifdef BUILD_MPNOWPLAYINGBANNER
       
    26 #define MPNOWPLAYINGBANNER_EXPORT Q_DECL_EXPORT
       
    27 #else
       
    28 #define MPNOWPLAYINGBANNER_EXPORT Q_DECL_IMPORT
       
    29 #endif
       
    30 
       
    31 //forward declartions
       
    32 class QGraphicsSceneMouseEvent;
       
    33 class MpNowPlayingWidgetPrivate;
       
    34 
       
    35 class MPNOWPLAYINGBANNER_EXPORT MpNowPlayingWidget : public HbWidget
       
    36 {
       
    37     Q_OBJECT
       
    38     friend class MpNowPlayingWidgetPrivate;
       
    39 
       
    40 public:
       
    41     explicit MpNowPlayingWidget(long int playerId, QGraphicsItem *parent=0 );
       
    42     virtual ~MpNowPlayingWidget();
       
    43     void setEnabled( bool enabled );
       
    44     void paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
       
    45                 QWidget *widget = 0 );
       
    46 
       
    47 signals:
       
    48     void clicked();
       
    49     void playbackAttachmentChanged(bool attached);
       
    50 
       
    51 private:
       
    52     void mousePressEvent( QGraphicsSceneMouseEvent *event );
       
    53     void mouseReleaseEvent( QGraphicsSceneMouseEvent *event );
       
    54 
       
    55 private:
       
    56     Q_DISABLE_COPY(MpNowPlayingWidget)
       
    57     MpNowPlayingWidgetPrivate * const d_ptr; //owned
       
    58 
       
    59 };
       
    60 
       
    61 #endif    // MPNOWPLAYINGWIDGET_H