|
1 /* |
|
2 * Copyright (c) 2010 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 |
|
19 #ifndef __GINEBRA_CONTENTVIEWDELEGATE_H__ |
|
20 #define __GINEBRA_CONTENTVIEWDELEGATE_H__ |
|
21 |
|
22 #include <QObject> |
|
23 #include <QtGui> |
|
24 #include "controllableviewimpl.h" |
|
25 |
|
26 namespace GVA { |
|
27 class ChromeWidget; |
|
28 |
|
29 class ContentViewDelegate : public ControllableViewBase |
|
30 { |
|
31 Q_OBJECT |
|
32 public: |
|
33 ContentViewDelegate(ChromeWidget *chrome, QObject * parent); |
|
34 virtual ~ContentViewDelegate(); |
|
35 virtual QGraphicsWidget* view() { return widget(); } |
|
36 ChromeWidget *chrome() { return m_chrome; } |
|
37 QString name() const { return jsObject()->objectName(); } |
|
38 |
|
39 // Q_PROPERTY(QString name READ getName) |
|
40 // QString getName() const { return objectName(); } |
|
41 // |
|
42 // use isActive() instead. |
|
43 // Q_PROPERTY(bool visible READ isVisible WRITE setVisible) |
|
44 // bool isVisible() { return view()->isVisible(); } |
|
45 // void setVisible(bool value) { view()->setVisible(value); } |
|
46 |
|
47 public slots: |
|
48 // use ControllableView version |
|
49 // void show() {view()->show();} |
|
50 // void hide() {view()->hide();} |
|
51 virtual void triggerAction(const QString & action){Q_UNUSED(action);return;} |
|
52 protected: |
|
53 ChromeWidget * m_chrome; |
|
54 }; |
|
55 |
|
56 } // end of namespace GVA |
|
57 |
|
58 #endif // __GINEBRA_CONTENTVIEWDELEGATE_H__ |