78
|
1 |
/** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
* All rights reserved.
|
|
3 |
* This component and the accompanying materials are made available
|
|
4 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
5 |
* which accompanies this distribution, and is available
|
|
6 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
*
|
|
8 |
* Initial Contributors:
|
|
9 |
* Nokia Corporation - initial contribution.
|
|
10 |
*
|
|
11 |
* Contributors:
|
|
12 |
*
|
|
13 |
* Description:
|
|
14 |
*
|
|
15 |
*/
|
|
16 |
#include <smcmockclassincludes.h>
|
|
17 |
#include <QShowEvent>
|
|
18 |
#include <QGraphicsWidget>
|
|
19 |
#include <HbView>
|
|
20 |
#include "hbmainwindow.h"
|
|
21 |
|
|
22 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
23 |
|
|
24 |
// -----------------------------------------------------------------------------
|
|
25 |
// HbMainWindow::HbMainWindow
|
|
26 |
// -----------------------------------------------------------------------------
|
|
27 |
//
|
|
28 |
HbMainWindow::HbMainWindow(
|
|
29 |
QWidget * parent,
|
|
30 |
Hb::WindowFlags windowFlags ) : QGraphicsView(parent), d_ptr(0)
|
|
31 |
{
|
|
32 |
|
|
33 |
}
|
|
34 |
|
|
35 |
|
|
36 |
// -----------------------------------------------------------------------------
|
|
37 |
// HbMainWindow::~HbMainWindow
|
|
38 |
// -----------------------------------------------------------------------------
|
|
39 |
//
|
|
40 |
HbMainWindow::~HbMainWindow( )
|
|
41 |
{
|
|
42 |
|
|
43 |
}
|
|
44 |
|
|
45 |
|
|
46 |
// -----------------------------------------------------------------------------
|
|
47 |
// HbMainWindow::addView
|
|
48 |
// -----------------------------------------------------------------------------
|
|
49 |
//
|
|
50 |
HbView * HbMainWindow::addView(
|
|
51 |
QGraphicsWidget * widget )
|
|
52 |
{
|
|
53 |
SMC_MOCK_METHOD1( HbView *, QGraphicsWidget *, widget )
|
|
54 |
}
|
|
55 |
|
|
56 |
|
|
57 |
// -----------------------------------------------------------------------------
|
|
58 |
// HbMainWindow::insertView
|
|
59 |
// -----------------------------------------------------------------------------
|
|
60 |
//
|
|
61 |
HbView * HbMainWindow::insertView(
|
|
62 |
int index,
|
|
63 |
QGraphicsWidget * widget )
|
|
64 |
{
|
|
65 |
SMC_MOCK_METHOD2( HbView *, int, index,
|
|
66 |
QGraphicsWidget *, widget )
|
|
67 |
}
|
|
68 |
|
|
69 |
|
|
70 |
// -----------------------------------------------------------------------------
|
|
71 |
// HbMainWindow::removeView
|
|
72 |
// -----------------------------------------------------------------------------
|
|
73 |
//
|
|
74 |
void HbMainWindow::removeView(
|
|
75 |
QGraphicsWidget * widget )
|
|
76 |
{
|
|
77 |
SMC_MOCK_METHOD1( void, QGraphicsWidget *, widget )
|
|
78 |
}
|
|
79 |
|
|
80 |
|
|
81 |
// -----------------------------------------------------------------------------
|
|
82 |
// HbMainWindow::views
|
|
83 |
// -----------------------------------------------------------------------------
|
|
84 |
//
|
|
85 |
QList <HbView * > HbMainWindow::views( ) const
|
|
86 |
{
|
|
87 |
SMC_MOCK_METHOD0( QList <HbView * > )
|
|
88 |
}
|
|
89 |
|
|
90 |
|
|
91 |
// -----------------------------------------------------------------------------
|
|
92 |
// HbMainWindow::currentView
|
|
93 |
// -----------------------------------------------------------------------------
|
|
94 |
//
|
|
95 |
HbView * HbMainWindow::currentView( ) const
|
|
96 |
{
|
|
97 |
SMC_MOCK_METHOD0( HbView * )
|
|
98 |
}
|
|
99 |
|
|
100 |
|
|
101 |
// -----------------------------------------------------------------------------
|
|
102 |
// HbMainWindow::setCurrentView
|
|
103 |
// -----------------------------------------------------------------------------
|
|
104 |
//
|
|
105 |
void HbMainWindow::setCurrentView(
|
|
106 |
HbView * view,
|
|
107 |
bool animate,
|
|
108 |
Hb::ViewSwitchFlags flags )
|
|
109 |
{
|
|
110 |
SMC_MOCK_METHOD3( void, HbView *, view,
|
|
111 |
bool, animate,
|
|
112 |
/*Hb::ViewSwitchFlags*/int, flags )
|
|
113 |
}
|
|
114 |
|
|
115 |
|
|
116 |
// -----------------------------------------------------------------------------
|
|
117 |
// HbMainWindow::orientation
|
|
118 |
// -----------------------------------------------------------------------------
|
|
119 |
//
|
|
120 |
Qt::Orientation HbMainWindow::orientation( ) const
|
|
121 |
{
|
|
122 |
SMC_MOCK_METHOD0( Qt::Orientation )
|
|
123 |
}
|
|
124 |
|
|
125 |
|
|
126 |
// -----------------------------------------------------------------------------
|
|
127 |
// HbMainWindow::setOrientation
|
|
128 |
// -----------------------------------------------------------------------------
|
|
129 |
//
|
|
130 |
void HbMainWindow::setOrientation(
|
|
131 |
Qt::Orientation orientation,
|
|
132 |
bool animate )
|
|
133 |
{
|
|
134 |
SMC_MOCK_METHOD2( void, Qt::Orientation, orientation,
|
|
135 |
bool, animate )
|
|
136 |
}
|
|
137 |
|
|
138 |
|
|
139 |
// -----------------------------------------------------------------------------
|
|
140 |
// HbMainWindow::unsetOrientation
|
|
141 |
// -----------------------------------------------------------------------------
|
|
142 |
//
|
|
143 |
void HbMainWindow::unsetOrientation(
|
|
144 |
bool animate )
|
|
145 |
{
|
|
146 |
SMC_MOCK_METHOD1( void, bool, animate )
|
|
147 |
}
|
|
148 |
|
|
149 |
|
|
150 |
// -----------------------------------------------------------------------------
|
|
151 |
// HbMainWindow::nativeBackgroundWindow
|
|
152 |
// -----------------------------------------------------------------------------
|
|
153 |
//
|
|
154 |
WId HbMainWindow::nativeBackgroundWindow( )
|
|
155 |
{
|
|
156 |
SMC_MOCK_METHOD0( WId )
|
|
157 |
}
|
|
158 |
|
|
159 |
|
|
160 |
// -----------------------------------------------------------------------------
|
|
161 |
// HbMainWindow::resetNativeBackgroundWindow
|
|
162 |
// -----------------------------------------------------------------------------
|
|
163 |
//
|
|
164 |
void HbMainWindow::resetNativeBackgroundWindow( )
|
|
165 |
{
|
|
166 |
SMC_MOCK_METHOD0( void )
|
|
167 |
}
|
|
168 |
|
|
169 |
|
|
170 |
// -----------------------------------------------------------------------------
|
|
171 |
// HbMainWindow::layoutRect
|
|
172 |
// -----------------------------------------------------------------------------
|
|
173 |
//
|
|
174 |
QRectF HbMainWindow::layoutRect( ) const
|
|
175 |
{
|
|
176 |
SMC_MOCK_METHOD0( QRectF )
|
|
177 |
}
|
|
178 |
|
|
179 |
|
|
180 |
// -----------------------------------------------------------------------------
|
|
181 |
// HbMainWindow::setBackgroundImageName
|
|
182 |
// -----------------------------------------------------------------------------
|
|
183 |
//
|
|
184 |
void HbMainWindow::setBackgroundImageName(
|
|
185 |
Qt::Orientation orientation,
|
|
186 |
const QString & name )
|
|
187 |
{
|
|
188 |
SMC_MOCK_METHOD2( void, Qt::Orientation, orientation,
|
|
189 |
const QString &, name )
|
|
190 |
}
|
|
191 |
|
|
192 |
|
|
193 |
// -----------------------------------------------------------------------------
|
|
194 |
// HbMainWindow::backgroundImageName
|
|
195 |
// -----------------------------------------------------------------------------
|
|
196 |
//
|
|
197 |
QString HbMainWindow::backgroundImageName(
|
|
198 |
Qt::Orientation orientation ) const
|
|
199 |
{
|
|
200 |
SMC_MOCK_METHOD1( QString, Qt::Orientation, orientation )
|
|
201 |
}
|
|
202 |
|
|
203 |
|
|
204 |
// -----------------------------------------------------------------------------
|
|
205 |
// HbMainWindow::setBackgroundImageMode
|
|
206 |
// -----------------------------------------------------------------------------
|
|
207 |
//
|
|
208 |
void HbMainWindow::setBackgroundImageMode(
|
|
209 |
Hb::BackgroundImageMode mode )
|
|
210 |
{
|
|
211 |
SMC_MOCK_METHOD1( void, Hb::BackgroundImageMode, mode )
|
|
212 |
}
|
|
213 |
|
|
214 |
|
|
215 |
// -----------------------------------------------------------------------------
|
|
216 |
// HbMainWindow::backgroundImageMode
|
|
217 |
// -----------------------------------------------------------------------------
|
|
218 |
//
|
|
219 |
Hb::BackgroundImageMode HbMainWindow::backgroundImageMode( ) const
|
|
220 |
{
|
|
221 |
SMC_MOCK_METHOD0( Hb::BackgroundImageMode )
|
|
222 |
}
|
|
223 |
|
|
224 |
|
|
225 |
// -----------------------------------------------------------------------------
|
|
226 |
// HbMainWindow::setAutomaticOrientationEffectEnabled
|
|
227 |
// -----------------------------------------------------------------------------
|
|
228 |
//
|
|
229 |
void HbMainWindow::setAutomaticOrientationEffectEnabled(
|
|
230 |
bool enabled )
|
|
231 |
{
|
|
232 |
SMC_MOCK_METHOD1( void, bool, enabled )
|
|
233 |
}
|
|
234 |
|
|
235 |
|
|
236 |
// -----------------------------------------------------------------------------
|
|
237 |
// HbMainWindow::automaticOrientationEffectEnabled
|
|
238 |
// -----------------------------------------------------------------------------
|
|
239 |
//
|
|
240 |
bool HbMainWindow::automaticOrientationEffectEnabled( ) const
|
|
241 |
{
|
|
242 |
SMC_MOCK_METHOD0( bool )
|
|
243 |
}
|
|
244 |
|
|
245 |
|
|
246 |
// -----------------------------------------------------------------------------
|
|
247 |
// HbMainWindow::isObscured
|
|
248 |
// -----------------------------------------------------------------------------
|
|
249 |
//
|
|
250 |
bool HbMainWindow::isObscured( ) const
|
|
251 |
{
|
|
252 |
SMC_MOCK_METHOD0( bool )
|
|
253 |
}
|
|
254 |
|
|
255 |
|
|
256 |
// -----------------------------------------------------------------------------
|
|
257 |
// HbMainWindow::broadcastEvent
|
|
258 |
// -----------------------------------------------------------------------------
|
|
259 |
//
|
|
260 |
void HbMainWindow::broadcastEvent(
|
|
261 |
int eventType )
|
|
262 |
{
|
|
263 |
SMC_MOCK_METHOD1( void, int, eventType )
|
|
264 |
}
|
|
265 |
|
|
266 |
|
|
267 |
// -----------------------------------------------------------------------------
|
|
268 |
// HbMainWindow::viewReady
|
|
269 |
// -----------------------------------------------------------------------------
|
|
270 |
//
|
|
271 |
void HbMainWindow::viewReady( )
|
|
272 |
{
|
|
273 |
SMC_MOCK_METHOD0( void )
|
|
274 |
}
|
|
275 |
|
|
276 |
|
|
277 |
// -----------------------------------------------------------------------------
|
|
278 |
// HbMainWindow::aboutToChangeView
|
|
279 |
// -----------------------------------------------------------------------------
|
|
280 |
//
|
|
281 |
void HbMainWindow::aboutToChangeView(
|
|
282 |
HbView * oldView,
|
|
283 |
HbView * newView )
|
|
284 |
{
|
|
285 |
SMC_MOCK_METHOD2( void, HbView *, oldView,
|
|
286 |
HbView *, newView )
|
|
287 |
}
|
|
288 |
|
|
289 |
|
|
290 |
// -----------------------------------------------------------------------------
|
|
291 |
// HbMainWindow::currentViewChanged
|
|
292 |
// -----------------------------------------------------------------------------
|
|
293 |
//
|
|
294 |
void HbMainWindow::currentViewChanged(
|
|
295 |
HbView * view )
|
|
296 |
{
|
|
297 |
SMC_MOCK_METHOD1( void, HbView *, view )
|
|
298 |
}
|
|
299 |
|
|
300 |
|
|
301 |
// -----------------------------------------------------------------------------
|
|
302 |
// HbMainWindow::aboutToChangeOrientation
|
|
303 |
// -----------------------------------------------------------------------------
|
|
304 |
//
|
|
305 |
void HbMainWindow::aboutToChangeOrientation( )
|
|
306 |
{
|
|
307 |
SMC_MOCK_METHOD0( void )
|
|
308 |
}
|
|
309 |
|
|
310 |
|
|
311 |
// -----------------------------------------------------------------------------
|
|
312 |
// HbMainWindow::aboutToChangeOrientation
|
|
313 |
// -----------------------------------------------------------------------------
|
|
314 |
//
|
|
315 |
void HbMainWindow::aboutToChangeOrientation(
|
|
316 |
Qt::Orientation newOrientation,
|
|
317 |
bool animated )
|
|
318 |
{
|
|
319 |
SMC_MOCK_METHOD2( void, Qt::Orientation, newOrientation,
|
|
320 |
bool, animated )
|
|
321 |
}
|
|
322 |
|
|
323 |
|
|
324 |
// -----------------------------------------------------------------------------
|
|
325 |
// HbMainWindow::orientationChanged
|
|
326 |
// -----------------------------------------------------------------------------
|
|
327 |
//
|
|
328 |
void HbMainWindow::orientationChanged(
|
|
329 |
Qt::Orientation orientation )
|
|
330 |
{
|
|
331 |
SMC_MOCK_METHOD1( void, Qt::Orientation, orientation )
|
|
332 |
}
|
|
333 |
|
|
334 |
|
|
335 |
// -----------------------------------------------------------------------------
|
|
336 |
// HbMainWindow::obscured
|
|
337 |
// -----------------------------------------------------------------------------
|
|
338 |
//
|
|
339 |
void HbMainWindow::obscured( )
|
|
340 |
{
|
|
341 |
SMC_MOCK_METHOD0( void )
|
|
342 |
}
|
|
343 |
|
|
344 |
|
|
345 |
// -----------------------------------------------------------------------------
|
|
346 |
// HbMainWindow::revealed
|
|
347 |
// -----------------------------------------------------------------------------
|
|
348 |
//
|
|
349 |
void HbMainWindow::revealed( )
|
|
350 |
{
|
|
351 |
SMC_MOCK_METHOD0( void )
|
|
352 |
}
|
|
353 |
|
|
354 |
|
|
355 |
// -----------------------------------------------------------------------------
|
|
356 |
// HbMainWindow::changeEvent
|
|
357 |
// -----------------------------------------------------------------------------
|
|
358 |
//
|
|
359 |
void HbMainWindow::changeEvent(
|
|
360 |
QEvent * event )
|
|
361 |
{
|
|
362 |
SMC_MOCK_METHOD1( void, QEvent *, event )
|
|
363 |
}
|
|
364 |
|
|
365 |
|
|
366 |
// -----------------------------------------------------------------------------
|
|
367 |
// HbMainWindow::closeEvent
|
|
368 |
// -----------------------------------------------------------------------------
|
|
369 |
//
|
|
370 |
void HbMainWindow::closeEvent(
|
|
371 |
QCloseEvent * event )
|
|
372 |
{
|
|
373 |
SMC_MOCK_METHOD1( void, QCloseEvent *, event )
|
|
374 |
}
|
|
375 |
|
|
376 |
|
|
377 |
// -----------------------------------------------------------------------------
|
|
378 |
// HbMainWindow::drawBackground
|
|
379 |
// -----------------------------------------------------------------------------
|
|
380 |
//
|
|
381 |
void HbMainWindow::drawBackground(
|
|
382 |
QPainter * painter,
|
|
383 |
const QRectF & rect )
|
|
384 |
{
|
|
385 |
SMC_MOCK_METHOD2( void, QPainter *, painter,
|
|
386 |
const QRectF &, rect )
|
|
387 |
}
|
|
388 |
|
|
389 |
|
|
390 |
// -----------------------------------------------------------------------------
|
|
391 |
// HbMainWindow::keyPressEvent
|
|
392 |
// -----------------------------------------------------------------------------
|
|
393 |
//
|
|
394 |
void HbMainWindow::keyPressEvent(
|
|
395 |
QKeyEvent * event )
|
|
396 |
{
|
|
397 |
SMC_MOCK_METHOD1( void, QKeyEvent *, event )
|
|
398 |
}
|
|
399 |
|
|
400 |
|
|
401 |
// -----------------------------------------------------------------------------
|
|
402 |
// HbMainWindow::keyReleaseEvent
|
|
403 |
// -----------------------------------------------------------------------------
|
|
404 |
//
|
|
405 |
void HbMainWindow::keyReleaseEvent(
|
|
406 |
QKeyEvent * event )
|
|
407 |
{
|
|
408 |
SMC_MOCK_METHOD1( void, QKeyEvent *, event )
|
|
409 |
}
|
|
410 |
|
|
411 |
|
|
412 |
// -----------------------------------------------------------------------------
|
|
413 |
// HbMainWindow::resizeEvent
|
|
414 |
// -----------------------------------------------------------------------------
|
|
415 |
//
|
|
416 |
void HbMainWindow::resizeEvent(
|
|
417 |
QResizeEvent * event )
|
|
418 |
{
|
|
419 |
SMC_MOCK_METHOD1( void, QResizeEvent *, event )
|
|
420 |
}
|
|
421 |
|
|
422 |
|
|
423 |
// -----------------------------------------------------------------------------
|
|
424 |
// HbMainWindow::customEvent
|
|
425 |
// -----------------------------------------------------------------------------
|
|
426 |
//
|
|
427 |
void HbMainWindow::customEvent(
|
|
428 |
QEvent * event )
|
|
429 |
{
|
|
430 |
SMC_MOCK_METHOD1( void, QEvent *, event )
|
|
431 |
}
|
|
432 |
|
|
433 |
|
|
434 |
// -----------------------------------------------------------------------------
|
|
435 |
// HbMainWindow::scrollContentsBy
|
|
436 |
// -----------------------------------------------------------------------------
|
|
437 |
//
|
|
438 |
void HbMainWindow::scrollContentsBy(
|
|
439 |
int dx,
|
|
440 |
int dy )
|
|
441 |
{
|
|
442 |
SMC_MOCK_METHOD2( void, int, dx,
|
|
443 |
int, dy )
|
|
444 |
}
|
|
445 |
|
|
446 |
|
|
447 |
// -----------------------------------------------------------------------------
|
|
448 |
// HbMainWindow::paintEvent
|
|
449 |
// -----------------------------------------------------------------------------
|
|
450 |
//
|
|
451 |
void HbMainWindow::paintEvent(
|
|
452 |
QPaintEvent * event )
|
|
453 |
{
|
|
454 |
SMC_MOCK_METHOD1( void, QPaintEvent *, event )
|
|
455 |
}
|
|
456 |
|
|
457 |
|
|
458 |
// -----------------------------------------------------------------------------
|
|
459 |
// HbMainWindow::showEvent
|
|
460 |
// -----------------------------------------------------------------------------
|
|
461 |
//
|
|
462 |
void HbMainWindow::showEvent(
|
|
463 |
QShowEvent * event )
|
|
464 |
{
|
|
465 |
SMC_MOCK_METHOD1( void, QShowEvent *, event )
|
|
466 |
}
|
|
467 |
|
|
468 |
|
|
469 |
// -----------------------------------------------------------------------------
|
|
470 |
// HbMainWindow::event
|
|
471 |
// -----------------------------------------------------------------------------
|
|
472 |
//
|
|
473 |
bool HbMainWindow::event(
|
|
474 |
QEvent * event )
|
|
475 |
{
|
|
476 |
SMC_MOCK_METHOD1( bool, QEvent *, event )
|
|
477 |
}
|
|
478 |
|
|
479 |
|