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 #ifndef HELPDOCUMENTLOADER_H |
|
19 #define HELPDOCUMENTLOADER_H |
|
20 |
|
21 #include <hbdocumentloader.h> |
|
22 |
|
23 class HelpDocumentLoader : public HbDocumentLoader |
|
24 { |
|
25 private: |
|
26 virtual QObject* createObject(const QString& type, const QString& name); |
|
27 }; |
|
28 |
|
29 class HelpUIBuilder |
|
30 { |
|
31 public: |
|
32 void setObjectTree(QObjectList roots); |
|
33 QObjectList load(const QString& fileName); |
|
34 QObjectList load(const QString& fileName, const QString& section); |
|
35 QGraphicsWidget* findWidget(const QString& name); |
|
36 QObject* findObject(const QString& name); |
|
37 |
|
38 public: |
|
39 template<class T> T findWidget(const QString& name) { return qobject_cast<T>(findWidget(name)); } |
|
40 template<class T> T findObject(const QString& name) { return qobject_cast<T>(findObject(name)); } |
|
41 |
|
42 private: |
|
43 HelpDocumentLoader mDocLoader; |
|
44 }; |
|
45 |
|
46 |
|
47 #endif //HELPDOCUMENTLOADER_H |