videoplayback/hbvideoplaybackview/controlinc/mpxvideoplaybackbuttonbar.h
changeset 36 8aed59de29f9
parent 35 3738fe97f027
equal deleted inserted replaced
35:3738fe97f027 36:8aed59de29f9
    13 *
    13 *
    14 * Description:  Implementation of QMPXVideoPlaybackButtonBar
    14 * Description:  Implementation of QMPXVideoPlaybackButtonBar
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: da1mmcf#9 %
    18 // Version : %version: da1mmcf#12 %
    19 
    19 
    20 
    20 
    21 
    21 
    22 #ifndef MPXVIDEOPLAYBACKBUTTONBAR_H_
    22 #ifndef MPXVIDEOPLAYBACKBUTTONBAR_H_
    23 #define MPXVIDEOPLAYBACKBUTTONBAR_H_
    23 #define MPXVIDEOPLAYBACKBUTTONBAR_H_
    41     EMPXButtonFF,
    41     EMPXButtonFF,
    42     EMPXButtonNatural,
    42     EMPXButtonNatural,
    43     EMPXButtonStretch,
    43     EMPXButtonStretch,
    44     EMPXButtonZoom,
    44     EMPXButtonZoom,
    45     EMPXButtonDetails,
    45     EMPXButtonDetails,
       
    46     EMPXButtonAttach,
    46     EMPXButtonCount    // Should always be the last value
    47     EMPXButtonCount    // Should always be the last value
    47 };
    48 };
    48 
    49 
       
    50 enum TMPXSeekingState
       
    51 {
       
    52     EMPXNotSeeking,
       
    53     EMPXFastForwarding,
       
    54     EMPXRewinding
       
    55 };
       
    56 
       
    57 const int KMPXFastForward = 30;
       
    58 const int KMPXRewind = -10;
    49 
    59 
    50 class QMPXVideoPlaybackButtonBar : public HbWidget
    60 class QMPXVideoPlaybackButtonBar : public HbWidget
    51 {
    61 {
    52     Q_OBJECT
    62     Q_OBJECT
    53 
    63 
    56         virtual ~QMPXVideoPlaybackButtonBar();
    66         virtual ~QMPXVideoPlaybackButtonBar();
    57         void updateState( TMPXPlaybackState state );
    67         void updateState( TMPXPlaybackState state );
    58         void aspectRatioChanged( int aspectRatio );
    68         void aspectRatioChanged( int aspectRatio );
    59         void initialize();
    69         void initialize();
    60         void updateWithFileDetails( QMPXVideoPlaybackViewFileDetails* details );
    70         void updateWithFileDetails( QMPXVideoPlaybackViewFileDetails* details );
       
    71         void positionChanged( int position );
       
    72         void durationChanged( int duration );
    61 
    73 
    62     private slots:
    74     private slots:
    63         void play();
    75         void play();
    64         void pause();
    76         void pause();
    65         void changeAspectRatio();
    77         void changeAspectRatio();
    66         void handleButtonPressed();
    78         void handleButtonPressed();
    67         void startFFSeeking();
    79         void ffPressing();
    68         void startRWSeeking();
    80         void rwPressing();
    69         void endSeeking();
    81         void ffReleased();
       
    82         void rwReleased();
    70         void openDetailsView();
    83         void openDetailsView();
    71 
    84 
    72     private:
    85     private:
    73         QMPXVideoPlaybackControlsController *mController;
    86         QMPXVideoPlaybackControlsController *mController;
       
    87         QList<HbPushButton*>                 mButtons;
       
    88         TMPXSeekingState                     mSeekingState;
    74 
    89 
    75         QList<HbPushButton*>                 mButtons;
    90         bool mInitialized;
    76         bool                                 mInitialized;
    91         int  mPosition;
       
    92         int  mDuration;
    77 };
    93 };
    78 
    94 
    79 #endif /*MPXVIDEOPLAYBACKBUTTONBAR_H_*/
    95 #endif /*MPXVIDEOPLAYBACKBUTTONBAR_H_*/