wlanutilities/wlanwizard/src/wlanwizardpageinternal.cpp
branchGCC_SURGE
changeset 47 b3d8f88532b7
parent 46 2fbd1d709fe7
child 43 72ebcbb64834
equal deleted inserted replaced
34:30a5f517c615 47:b3d8f88532b7
       
     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  *   WLAN Wizard: Interface for wizard pages (wlan internal).
       
    16  *
       
    17  */
       
    18 
       
    19 // System includes
       
    20 #include <HbWidget>
       
    21 #include <HbDocumentLoader>
       
    22 #include <HbMainWindow>
       
    23 
       
    24 // User includes
       
    25 #include "wlanwizard_p.h"
       
    26 #include "wlanwizardpageinternal.h"
       
    27 
       
    28 /*!
       
    29    \class WlanWizardPageInternal
       
    30    \brief Interface for internal wlan wizard pages. Contains pointer to private
       
    31    implementation of wlan wizard.
       
    32  */
       
    33 
       
    34 // External function prototypes
       
    35 
       
    36 // Local constants
       
    37 
       
    38 // ======== LOCAL FUNCTIONS ========
       
    39 
       
    40 // ======== MEMBER FUNCTIONS ========
       
    41 
       
    42 /*!
       
    43    Constructor
       
    44    
       
    45    @param [in] wizard pointer to private implementation of wizard
       
    46  */
       
    47 WlanWizardPageInternal::WlanWizardPageInternal(WlanWizardPrivate *wizard) :
       
    48     QObject(wizard), 
       
    49     mWizard(wizard)
       
    50 {
       
    51 }
       
    52 
       
    53 /*!
       
    54    Destructor.
       
    55  */
       
    56 WlanWizardPageInternal::~WlanWizardPageInternal()
       
    57 {
       
    58 }
       
    59 
       
    60 
       
    61 /*!
       
    62    Loads requested section from given docml file.
       
    63    
       
    64    @param [in] loader Document loader for docml
       
    65    @param [in] orientation Orientation to be loaded
       
    66    @param [in] filename the name of docml filename
       
    67    @param [in] portraitSection the name of section to be loaded in portrait mode
       
    68    @param [in] landscapeSection the name of section to be loaded in landscape mode
       
    69  */
       
    70 void WlanWizardPageInternal::loadDocmlSection(
       
    71     HbDocumentLoader *loader,
       
    72     Qt::Orientation orientation,
       
    73     const QString &filename,
       
    74     const QString &portraitSection,
       
    75     const QString &landscapeSection) const
       
    76 {
       
    77     bool ok;
       
    78     
       
    79     // Then load the orientation specific section
       
    80     if (orientation == Qt::Horizontal) {
       
    81         loader->load(filename, landscapeSection, &ok);
       
    82         Q_ASSERT(ok);
       
    83     } else {
       
    84         Q_ASSERT(orientation == Qt::Vertical);
       
    85         loader->load(filename, portraitSection, &ok);
       
    86         Q_ASSERT(ok);
       
    87     }
       
    88 }