44
|
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 |
|
58
|
18 |
// Version : %version: da1mmcf#17 %
|
44
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
#ifndef VIDEOPLAYBACKPROGRESSBAR_H_
|
|
23 |
#define VIDEOPLAYBACKPROGRESSBAR_H_
|
|
24 |
|
|
25 |
#include <QObject>
|
49
|
26 |
#include <hbextendedlocale.h>
|
44
|
27 |
#include <mpxplaybackframeworkdefs.h>
|
|
28 |
|
|
29 |
class QTimer;
|
|
30 |
class HbProgressSlider;
|
|
31 |
class VideoPlaybackViewFileDetails;
|
|
32 |
class VideoPlaybackControlsController;
|
|
33 |
|
|
34 |
class VideoPlaybackProgressBar : public QObject
|
|
35 |
{
|
|
36 |
Q_OBJECT
|
|
37 |
|
|
38 |
public:
|
|
39 |
VideoPlaybackProgressBar( VideoPlaybackControlsController* controller );
|
|
40 |
virtual ~VideoPlaybackProgressBar();
|
|
41 |
void initialize();
|
|
42 |
void updateWithFileDetails( VideoPlaybackViewFileDetails* details );
|
|
43 |
void updateState( TMPXPlaybackState state );
|
|
44 |
|
|
45 |
public:
|
|
46 |
void durationChanged( int duration );
|
|
47 |
void positionChanged( int position );
|
58
|
48 |
void resetControl();
|
44
|
49 |
|
|
50 |
private slots:
|
|
51 |
void handleSliderPressed();
|
|
52 |
void handleSliderMoved( int value );
|
|
53 |
void handleSliderReleased();
|
|
54 |
void handleSeekingTimeout();
|
|
55 |
|
|
56 |
private:
|
|
57 |
QString valueToReadableFormat( int value );
|
|
58 |
void updatePostion( int position );
|
|
59 |
void setEnableProgressSlider( bool enable );
|
|
60 |
|
|
61 |
private:
|
|
62 |
VideoPlaybackControlsController *mController;
|
49
|
63 |
HbProgressSlider *mProgressSlider;
|
44
|
64 |
|
|
65 |
int mDuration;
|
|
66 |
int mDraggingPosition;
|
|
67 |
int mSetPosition;
|
|
68 |
|
|
69 |
bool mNeedToResumeAfterSetPosition;
|
|
70 |
bool mInitialized;
|
|
71 |
bool mSliderDragging;
|
|
72 |
bool mLongTimeFormat;
|
|
73 |
bool mLiveStreaming;
|
|
74 |
|
|
75 |
QTimer *mSeekingTimer;
|
49
|
76 |
HbExtendedLocale mLocale;
|
44
|
77 |
};
|
|
78 |
|
|
79 |
#endif /*VIDEOPLAYBACKPROGRESSBAR_H_*/
|
|
80 |
|