1 /* |
1 /* |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
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 * |
4 * |
9 * Initial Contributors: |
5 * This program is free software: you can redistribute it and/or modify |
10 * Nokia Corporation - initial contribution. |
6 * it under the terms of the GNU Lesser General Public License as published by |
|
7 * the Free Software Foundation, version 2.1 of the License. |
11 * |
8 * |
12 * Contributors: |
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 * GNU Lesser General Public License for more details. |
13 * |
13 * |
14 * Description: |
14 * You should have received a copy of the GNU Lesser General Public License |
|
15 * along with this program. If not, |
|
16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". |
|
17 * |
|
18 * Description: |
15 * |
19 * |
16 */ |
20 */ |
17 |
|
18 |
21 |
19 #ifndef __GINEBRA_CHROMEVIEW_H__ |
22 #ifndef __GINEBRA_CHROMEVIEW_H__ |
20 #define __GINEBRA_CHROMEVIEW_H__ |
23 #define __GINEBRA_CHROMEVIEW_H__ |
21 #include <QtGui> |
24 #include <QtGui> |
22 |
25 |
|
26 #ifdef ORBIT_UI |
|
27 #include <hbmainwindow.h> |
|
28 #define ChromeGraphics HbMainWindow |
|
29 #else |
|
30 #define ChromeGraphics QGraphicsView |
|
31 #endif // ORBIT_UI |
|
32 |
23 namespace GVA { |
33 namespace GVA { |
24 |
34 |
25 class ChromeWidget; |
35 class ChromeWidget; |
26 |
36 |
27 class ChromeView : public QGraphicsView |
37 class ChromeView : public ChromeGraphics |
28 { |
38 { |
29 Q_OBJECT |
39 Q_OBJECT |
30 public: |
40 public: |
31 ChromeView(ChromeWidget * chrome, QWidget * parent = 0 ); |
41 ChromeView(QGraphicsScene *graphicsScene, ChromeWidget * chrome, QWidget * parent = 0 ); |
32 ~ChromeView(); |
42 ~ChromeView(); |
33 void resizeEvent(QResizeEvent * ev); |
43 void resizeEvent(QResizeEvent * ev); |
34 bool event(QEvent* event); |
44 bool event(QEvent* event); |
35 void scrollContentsBy(int dx, int dy); |
45 void scrollContentsBy(int dx, int dy); |
36 //protected: |
46 //protected: |
37 //bool eventFilter(QObject * obj, QEvent * ev); |
47 //bool eventFilter(QObject * obj, QEvent * ev); |
38 |
48 |
39 #ifdef Q_OS_SYMBIAN |
49 #ifdef Q_OS_SYMBIAN |
40 #ifdef SET_DEFAULT_IAP |
50 #ifdef SET_DEFAULT_IAP |
41 public slots: |
51 public slots: |
42 void setDefaultIap(); |
52 void setDefaultIap(); |
43 #endif |
53 #endif |
44 #endif |
54 #endif |
45 |
55 |
46 private: |
56 private: |
47 QGraphicsWidget * m_topWidget; |
57 QGraphicsWidget * m_topWidget; |
|
58 ChromeWidget * m_chrome; //TODO: get rid of this |
48 }; |
59 }; |
49 } |
60 } |
50 #endif //__GINEBRA_CHROMEVIEW_H__ |
61 #endif //__GINEBRA_CHROMEVIEW_H__ |