13 * |
13 * |
14 * Description: Implementation of QMPXVideoPlaybackProgressBar |
14 * Description: Implementation of QMPXVideoPlaybackProgressBar |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 // Version : %version: da1mmcf#9 % |
18 // Version : %version: da1mmcf#10 % |
19 |
19 |
20 |
20 |
21 |
21 |
22 #ifndef MPXVIDEOPLAYBACKPROGRESSBAR_H_ |
22 #ifndef MPXVIDEOPLAYBACKPROGRESSBAR_H_ |
23 #define MPXVIDEOPLAYBACKPROGRESSBAR_H_ |
23 #define MPXVIDEOPLAYBACKPROGRESSBAR_H_ |
24 |
24 |
25 #include <hbwidget.h> |
25 #include <hbwidget.h> |
26 #include <mpxplaybackframeworkdefs.h> |
26 #include <mpxplaybackframeworkdefs.h> |
27 |
27 |
28 class HbLabel; |
28 class QTimer; |
29 class HbProgressBar; |
29 class HbProgressSlider; |
30 class QMPXVideoPlaybackViewFileDetails; |
30 class QMPXVideoPlaybackViewFileDetails; |
31 class QMPXVideoPlaybackControlsController; |
31 class QMPXVideoPlaybackControlsController; |
32 |
32 |
33 class QMPXVideoPlaybackProgressBar : public HbWidget |
33 class QMPXVideoPlaybackProgressBar : public HbWidget |
34 { |
34 { |
35 Q_OBJECT |
35 Q_OBJECT |
36 |
36 |
37 public: |
37 public: |
38 QMPXVideoPlaybackProgressBar( QMPXVideoPlaybackControlsController* controller ); |
38 QMPXVideoPlaybackProgressBar( QMPXVideoPlaybackControlsController* controller ); |
39 virtual ~QMPXVideoPlaybackProgressBar(); |
39 virtual ~QMPXVideoPlaybackProgressBar(); |
40 void mousePressEvent( QGraphicsSceneMouseEvent *event ); |
|
41 void mouseReleaseEvent( QGraphicsSceneMouseEvent *event ); |
|
42 void mouseMoveEvent( QGraphicsSceneMouseEvent *event ); |
|
43 void initialize(); |
40 void initialize(); |
44 void updateWithFileDetails( QMPXVideoPlaybackViewFileDetails* details ); |
41 void updateWithFileDetails( QMPXVideoPlaybackViewFileDetails* details ); |
45 void updateState( TMPXPlaybackState state ); |
42 void updateState( TMPXPlaybackState state ); |
46 |
43 |
47 public: |
44 public: |
48 void durationChanged( int duration ); |
45 void durationChanged( int duration ); |
49 void positionChanged( int position ); |
46 void positionChanged( int position ); |
50 |
47 |
|
48 private slots: |
|
49 void handleSliderPressed(); |
|
50 void handleSliderMoved( int value ); |
|
51 void handleSliderReleased(); |
|
52 void handleSeekingTimeout(); |
|
53 |
51 private: |
54 private: |
52 QString valueToReadableFormat( int value ); |
55 QString valueToReadableFormat( int value ); |
53 void updatePostion( int position ); |
56 void updatePostion( int position ); |
54 |
57 |
55 private: |
58 private: |
56 QMPXVideoPlaybackControlsController *mController; |
59 QMPXVideoPlaybackControlsController *mController; |
57 HbProgressBar *mProgressSlider; |
60 HbProgressSlider *mProgressSlider; |
58 HbLabel *mDurationLabel; |
|
59 HbLabel *mPositionLabel; |
|
60 |
61 |
61 int mDuration; |
62 int mDuration; |
62 bool mNeedToResumeAfterSetPosition; |
63 int mDraggingPosition; |
63 bool mInitialized; |
64 int mSetPosition; |
64 bool mDragging; |
65 |
|
66 bool mNeedToResumeAfterSetPosition; |
|
67 bool mInitialized; |
|
68 bool mSliderDragging; |
|
69 bool mLongTimeFormat; |
|
70 bool mLiveStreaming; |
|
71 |
|
72 QTimer *mSeekingTimer; |
65 }; |
73 }; |
66 |
74 |
67 #endif /*MPXVIDEOPLAYBACKPROGRESSBAR_H_*/ |
75 #endif /*MPXVIDEOPLAYBACKPROGRESSBAR_H_*/ |
68 |
76 |