videoplayback/videoplaybackview/controlinc/videoplaybackprogressbar.h
changeset 44 518105d52e45
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 VideoPlaybackProgressBar
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version: da1mmcf#15 %
       
    19 
       
    20 
       
    21 
       
    22 #ifndef VIDEOPLAYBACKPROGRESSBAR_H_
       
    23 #define VIDEOPLAYBACKPROGRESSBAR_H_
       
    24 
       
    25 #include <QObject>
       
    26 #include <mpxplaybackframeworkdefs.h>
       
    27 
       
    28 class QTimer;
       
    29 class HbProgressSlider;
       
    30 class VideoPlaybackViewFileDetails;
       
    31 class VideoPlaybackControlsController;
       
    32 
       
    33 class VideoPlaybackProgressBar : public QObject
       
    34 {
       
    35     Q_OBJECT
       
    36 
       
    37     public:
       
    38         VideoPlaybackProgressBar( VideoPlaybackControlsController* controller );
       
    39         virtual ~VideoPlaybackProgressBar();
       
    40         void initialize();
       
    41         void updateWithFileDetails( VideoPlaybackViewFileDetails* 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         void setEnableProgressSlider( bool enable );
       
    58 
       
    59     private:
       
    60         VideoPlaybackControlsController *mController;
       
    61         HbProgressSlider                    *mProgressSlider;
       
    62 
       
    63         int     mDuration;
       
    64         int     mDraggingPosition;
       
    65         int     mSetPosition;
       
    66 
       
    67         bool    mNeedToResumeAfterSetPosition;
       
    68         bool    mInitialized;
       
    69         bool    mSliderDragging;
       
    70         bool    mLongTimeFormat;
       
    71         bool    mLiveStreaming;
       
    72 
       
    73         QTimer *mSeekingTimer;
       
    74 };
       
    75 
       
    76 #endif /*VIDEOPLAYBACKPROGRESSBAR_H_*/
       
    77