34
|
1 |
/*
|
|
2 |
* Copyright (c) 2008-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 hbview
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef HBVIEW_H
|
|
20 |
#define HBVIEW_H
|
|
21 |
|
|
22 |
#include <QGraphicsWidget>
|
36
|
23 |
#include "qstring.h"
|
34
|
24 |
#include "hbinstance.h"
|
|
25 |
#include "hbtoolbar.h"
|
35
|
26 |
#include "hbeffect.h"
|
34
|
27 |
|
|
28 |
class HbView : public QGraphicsWidget
|
|
29 |
{
|
|
30 |
Q_OBJECT
|
|
31 |
|
|
32 |
public:
|
|
33 |
|
35
|
34 |
HbView(QGraphicsItem *parent = 0) : QGraphicsWidget(parent), mToolBar(0), mNavigationAction(0)
|
34
|
35 |
{
|
|
36 |
Q_UNUSED(parent);
|
|
37 |
}
|
|
38 |
|
|
39 |
virtual ~HbView(){}
|
|
40 |
|
|
41 |
HbMainWindow* mainWindow() const
|
|
42 |
{
|
|
43 |
return hbInstance->allMainWindows().value(0);
|
|
44 |
}
|
|
45 |
|
|
46 |
void setTitle(const QString &title)
|
|
47 |
{
|
36
|
48 |
mTitle = title;
|
34
|
49 |
}
|
|
50 |
|
|
51 |
HbToolBar *toolBar() const
|
|
52 |
{
|
|
53 |
if(!mToolBar) {
|
|
54 |
mToolBar = new HbToolBar(qobject_cast<QGraphicsItem*>(this));
|
|
55 |
}
|
|
56 |
return mToolBar;
|
|
57 |
}
|
|
58 |
|
|
59 |
void setItemVisible(Hb::SceneItem item, bool visible)
|
|
60 |
{
|
|
61 |
Q_UNUSED(item);
|
36
|
62 |
mSetItemVisibleLast = visible;
|
34
|
63 |
}
|
|
64 |
|
|
65 |
void setNavigationAction(HbAction *action)
|
|
66 |
{
|
35
|
67 |
mNavigationAction = action;
|
34
|
68 |
}
|
|
69 |
|
35
|
70 |
|
|
71 |
HbAction *mNavigationAction;
|
|
72 |
|
34
|
73 |
mutable HbToolBar* mToolBar;
|
36
|
74 |
|
|
75 |
QString mTitle;
|
|
76 |
|
|
77 |
public:
|
|
78 |
|
|
79 |
static bool mSetItemVisibleLast;
|
34
|
80 |
};
|
|
81 |
|
|
82 |
#endif // HBVIEW_H
|