equal
deleted
inserted
replaced
|
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: stub hblabel |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "hbmainwindow.h" |
|
19 #include "hbview.h" |
|
20 #include "qlist.h" |
|
21 |
|
22 // --------------------------------------------------------------------------- |
|
23 // addView |
|
24 // --------------------------------------------------------------------------- |
|
25 // |
|
26 HbView* HbMainWindow::addView(QGraphicsWidget *widget) |
|
27 { |
|
28 HbView* view = qobject_cast<HbView*>(widget); |
|
29 mViews.append(view); |
|
30 return view; |
|
31 } |
|
32 |
|
33 // --------------------------------------------------------------------------- |
|
34 // removeView |
|
35 // --------------------------------------------------------------------------- |
|
36 // |
|
37 void HbMainWindow::removeView(QGraphicsWidget *widget) |
|
38 { |
|
39 mViews.removeAll(qobject_cast<HbView*>(widget)); |
|
40 } |
|
41 |
|
42 // --------------------------------------------------------------------------- |
|
43 // views |
|
44 // --------------------------------------------------------------------------- |
|
45 // |
|
46 QList<HbView *> HbMainWindow::views() const |
|
47 { |
|
48 return mViews; |
|
49 } |
|
50 |
|
51 HbView* HbMainWindow::currentView() const |
|
52 { |
|
53 if(mViews.count()) |
|
54 { |
|
55 return mViews.at(0); |
|
56 } |
|
57 return 0; |
|
58 } |