equal
deleted
inserted
replaced
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: Mocked classes for testing CalenDayUtils class |
14 * Description: Mocked classes for testing CalenDayContainer class |
15 * |
15 * |
16 */ |
16 */ |
17 |
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 |
|
60 |
18 |
61 #ifndef HBINSTANCE_H |
19 #ifndef HBINSTANCE_H |
62 #define HBINSTANCE_H |
20 #define HBINSTANCE_H |
63 |
21 |
|
22 #include "hbmainwindow.h" |
64 #include <QList> |
23 #include <QList> |
65 |
24 |
66 /*! |
25 /*! |
67 Mocked class HbInstance (simulating hbinstance in unittests) |
26 Mocked class HbInstance (simulating hbinstance in unittests) |
68 */ |
27 */ |