wlanutilities/wlanwizard/src/wlanwizardpageinternal.cpp
branchRCL_3
changeset 25 f28ada11abbf
parent 24 63be7eb3fc78
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
     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 #include "OstTraceDefinitions.h"
       
    28 #ifdef OST_TRACE_COMPILER_IN_USE
       
    29 #include "wlanwizardpageinternalTraces.h"
       
    30 #endif
       
    31 
       
    32 
       
    33 /*!
       
    34    \class WlanWizardPageInternal
       
    35    \brief Interface for internal wlan wizard pages. Contains pointer to private
       
    36    implementation of wlan wizard.
       
    37  */
       
    38 
       
    39 // External function prototypes
       
    40 
       
    41 // Local constants
       
    42 
       
    43 // ======== LOCAL FUNCTIONS ========
       
    44 
       
    45 // ======== MEMBER FUNCTIONS ========
       
    46 
       
    47 /*!
       
    48    Constructor
       
    49    
       
    50    @param [in] wizard pointer to private implementation of wizard
       
    51  */
       
    52 WlanWizardPageInternal::WlanWizardPageInternal(WlanWizardPrivate *wizard) :
       
    53     QObject(wizard), 
       
    54     mWizard(wizard)
       
    55 {
       
    56     OstTraceFunctionEntry0( WLANWIZARDPAGEINTERNAL_WLANWIZARDPAGEINTERNAL_ENTRY );
       
    57     OstTraceFunctionExit0( WLANWIZARDPAGEINTERNAL_WLANWIZARDPAGEINTERNAL_EXIT );
       
    58 }
       
    59 
       
    60 /*!
       
    61    Destructor.
       
    62  */
       
    63 WlanWizardPageInternal::~WlanWizardPageInternal()
       
    64 {
       
    65     OstTraceFunctionEntry0( DUP1_WLANWIZARDPAGEINTERNAL_WLANWIZARDPAGEINTERNAL_ENTRY );
       
    66     OstTraceFunctionExit0( DUP1_WLANWIZARDPAGEINTERNAL_WLANWIZARDPAGEINTERNAL_EXIT );
       
    67 }
       
    68 
       
    69 
       
    70 /*!
       
    71    Loads requested section from given docml file.
       
    72    
       
    73    @param [in] loader Document loader for docml
       
    74    @param [in] orientation Orientation to be loaded
       
    75    @param [in] filename the name of docml filename
       
    76    @param [in] portraitSection the name of section to be loaded in portrait mode
       
    77    @param [in] landscapeSection the name of section to be loaded in landscape mode
       
    78  */
       
    79 void WlanWizardPageInternal::loadDocmlSection(
       
    80     HbDocumentLoader *loader,
       
    81     Qt::Orientation orientation,
       
    82     const QString &filename,
       
    83     const QString &portraitSection,
       
    84     const QString &landscapeSection) const
       
    85 {
       
    86     OstTraceFunctionEntry0( WLANWIZARDPAGEINTERNAL_LOADDOCMLSECTION_ENTRY );
       
    87     bool ok;
       
    88     
       
    89     // Then load the orientation specific section
       
    90     if (orientation == Qt::Horizontal) {
       
    91         loader->load(filename, landscapeSection, &ok);
       
    92         Q_ASSERT(ok);
       
    93     } else {
       
    94         Q_ASSERT(orientation == Qt::Vertical);
       
    95         loader->load(filename, portraitSection, &ok);
       
    96         Q_ASSERT(ok);
       
    97     }
       
    98     OstTraceFunctionExit0( WLANWIZARDPAGEINTERNAL_LOADDOCMLSECTION_EXIT );
       
    99 }