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 MPXVideoPlaybackControlsController |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 1 % |
|
19 |
|
20 |
|
21 |
|
22 #ifndef MPXVIDEOPLAYBACKCONTROLSCONTROLLER_H_ |
|
23 #define MPXVIDEOPLAYBACKCONTROLSCONTROLLER_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 #include "mpxvideoplaybackviewfiledetails.h" |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class QMPXVideoPlaybackDocumentLoader; |
|
36 |
|
37 |
|
38 // DATA TYPES |
|
39 |
|
40 enum TMPXTimerAction |
|
41 { |
|
42 EMPXTimerCancel, |
|
43 EMPXTimerReset |
|
44 }; |
|
45 |
|
46 enum TPlaybackViewMode |
|
47 { |
|
48 EFullScreenView, |
|
49 EDetailsView, |
|
50 EAudioOnlyView |
|
51 }; |
|
52 |
|
53 const QString KMPXPLAYBACKVIEW_XML = ":/hbvideoplaybackview/hbvideoplaybackview.docml"; |
|
54 |
|
55 // CLASS DECLARATION |
|
56 |
|
57 class QMPXVideoPlaybackControlsController : public QObject |
|
58 { |
|
59 Q_OBJECT |
|
60 |
|
61 public: |
|
62 |
|
63 /** |
|
64 * constructor. |
|
65 */ |
|
66 QMPXVideoPlaybackControlsController(); |
|
67 |
|
68 /** |
|
69 * Destructor. |
|
70 */ |
|
71 virtual ~QMPXVideoPlaybackControlsController(); |
|
72 |
|
73 public: |
|
74 |
|
75 /** |
|
76 * Command handling function. |
|
77 * Call HandleCommandL() of container |
|
78 */ |
|
79 void handleCommand( TMPXVideoPlaybackViewCommandIds command, int value = 0 ); |
|
80 |
|
81 /** |
|
82 * Reset or cancel timers for the controls |
|
83 */ |
|
84 void resetDisappearingTimers( TMPXTimerAction timerAction ); |
|
85 |
|
86 /** |
|
87 * Return state |
|
88 */ |
|
89 inline TMPXPlaybackState state(); |
|
90 |
|
91 /** |
|
92 * Return file details |
|
93 */ |
|
94 inline QMPXVideoPlaybackViewFileDetails* fileDetails(); |
|
95 |
|
96 inline QMPXVideoPlaybackDocumentLoader* layoutLoader(); |
|
97 |
|
98 TPlaybackViewMode viewMode(); |
|
99 |
|
100 void changeViewMode( TPlaybackViewMode viewMode, bool transitionEffect = true ); |
|
101 |
|
102 public: |
|
103 QMPXVideoPlaybackViewFileDetails *mFileDetails; |
|
104 QMPXVideoPlaybackDocumentLoader *mLoader; |
|
105 |
|
106 TMPXPlaybackState mState; |
|
107 TPlaybackViewMode mViewMode; |
|
108 TMPXTimerAction mTimerAction; |
|
109 TMPXVideoPlaybackViewCommandIds mCommand; |
|
110 int mCommandValue; |
|
111 }; |
|
112 |
|
113 // INLINE METHODS |
|
114 // ------------------------------------------------------------------------------------------------- |
|
115 // QMPXVideoPlaybackControlsController::state |
|
116 // ------------------------------------------------------------------------------------------------- |
|
117 // |
|
118 inline |
|
119 TMPXPlaybackState QMPXVideoPlaybackControlsController::state() |
|
120 { |
|
121 return mState; |
|
122 } |
|
123 |
|
124 // ------------------------------------------------------------------------------------------------- |
|
125 // QMPXVideoPlaybackControlsController::fileDetails |
|
126 // ------------------------------------------------------------------------------------------------- |
|
127 // |
|
128 inline |
|
129 QMPXVideoPlaybackViewFileDetails* QMPXVideoPlaybackControlsController::fileDetails() |
|
130 { |
|
131 return mFileDetails; |
|
132 } |
|
133 |
|
134 // ------------------------------------------------------------------------------------------------- |
|
135 // QMPXVideoPlaybackControlsController::layoutLoader |
|
136 // ------------------------------------------------------------------------------------------------- |
|
137 // |
|
138 inline |
|
139 QMPXVideoPlaybackDocumentLoader* QMPXVideoPlaybackControlsController::layoutLoader() |
|
140 { |
|
141 return mLoader; |
|
142 } |
|
143 |
|
144 // ------------------------------------------------------------------------------------------------- |
|
145 // QMPXVideoPlaybackControlsController::viewMode |
|
146 // ------------------------------------------------------------------------------------------------- |
|
147 // |
|
148 inline |
|
149 TPlaybackViewMode QMPXVideoPlaybackControlsController::viewMode() |
|
150 { |
|
151 return mViewMode; |
|
152 } |
|
153 |
|
154 #endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/ |
|
155 |
|
156 // End of File |
|