|
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#9 % |
|
19 |
|
20 |
|
21 |
|
22 #ifndef MPXVIDEOPLAYBACKPROGRESSBAR_H_ |
|
23 #define MPXVIDEOPLAYBACKPROGRESSBAR_H_ |
|
24 |
|
25 #include <hbwidget.h> |
|
26 #include <mpxplaybackframeworkdefs.h> |
|
27 |
|
28 class HbLabel; |
|
29 class HbProgressBar; |
|
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 mousePressEvent( QGraphicsSceneMouseEvent *event ); |
|
41 void mouseReleaseEvent( QGraphicsSceneMouseEvent *event ); |
|
42 void mouseMoveEvent( QGraphicsSceneMouseEvent *event ); |
|
43 void initialize(); |
|
44 void updateWithFileDetails( QMPXVideoPlaybackViewFileDetails* details ); |
|
45 void updateState( TMPXPlaybackState state ); |
|
46 |
|
47 public: |
|
48 void durationChanged( int duration ); |
|
49 void positionChanged( int position ); |
|
50 |
|
51 private: |
|
52 QString valueToReadableFormat( int value ); |
|
53 void updatePostion( int position ); |
|
54 |
|
55 private: |
|
56 QMPXVideoPlaybackControlsController *mController; |
|
57 HbProgressBar *mProgressSlider; |
|
58 HbLabel *mDurationLabel; |
|
59 HbLabel *mPositionLabel; |
|
60 |
|
61 int mDuration; |
|
62 bool mNeedToResumeAfterSetPosition; |
|
63 bool mInitialized; |
|
64 bool mDragging; |
|
65 }; |
|
66 |
|
67 #endif /*MPXVIDEOPLAYBACKPROGRESSBAR_H_*/ |
|
68 |