|
1 /* |
|
2 * Copyright (c) 2010 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 VideoPlaybackControlsController |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 3 % |
|
19 |
|
20 |
|
21 |
|
22 #ifndef VIDEOPLAYBACKCONTROLSCONTROLLER_H_ |
|
23 #define VIDEOPLAYBACKCONTROLSCONTROLLER_H_ |
|
24 |
|
25 // INCLUDES |
|
26 #include <qobject> |
|
27 #include <mpxplaybackframeworkdefs.h> |
|
28 |
|
29 #include "mpxvideo_debug.h" |
|
30 #include "mpxhelixplaybackplugindefs.h" |
|
31 #include "mpxcommonvideoplaybackview.hrh" |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 |
|
35 // DATA TYPES |
|
36 |
|
37 enum TTimerAction |
|
38 { |
|
39 ETimerCancel, |
|
40 ETimerReset |
|
41 }; |
|
42 |
|
43 enum TPlaybackViewMode |
|
44 { |
|
45 EFullScreenView, |
|
46 EDetailsView, |
|
47 EAudioOnlyView |
|
48 }; |
|
49 |
|
50 const QString KPLAYBACKVIEW_DOCML = ":/videoplaybackview/videoplaybackview.docml"; |
|
51 |
|
52 // CLASS DECLARATION |
|
53 |
|
54 class VideoPlaybackControlsController : public QObject |
|
55 { |
|
56 Q_OBJECT |
|
57 |
|
58 public: |
|
59 |
|
60 /** |
|
61 * constructor. |
|
62 */ |
|
63 VideoPlaybackControlsController(); |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 virtual ~VideoPlaybackControlsController(); |
|
69 |
|
70 public: |
|
71 |
|
72 /** |
|
73 * Command handling function. |
|
74 * Call HandleCommandL() of container |
|
75 */ |
|
76 void handleCommand( TMPXVideoPlaybackViewCommandIds command, int value = 0 ); |
|
77 |
|
78 /** |
|
79 * Reset or cancel timers for the controls |
|
80 */ |
|
81 void resetDisappearingTimers( TTimerAction timerAction ); |
|
82 |
|
83 /** |
|
84 * Return state |
|
85 */ |
|
86 inline TMPXPlaybackState state(); |
|
87 |
|
88 TPlaybackViewMode viewMode(); |
|
89 |
|
90 void changeViewMode( TPlaybackViewMode viewMode, bool transitionEffect = true ); |
|
91 |
|
92 public: |
|
93 |
|
94 TMPXPlaybackState mState; |
|
95 TPlaybackViewMode mViewMode; |
|
96 TTimerAction mTimerAction; |
|
97 TMPXVideoPlaybackViewCommandIds mCommand; |
|
98 int mCommandValue; |
|
99 }; |
|
100 |
|
101 // INLINE METHODS |
|
102 // ------------------------------------------------------------------------------------------------- |
|
103 // VideoPlaybackControlsController::state |
|
104 // ------------------------------------------------------------------------------------------------- |
|
105 // |
|
106 inline |
|
107 TMPXPlaybackState VideoPlaybackControlsController::state() |
|
108 { |
|
109 return mState; |
|
110 } |
|
111 |
|
112 // ------------------------------------------------------------------------------------------------- |
|
113 // VideoPlaybackControlsController::viewMode |
|
114 // ------------------------------------------------------------------------------------------------- |
|
115 // |
|
116 inline |
|
117 TPlaybackViewMode VideoPlaybackControlsController::viewMode() |
|
118 { |
|
119 return mViewMode; |
|
120 } |
|
121 |
|
122 #endif /*VIDEOPLAYBACKCONTROLSCONTROLLER_H_*/ |
|
123 |
|
124 // End of File |