wlanutilities/eapwizard/src/eapwizardpage.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  *   EAP Wizard: API for wizard pages.
       
    16  *
       
    17  */
       
    18 
       
    19 // System includes
       
    20 #include <HbWidget>
       
    21 #include <HbDocumentLoader>
       
    22 #include <HbMainWindow>
       
    23 
       
    24 // User includes
       
    25 #include "eapwizardpage.h"
       
    26 #include "eapwizard_p.h"
       
    27 #include "OstTraceDefinitions.h"
       
    28 #ifdef OST_TRACE_COMPILER_IN_USE
       
    29 #include "eapwizardpageTraces.h"
       
    30 #endif
       
    31 
       
    32 
       
    33 /*!
       
    34    \class EapWizardPage
       
    35    \brief Defines the interface for EAP specific wizard pages.
       
    36  */
       
    37 
       
    38 /*!
       
    39    \fn HbWidget* EapWizardPage::initializePage()
       
    40    See WlanWizardPage.
       
    41  */
       
    42 
       
    43 /*!
       
    44    \fn int EapWizardPage::nextId() const
       
    45    See WlanWizardPage.
       
    46  */
       
    47 
       
    48 // External function prototypes
       
    49 
       
    50 // Local constants
       
    51 
       
    52 // ======== LOCAL FUNCTIONS ========
       
    53 
       
    54 // ======== MEMBER FUNCTIONS ========
       
    55 
       
    56 
       
    57 /*!
       
    58    Constructor.
       
    59 
       
    60    @param [in] parent Pointer to EAP Wizard private implementation.
       
    61  */
       
    62 EapWizardPage::EapWizardPage(EapWizardPrivate* parent) :
       
    63     QObject(parent), 
       
    64     mWizard(parent)
       
    65 {
       
    66     OstTraceFunctionEntry0( EAPWIZARDPAGE_EAPWIZARDPAGE_ENTRY );
       
    67     OstTraceFunctionExit0( EAPWIZARDPAGE_EAPWIZARDPAGE_EXIT );
       
    68 }
       
    69 
       
    70 /*!
       
    71    Destructor.
       
    72  */
       
    73 EapWizardPage::~EapWizardPage()
       
    74 {
       
    75     OstTraceFunctionEntry0( DUP1_EAPWIZARDPAGE_EAPWIZARDPAGE_ENTRY );
       
    76     mWizard = NULL;
       
    77     OstTraceFunctionExit0( DUP1_EAPWIZARDPAGE_EAPWIZARDPAGE_EXIT );
       
    78 }
       
    79 
       
    80 /*!
       
    81    See WlanWizardPage. 
       
    82  */
       
    83 int EapWizardPage::nextId(bool &removeFromStack) const
       
    84 {
       
    85     OstTraceFunctionEntry0( EAPWIZARDPAGE_NEXTID_ENTRY );
       
    86     removeFromStack = false;
       
    87     OstTraceFunctionExit0( EAPWIZARDPAGE_NEXTID_EXIT );
       
    88     return nextId();
       
    89 }
       
    90 
       
    91 /*!
       
    92    Loads requested section from given docml file.
       
    93 
       
    94    @param [in] loader Document loader for docml
       
    95    @param [in] orientation Orientation to be loaded
       
    96    @param [in] filename the name of docml filename
       
    97    @param [in] portraitSection the name of section to be loaded in portrait mode
       
    98    @param [in] landscapeSection the name of section to be loaded in landscape mode
       
    99  */
       
   100 void EapWizardPage::loadDocmlSection(
       
   101     HbDocumentLoader *loader,
       
   102     Qt::Orientation orientation,
       
   103     const QString &filename,
       
   104     const QString &portraitSection,
       
   105     const QString &landscapeSection) const
       
   106 {
       
   107     OstTraceFunctionEntry0( EAPWIZARDPAGE_LOADDOCMLSECTION_ENTRY );
       
   108     bool ok;
       
   109 
       
   110     // Then load the orientation specific section
       
   111     if (orientation == Qt::Horizontal) {
       
   112         loader->load(filename, landscapeSection, &ok);
       
   113         Q_ASSERT(ok);
       
   114     } else {
       
   115         Q_ASSERT(orientation == Qt::Vertical);
       
   116         loader->load(filename, portraitSection, &ok);
       
   117         Q_ASSERT(ok);
       
   118     }
       
   119     OstTraceFunctionExit0( EAPWIZARDPAGE_LOADDOCMLSECTION_EXIT );
       
   120 }