|
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 HELPDATAPROVIDER_H |
|
19 #define HELPDATAPROVIDER_H |
|
20 |
|
21 class HelpModel; |
|
22 class HelpItems; |
|
23 class HelpProxyModel; |
|
24 class QStandardItemModel; |
|
25 class HelpStandardItem; |
|
26 |
|
27 class HelpDataProvider |
|
28 { |
|
29 private: |
|
30 HelpDataProvider(); |
|
31 ~HelpDataProvider(); |
|
32 |
|
33 public: |
|
34 static HelpDataProvider* instance(); |
|
35 static void destroyInstance(); |
|
36 |
|
37 public: |
|
38 QAbstractItemModel* getCategoryData(); |
|
39 QAbstractItemModel* getSearchData(const QString& key=QString()); |
|
40 void setHelpContentUrl(const QString& uid, const QString& href); |
|
41 void getHelpContentData(QString& content, QString& url); |
|
42 |
|
43 private: |
|
44 void createHelpCategory(); |
|
45 void createBuiltInCategory(const QString& path); |
|
46 void constructAppHelp(const QString& path); |
|
47 void constructKeywordModel(const QString& path); |
|
48 HelpStandardItem* constructCategory2(const QString& title, const QString& uid); |
|
49 HelpStandardItem* findItemWithHref(HelpStandardItem* itemParent, const QString& href); |
|
50 |
|
51 private: |
|
52 QStandardItemModel* mHelpModel; //category tree model |
|
53 QStandardItemModel* mKeywordModel; //keyword list model |
|
54 HelpProxyModel* mSearhResultModel; //search result proxy model of keyword model |
|
55 |
|
56 QString mHelpContentRoot; |
|
57 |
|
58 }; |
|
59 |
|
60 #endif //HELPDATAPROVIDER_H |