wlanutilities/wlanwizard/src/wlanwizardpageinternal.cpp
changeset 39 7b3e49e4608a
parent 31 e8f4211554fb
child 43 72ebcbb64834
equal deleted inserted replaced
36:682dd021f9be 39:7b3e49e4608a
    16  *
    16  *
    17  */
    17  */
    18 
    18 
    19 // System includes
    19 // System includes
    20 #include <HbWidget>
    20 #include <HbWidget>
       
    21 #include <HbDocumentLoader>
       
    22 #include <HbMainWindow>
    21 
    23 
    22 // User includes
    24 // User includes
    23 #include "wlanwizard_p.h"
    25 #include "wlanwizard_p.h"
    24 #include "wlanwizardpageinternal.h"
    26 #include "wlanwizardpageinternal.h"
    25 
    27 
    52    Destructor.
    54    Destructor.
    53  */
    55  */
    54 WlanWizardPageInternal::~WlanWizardPageInternal()
    56 WlanWizardPageInternal::~WlanWizardPageInternal()
    55 {
    57 {
    56 }
    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 }