inc/mpnowplayingwidget.h
changeset 35 fdb31ab341af
parent 20 82baf59ce8dd
child 32 c163ef0b758d
equal deleted inserted replaced
34:2c5162224003 35:fdb31ab341af
    29 #endif
    29 #endif
    30 
    30 
    31 //forward declartions
    31 //forward declartions
    32 class QGraphicsSceneMouseEvent;
    32 class QGraphicsSceneMouseEvent;
    33 class MpNowPlayingWidgetPrivate;
    33 class MpNowPlayingWidgetPrivate;
       
    34 class HbFrameItem;
       
    35 
    34 
    36 
    35 class MPNOWPLAYINGBANNER_EXPORT MpNowPlayingWidget : public HbWidget
    37 class MPNOWPLAYINGBANNER_EXPORT MpNowPlayingWidget : public HbWidget
    36 {
    38 {
    37     Q_OBJECT
    39     Q_OBJECT
    38     friend class MpNowPlayingWidgetPrivate;
    40     friend class MpNowPlayingWidgetPrivate;
    39 
    41 
    40 public:
    42 public:
    41     explicit MpNowPlayingWidget(long int playerId, QGraphicsItem *parent=0 );
    43     explicit MpNowPlayingWidget(long int playerId, QGraphicsItem *parent=0 );
    42     virtual ~MpNowPlayingWidget();
    44     virtual ~MpNowPlayingWidget();
    43     void setEnabled( bool enabled );
    45     void setEnabled( bool enabled );
    44     void paint( QPainter *painter, const QStyleOptionGraphicsItem *option,
    46     void resizeEvent(QGraphicsSceneResizeEvent *event);
    45                 QWidget *widget = 0 );
       
    46 
    47 
    47 signals:
    48 signals:
    48     void clicked();
    49     void clicked();
    49     void playbackAttachmentChanged(bool attached);
    50     void playbackAttachmentChanged(bool attached);
    50 
    51 
    51 private:
    52 private:
    52     void mousePressEvent( QGraphicsSceneMouseEvent *event );
    53     void mousePressEvent( QGraphicsSceneMouseEvent *event );
    53     void mouseReleaseEvent( QGraphicsSceneMouseEvent *event );
    54     void mouseReleaseEvent( QGraphicsSceneMouseEvent *event );
    54     void changeEvent(QEvent *event);
    55     void mouseMoveEvent( QGraphicsSceneMouseEvent *event );
    55 
    56 
    56 private:
    57 private:
    57     Q_DISABLE_COPY(MpNowPlayingWidget)
    58     Q_DISABLE_COPY(MpNowPlayingWidget)
    58     MpNowPlayingWidgetPrivate * const d_ptr; //owned
    59     MpNowPlayingWidgetPrivate * const d_ptr; //owned
    59 
    60     HbFrameItem     *mFrameItem;
    60 };
    61 };
    61 
    62 
    62 #endif    // MPNOWPLAYINGWIDGET_H
    63 #endif    // MPNOWPLAYINGWIDGET_H