|
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 QMPXVideoPlaybackFullScreenControl |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 1 % |
|
19 |
|
20 |
|
21 |
|
22 #include <w32std.h> |
|
23 |
|
24 #include "mpxvideo_debug.h" |
|
25 #include "mpxvideoplaybackbuttonbar.h" |
|
26 #include "mpxvideoplaybackprogressbar.h" |
|
27 #include "mpxvideoplaybackfullscreencontrol.h" |
|
28 #include "mpxvideoplaybackfiledetailswidget.h" |
|
29 #include "mpxvideoplaybackcontrolscontroller.h" |
|
30 #include "mpxvideoplaybackdetailsplaybackwindow.h" |
|
31 |
|
32 |
|
33 // ------------------------------------------------------------------------------------------------- |
|
34 // QMPXVideoPlaybackFullScreenControl::QMPXVideoPlaybackFullScreenControl() |
|
35 // ------------------------------------------------------------------------------------------------- |
|
36 // |
|
37 QMPXVideoPlaybackFullScreenControl::QMPXVideoPlaybackFullScreenControl( |
|
38 QMPXVideoPlaybackControlsController* controller, |
|
39 TMPXVideoPlaybackControls index, |
|
40 HbWidget* widget, |
|
41 TUint controlproperties ) |
|
42 : mController( controller ) |
|
43 , mControl( widget ) |
|
44 , mControlIndex( index ) |
|
45 , mProperties( controlproperties ) |
|
46 { |
|
47 MPX_ENTER_EXIT(_L("QMPXVideoPlaybackFullScreenControl::QMPXVideoPlaybackFullScreenControl()")); |
|
48 |
|
49 setParent( mController ); |
|
50 } |
|
51 |
|
52 // ------------------------------------------------------------------------------------------------- |
|
53 // QMPXVideoPlaybackFullScreenControl::~QMPXVideoPlaybackFullScreenControl() |
|
54 // ------------------------------------------------------------------------------------------------- |
|
55 // |
|
56 QMPXVideoPlaybackFullScreenControl::~QMPXVideoPlaybackFullScreenControl() |
|
57 { |
|
58 MPX_DEBUG(_L("QMPXVideoPlaybackControlsController::~QMPXVideoPlaybackFullScreenControl")); |
|
59 } |
|
60 |
|
61 // ------------------------------------------------------------------------------------------------- |
|
62 // QMPXVideoPlaybackFullScreenControl::setVisible() |
|
63 // ------------------------------------------------------------------------------------------------- |
|
64 // |
|
65 void QMPXVideoPlaybackFullScreenControl::setVisible( bool visible ) |
|
66 { |
|
67 mControl->setVisible( visible ); |
|
68 } |
|
69 |
|
70 // ------------------------------------------------------------------------------------------------- |
|
71 // QMPXVideoPlaybackFullScreenControl::isVisible() |
|
72 // ------------------------------------------------------------------------------------------------- |
|
73 // |
|
74 bool QMPXVideoPlaybackFullScreenControl::isVisible() |
|
75 { |
|
76 return mVisible; |
|
77 } |
|
78 |
|
79 // ------------------------------------------------------------------------------------------------- |
|
80 // QMPXVideoPlaybackFullScreenControl::setVisibility() |
|
81 // ------------------------------------------------------------------------------------------------- |
|
82 // |
|
83 void QMPXVideoPlaybackFullScreenControl::setVisibility( TMPXPlaybackState /*state*/ ) |
|
84 { |
|
85 MPX_DEBUG(_L("QMPXVideoPlaybackFullScreenControl::setVisibility()")); |
|
86 |
|
87 mVisible = true; |
|
88 } |
|
89 |
|
90 // ------------------------------------------------------------------------------------------------- |
|
91 // QMPXVideoPlaybackFullScreenControl::controlIndex() |
|
92 // ------------------------------------------------------------------------------------------------- |
|
93 // |
|
94 TMPXVideoPlaybackControls QMPXVideoPlaybackFullScreenControl::controlIndex() |
|
95 { |
|
96 return mControlIndex; |
|
97 } |
|
98 |
|
99 // ------------------------------------------------------------------------------------------------- |
|
100 // QMPXVideoPlaybackFullScreenControl::volumeChanged() |
|
101 // ------------------------------------------------------------------------------------------------- |
|
102 // |
|
103 bool QMPXVideoPlaybackFullScreenControl::volumeChanged( int /*volume*/ ) |
|
104 { |
|
105 return true; |
|
106 } |
|
107 |
|
108 // ------------------------------------------------------------------------------------------------- |
|
109 // QMPXVideoPlaybackFullScreenControl::durationChanged() |
|
110 // ------------------------------------------------------------------------------------------------- |
|
111 // |
|
112 bool QMPXVideoPlaybackFullScreenControl::durationChanged( int duration ) |
|
113 { |
|
114 bool changed = EFalse; |
|
115 |
|
116 if ( mControlIndex == EMPXProgressBar ) |
|
117 { |
|
118 MPX_DEBUG(_L("QMPXVideoPlaybackFullScreenControl::DurationChanged() [%d]"), duration); |
|
119 |
|
120 static_cast<QMPXVideoPlaybackProgressBar*>(mControl)->durationChanged( duration ); |
|
121 |
|
122 changed = ETrue; |
|
123 } |
|
124 |
|
125 return changed; |
|
126 } |
|
127 |
|
128 // ------------------------------------------------------------------------------------------------- |
|
129 // QMPXVideoPlaybackFullScreenControl::positionChanged() |
|
130 // ------------------------------------------------------------------------------------------------- |
|
131 // |
|
132 bool QMPXVideoPlaybackFullScreenControl::positionChanged( int position ) |
|
133 { |
|
134 bool changed = EFalse; |
|
135 |
|
136 if ( mControlIndex == EMPXProgressBar ) |
|
137 { |
|
138 MPX_DEBUG(_L("QMPXVideoPlaybackFullScreenControl::positionChanged() [%d]"), position); |
|
139 |
|
140 static_cast<QMPXVideoPlaybackProgressBar*>(mControl)->positionChanged( position ); |
|
141 |
|
142 changed = ETrue; |
|
143 } |
|
144 |
|
145 return changed; |
|
146 } |
|
147 |
|
148 // ------------------------------------------------------------------------------------------------- |
|
149 // QMPXVideoPlaybackFullScreenControl::aspectRatioChanged() |
|
150 // ------------------------------------------------------------------------------------------------- |
|
151 // |
|
152 bool QMPXVideoPlaybackFullScreenControl::aspectRatioChanged( int aspectRatio ) |
|
153 { |
|
154 bool changed = EFalse; |
|
155 |
|
156 if ( mControlIndex == EMPXButtonBar ) |
|
157 { |
|
158 MPX_DEBUG( |
|
159 _L("QMPXVideoPlaybackFullScreenControl::aspectRatioChanged() [%d]"), aspectRatio); |
|
160 |
|
161 static_cast<QMPXVideoPlaybackButtonBar*>(mControl)->aspectRatioChanged( aspectRatio ); |
|
162 |
|
163 changed = ETrue; |
|
164 } |
|
165 |
|
166 return changed; |
|
167 } |
|
168 |
|
169 // ------------------------------------------------------------------------------------------------- |
|
170 // QMPXVideoPlaybackFullScreenControl::updateState() |
|
171 // ------------------------------------------------------------------------------------------------- |
|
172 // |
|
173 void QMPXVideoPlaybackFullScreenControl::updateState( TMPXPlaybackState state ) |
|
174 { |
|
175 } |
|
176 |
|
177 // ------------------------------------------------------------------------------------------------- |
|
178 // QMPXVideoPlaybackFullScreenControl::updateControlsWithFileDetails() |
|
179 // ------------------------------------------------------------------------------------------------- |
|
180 // |
|
181 void QMPXVideoPlaybackFullScreenControl::updateControlsWithFileDetails( |
|
182 QMPXVideoPlaybackViewFileDetails* details ) |
|
183 { |
|
184 |
|
185 } |
|
186 |
|
187 // ------------------------------------------------------------------------------------------------- |
|
188 // QMPXVideoPlaybackFullScreenControl::updateControlProperties() |
|
189 // ------------------------------------------------------------------------------------------------- |
|
190 // |
|
191 void QMPXVideoPlaybackFullScreenControl::updateControlProperties( TUint properties ) |
|
192 { |
|
193 mProperties = properties; |
|
194 } |
|
195 |
|
196 // End of file |