34
|
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 |
|
36
|
18 |
// Version : %version: da1mmcf#10 %
|
34
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
#ifndef MPXVIDEOPLAYBACKPROGRESSBAR_H_
|
|
23 |
#define MPXVIDEOPLAYBACKPROGRESSBAR_H_
|
|
24 |
|
|
25 |
#include <hbwidget.h>
|
|
26 |
#include <mpxplaybackframeworkdefs.h>
|
|
27 |
|
36
|
28 |
class QTimer;
|
|
29 |
class HbProgressSlider;
|
34
|
30 |
class QMPXVideoPlaybackViewFileDetails;
|
|
31 |
class QMPXVideoPlaybackControlsController;
|
|
32 |
|
|
33 |
class QMPXVideoPlaybackProgressBar : public HbWidget
|
|
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 |
|
36
|
48 |
private slots:
|
|
49 |
void handleSliderPressed();
|
|
50 |
void handleSliderMoved( int value );
|
|
51 |
void handleSliderReleased();
|
|
52 |
void handleSeekingTimeout();
|
|
53 |
|
34
|
54 |
private:
|
|
55 |
QString valueToReadableFormat( int value );
|
|
56 |
void updatePostion( int position );
|
|
57 |
|
|
58 |
private:
|
|
59 |
QMPXVideoPlaybackControlsController *mController;
|
36
|
60 |
HbProgressSlider *mProgressSlider;
|
|
61 |
|
|
62 |
int mDuration;
|
|
63 |
int mDraggingPosition;
|
|
64 |
int mSetPosition;
|
34
|
65 |
|
36
|
66 |
bool mNeedToResumeAfterSetPosition;
|
|
67 |
bool mInitialized;
|
|
68 |
bool mSliderDragging;
|
|
69 |
bool mLongTimeFormat;
|
|
70 |
bool mLiveStreaming;
|
|
71 |
|
|
72 |
QTimer *mSeekingTimer;
|
34
|
73 |
};
|
|
74 |
|
|
75 |
#endif /*MPXVIDEOPLAYBACKPROGRESSBAR_H_*/
|
|
76 |
|