diff -r d9ec2b8c6bad -r 2fbd1d709fe7 wlanutilities/wlanwizard/src/wlanwizardpageinternal.cpp --- a/wlanutilities/wlanwizard/src/wlanwizardpageinternal.cpp Wed Jun 23 19:25:42 2010 +0300 +++ b/wlanutilities/wlanwizard/src/wlanwizardpageinternal.cpp Tue Jul 06 15:29:22 2010 +0300 @@ -18,6 +18,8 @@ // System includes #include +#include +#include // User includes #include "wlanwizard_p.h" @@ -54,3 +56,33 @@ WlanWizardPageInternal::~WlanWizardPageInternal() { } + + +/*! + Loads requested section from given docml file. + + @param [in] loader Document loader for docml + @param [in] orientation Orientation to be loaded + @param [in] filename the name of docml filename + @param [in] portraitSection the name of section to be loaded in portrait mode + @param [in] landscapeSection the name of section to be loaded in landscape mode + */ +void WlanWizardPageInternal::loadDocmlSection( + HbDocumentLoader *loader, + Qt::Orientation orientation, + const QString &filename, + const QString &portraitSection, + const QString &landscapeSection) const +{ + bool ok; + + // Then load the orientation specific section + if (orientation == Qt::Horizontal) { + loader->load(filename, landscapeSection, &ok); + Q_ASSERT(ok); + } else { + Q_ASSERT(orientation == Qt::Vertical); + loader->load(filename, portraitSection, &ok); + Q_ASSERT(ok); + } +}