1 /* |
|
2 * Copyright (c) 2009 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: Orbit stubs for Live Comms UI unit tests |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HBMAINWINDOW_H |
|
19 #define HBMAINWINDOW_H |
|
20 |
|
21 #include <QGraphicsView> |
|
22 #include <hbglobal.h> |
|
23 #include <hbnamespace.h> |
|
24 |
|
25 class QGraphicsWidget; |
|
26 class QWindowSurface |
|
27 { |
|
28 }; |
|
29 class HbAction; |
|
30 class HbView; |
|
31 |
|
32 |
|
33 class HbMainWindow : public QGraphicsView |
|
34 { |
|
35 public: |
|
36 explicit HbMainWindow(QWidget *parent = 0, Hb::WindowFlags windowFlags = Hb::WindowFlagNone); |
|
37 ~HbMainWindow(); |
|
38 |
|
39 HbView *addView(QGraphicsWidget *widget = 0); |
|
40 QGraphicsWidget *removeView(int index); |
|
41 void removeView(QGraphicsWidget *widget); |
|
42 HbView *currentView() const; |
|
43 void setCurrentView(HbView *view, bool animate = false); |
|
44 int viewCount() const; |
|
45 void setOrientation(Qt::Orientation orientation, bool animate = true); |
|
46 Qt::Orientation orientation() const; |
|
47 void show(){}; |
|
48 QList<HbView *> views() const; |
|
49 QRectF sceneRect() const; |
|
50 |
|
51 //Overiding function for stub |
|
52 QWindowSurface *windowSurface() const; |
|
53 |
|
54 private: // Data added for the unit testing stub |
|
55 HbView* mCurrentView; // Not owned |
|
56 int mViewCount; |
|
57 Qt::Orientation mOrientation; |
|
58 QList<HbView*> mTestViews; |
|
59 |
|
60 public : |
|
61 QWindowSurface *mSurface; |
|
62 }; |
|
63 |
|
64 #endif // HBMAINWINDOW_H |
|