homescreenapp/hsapplication/tsrc/t_hsapplication/t_hsapplicationexe/src/hspagevisual_mock.cpp
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "hspagevisual.h" |
|
19 #include "hsscene.h" |
|
20 #include "hspage.h" |
|
21 |
|
22 |
|
23 |
|
24 /*! |
|
25 \class HsPageVisual |
|
26 \ingroup group_hsdomainmodel |
|
27 \brief Represents a page in the framework. |
|
28 HsPageVisual contains group of widgets. HsPageVisual can have a wallpaper. |
|
29 */ |
|
30 |
|
31 /*! |
|
32 Constructor. |
|
33 |
|
34 \a parent Owner. |
|
35 \a aFlags Window flags. |
|
36 */ |
|
37 HsPageVisual::HsPageVisual(QGraphicsItem* parent) |
|
38 : HbWidget(parent), |
|
39 mTouchArea(0) |
|
40 { |
|
41 } |
|
42 |
|
43 /*! |
|
44 Destructor. |
|
45 */ |
|
46 HsPageVisual::~HsPageVisual() |
|
47 { |
|
48 } |
|
49 |
|
50 int HsPageVisual::pageIndex() const |
|
51 { |
|
52 QList<HsPage *> pages = HsScene::instance()->pages(); |
|
53 for (int i = 0; i < pages.count(); ++i) { |
|
54 if (pages.at(i)->visual() == this) { |
|
55 return i; |
|
56 } |
|
57 } |
|
58 return -1; |
|
59 } |
|
60 |
|
61 void HsPageVisual::setGeometry(const QRectF &rect) |
|
62 { |
|
63 HbWidget::setGeometry(rect); |
|
64 } |
|
65 |
|
66 /*! |
|
67 Create touch area for page. |
|
68 */ |
|
69 void HsPageVisual::setupTouchArea() |
|
70 { |
|
71 } |
|
72 |
|
73 |
|
74 |