videoplayback/hbvideoplaybackview/controlinc/mpxvideoplaybackprogressbar.h
changeset 44 518105d52e45
parent 42 17f382c040b1
child 49 824471cb468a
equal deleted inserted replaced
42:17f382c040b1 44:518105d52e45
     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:  Implementation of QMPXVideoPlaybackProgressBar
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version: da1mmcf#13 %
       
    19 
       
    20 
       
    21 
       
    22 #ifndef MPXVIDEOPLAYBACKPROGRESSBAR_H_
       
    23 #define MPXVIDEOPLAYBACKPROGRESSBAR_H_
       
    24 
       
    25 #include <QObject>
       
    26 #include <mpxplaybackframeworkdefs.h>
       
    27 
       
    28 class QTimer;
       
    29 class HbProgressSlider;
       
    30 class QMPXVideoPlaybackViewFileDetails;
       
    31 class QMPXVideoPlaybackControlsController;
       
    32 
       
    33 class QMPXVideoPlaybackProgressBar : public QObject
       
    34 {
       
    35     Q_OBJECT
       
    36 
       
    37     public:
       
    38         QMPXVideoPlaybackProgressBar( QMPXVideoPlaybackControlsController* controller );
       
    39         virtual ~QMPXVideoPlaybackProgressBar();
       
    40         void initialize();
       
    41         void updateWithFileDetails( QMPXVideoPlaybackViewFileDetails* details );
       
    42         void updateState( TMPXPlaybackState state );
       
    43 
       
    44     public:
       
    45         void durationChanged( int duration );
       
    46         void positionChanged( int position );
       
    47 
       
    48     private slots:
       
    49         void handleSliderPressed();
       
    50         void handleSliderMoved( int value );
       
    51         void handleSliderReleased();
       
    52         void handleSeekingTimeout();
       
    53 
       
    54     private:
       
    55         QString valueToReadableFormat( int value );
       
    56         void updatePostion( int position );
       
    57 
       
    58     private:
       
    59         QMPXVideoPlaybackControlsController *mController;
       
    60         HbProgressSlider                    *mProgressSlider;
       
    61 
       
    62         int     mDuration;
       
    63         int     mDraggingPosition;
       
    64         int     mSetPosition;
       
    65 
       
    66         bool    mNeedToResumeAfterSetPosition;
       
    67         bool    mInitialized;
       
    68         bool    mSliderDragging;
       
    69         bool    mLongTimeFormat;
       
    70         bool    mLiveStreaming;
       
    71 
       
    72         QTimer *mSeekingTimer;
       
    73 };
       
    74 
       
    75 #endif /*MPXVIDEOPLAYBACKPROGRESSBAR_H_*/
       
    76