calendarui/views/dayview/tsrc/unittests/unittest_calendaycontainer/hbmainwindow.h
equal
deleted
inserted
replaced
|
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: Mocked classes for testing CalenDayUtils class |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HBMAINWINDOW_H |
|
19 #define HBMAINWINDOW_H |
|
20 |
|
21 #include <HbView> |
|
22 |
|
23 // Test variables |
|
24 extern QRectF gTestWindowRect; |
|
25 extern Qt::Orientation gTestOrientation; |
|
26 |
|
27 /*! |
|
28 Mocked class HbMainWindow (simulating window in unittests) |
|
29 */ |
|
30 class HbMainWindow |
|
31 { |
|
32 public: |
|
33 HbMainWindow() { |
|
34 mView = new HbView(); |
|
35 } |
|
36 |
|
37 ~HbMainWindow() { |
|
38 if (mView) { |
|
39 delete mView; |
|
40 mView = 0; |
|
41 } |
|
42 } |
|
43 |
|
44 QRectF layoutRect() const { |
|
45 return gTestWindowRect; |
|
46 } |
|
47 |
|
48 Qt::Orientation orientation() const { |
|
49 return gTestOrientation; |
|
50 } |
|
51 |
|
52 HbView *HbMainWindow::currentView() const { |
|
53 return mView; |
|
54 } |
|
55 |
|
56 HbView *mView; |
|
57 }; |
|
58 |
|
59 #endif // HBMAINWINDOW_H |