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 "mpxcommonvideoplaybackview.hrh" |
|
31 |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 |
|
35 |
|
36 // DATA TYPES |
|
37 |
|
38 enum TMPXTimerAction |
|
39 { |
|
40 EMPXTimerCancel, |
|
41 EMPXTimerReset |
|
42 }; |
|
43 |
|
44 enum TPlaybackViewMode |
|
45 { |
|
46 EFullScreenView, |
|
47 EDetailsView, |
|
48 EAudioOnlyView |
|
49 }; |
|
50 |
|
51 const int KMPXControlsTimeOut = 4000; |
|
52 |
|
53 // CLASS DECLARATION |
|
54 |
|
55 class QMPXVideoPlaybackControlsController : public QObject |
|
56 { |
|
57 Q_OBJECT |
|
58 |
|
59 public: |
|
60 |
|
61 /** |
|
62 * constructor. |
|
63 */ |
|
64 QMPXVideoPlaybackControlsController(); |
|
65 |
|
66 /** |
|
67 * Destructor. |
|
68 */ |
|
69 virtual ~QMPXVideoPlaybackControlsController(); |
|
70 |
|
71 public: |
|
72 |
|
73 /** |
|
74 * Command handling function. |
|
75 * Call HandleCommandL() of container |
|
76 */ |
|
77 void handleCommand( TMPXVideoPlaybackViewCommandIds command, int value = 0 ); |
|
78 |
|
79 /** |
|
80 * Reset or cancel timers for the controls |
|
81 */ |
|
82 void resetDisappearingTimers( TMPXTimerAction timerAction ); |
|
83 |
|
84 /** |
|
85 * Return state |
|
86 */ |
|
87 inline TMPXPlaybackState state(); |
|
88 |
|
89 TPlaybackViewMode viewMode(); |
|
90 |
|
91 void changeViewMode( TPlaybackViewMode viewMode, bool transitionEffect = true ); |
|
92 |
|
93 public: |
|
94 TMPXPlaybackState mState; |
|
95 TPlaybackViewMode mViewMode; |
|
96 TMPXTimerAction mTimerAction; |
|
97 TMPXVideoPlaybackViewCommandIds mCommand; |
|
98 int mCommandValue; |
|
99 }; |
|
100 |
|
101 // INLINE METHODS |
|
102 // ------------------------------------------------------------------------------------------------- |
|
103 // QMPXVideoPlaybackControlsController::state |
|
104 // ------------------------------------------------------------------------------------------------- |
|
105 // |
|
106 inline |
|
107 TMPXPlaybackState QMPXVideoPlaybackControlsController::state() |
|
108 { |
|
109 return mState; |
|
110 } |
|
111 |
|
112 // ------------------------------------------------------------------------------------------------- |
|
113 // QMPXVideoPlaybackControlsController::viewMode |
|
114 // ------------------------------------------------------------------------------------------------- |
|
115 // |
|
116 inline |
|
117 TPlaybackViewMode QMPXVideoPlaybackControlsController::viewMode() |
|
118 { |
|
119 return mViewMode; |
|
120 } |
|
121 |
|
122 #endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/ |
|
123 |
|
124 // End of File |
|