userguide/inc/HelpDocumentLoader.h
changeset 13 1eb8015a8491
child 15 c0dfc135a46c
equal deleted inserted replaced
12:2cd891dccbbe 13:1eb8015a8491
       
     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 HelpUIBuilder
       
    24 {
       
    25 public:
       
    26     static void destroyInstance();
       
    27     static QObjectList load(const QString& fileName);
       
    28     static QObjectList load(const QString& fileName, const QString& section);
       
    29     static QGraphicsWidget* findWidget(const QString& name);
       
    30     static QObject* findObject(const QString& name);
       
    31 
       
    32 public:
       
    33     template<class T> static T findWidget(const QString& name) { return qobject_cast<T>(findWidget(name)); }
       
    34     template<class T> static T findObject(const QString& name) { return qobject_cast<T>(findObject(name)); }
       
    35     
       
    36 private:
       
    37     static HbDocumentLoader* instance();
       
    38 };
       
    39 
       
    40 
       
    41 #endif //HELPDOCUMENTLOADER_H