wlanutilities/wlanwizard/src/wlanwizard_p.cpp
changeset 56 de27cc8389dd
parent 50 d4198dcb9983
child 58 301aeb18ae47
equal deleted inserted replaced
50:d4198dcb9983 56:de27cc8389dd
    14 * Description: 
    14 * Description: 
    15 * WLAN Wizard: Private implementation.
    15 * WLAN Wizard: Private implementation.
    16 */
    16 */
    17 
    17 
    18 // System includes
    18 // System includes
    19 #include <QLocale>
    19 
    20 #include <QApplication>
    20 #include <QApplication>
    21 #include <QGraphicsWidget>
    21 #include <QGraphicsWidget>
    22 #include <QTimer>
    22 #include <QTimer>
    23 #include <QDebug>
    23 #include <QDebug>
       
    24 
    24 #include <HbTranslator>
    25 #include <HbTranslator>
    25 #include <HbDocumentLoader>
    26 #include <HbDocumentLoader>
    26 #include <HbMainWindow>
    27 #include <HbMainWindow>
    27 #include <HbDialog>
    28 #include <HbDialog>
    28 #include <HbStackedWidget>
    29 #include <HbStackedWidget>
    29 #include <HbLabel>
    30 #include <HbLabel>
    30 #include <HbAction>
    31 #include <HbAction>
    31 #include <HbStyleLoader>
    32 #include <HbStyleLoader>
    32 
    33 
    33 // User includes
    34 // User includes
       
    35 
    34 #include "eapwizard.h"
    36 #include "eapwizard.h"
    35 #include "wpswizard.h"
    37 #include "wpswizard.h"
    36 #include "wlanqtutils.h"
    38 #include "wlanqtutils.h"
    37 #include "wlanqtutilsap.h"
    39 #include "wlanqtutilsap.h"
    38 #include "wlanwizardplugin.h"
    40 #include "wlanwizardplugin.h"
    98     mWpsWizard(NULL), 
   100     mWpsWizard(NULL), 
    99     mFirstPageId(WlanWizardPageInternal::PageNone),
   101     mFirstPageId(WlanWizardPageInternal::PageNone),
   100     mPageFinished(false),
   102     mPageFinished(false),
   101     mClosed(false)
   103     mClosed(false)
   102 {
   104 {
   103     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_WLANWIZARDPRIVATE_ENTRY );
   105     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_WLANWIZARDPRIVATE_ENTRY);
   104     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_WLANWIZARDPRIVATE,
   106     
       
   107     OstTrace1(
       
   108         TRACE_BORDER,
       
   109         WLANWIZARDPRIVATE_WLANWIZARDPRIVATE,
   105         "WlanWizardPrivate::WlanWizardPrivate;this=%x", 
   110         "WlanWizardPrivate::WlanWizardPrivate;this=%x", 
   106         this );
   111         this);
   107     
   112     
   108     // Set initial values for configurations
   113     // Set initial values for configurations
   109     setConfiguration(ConfIapId, WlanQtUtils::IapIdNone);
   114     setConfiguration(ConfIapId, WlanQtUtils::IapIdNone);
   110     setConfiguration(ConfConnected, false);
   115     setConfiguration(ConfConnected, false);
   111     setConfiguration(ConfHiddenWlan, false);
   116     setConfiguration(ConfWlanScanSSID, false);
   112     setConfiguration(ConfProcessSettings, false);
   117     setConfiguration(ConfProcessSettings, false);
   113     setConfiguration(ConfIctStatus, false);
   118     setConfiguration(ConfIctStatus, false);
   114 
   119 
   115     // Initialize timer for timer protected pages
   120     // Initialize timer for timer protected pages
   116     mPageTimer->setSingleShot(true);
   121     mPageTimer->setSingleShot(true);
   131 
   136 
   132     // First page is SSID query, unless client sets configurations via
   137     // First page is SSID query, unless client sets configurations via
   133     // setParameters(), which decides the first page..
   138     // setParameters(), which decides the first page..
   134     mFirstPageId = WlanWizardPageInternal::PageSsid;
   139     mFirstPageId = WlanWizardPageInternal::PageSsid;
   135 
   140 
   136     OstTraceExt2( TRACE_BORDER, WLANWIZARDPRIVATE_WLANWIZARDPRIVATE_DONE,
   141     OstTraceExt2(
       
   142         TRACE_BORDER,
       
   143         WLANWIZARDPRIVATE_WLANWIZARDPRIVATE_DONE,
   137         "WlanWizardPrivate::WlanWizardPrivate - done;"
   144         "WlanWizardPrivate::WlanWizardPrivate - done;"
   138         "this=%x;mFirstPageId=%{PageIds}",
   145         "this=%x;mFirstPageId=%{PageIds}",
   139         ( unsigned )this, mFirstPageId );
   146         (unsigned)this,
   140     OstTraceFunctionExit0( WLANWIZARDPRIVATE_WLANWIZARDPRIVATE_EXIT );
   147         mFirstPageId);
       
   148     
       
   149     OstTraceFunctionExit0(WLANWIZARDPRIVATE_WLANWIZARDPRIVATE_EXIT);
   141 }
   150 }
   142 
   151 
   143 /*!
   152 /*!
   144    Destructor.
   153    Destructor.
   145  */
   154  */
   146 WlanWizardPrivate::~WlanWizardPrivate()
   155 WlanWizardPrivate::~WlanWizardPrivate()
   147 {
   156 {
   148     OstTraceFunctionEntry0( DUP1_WLANWIZARDPRIVATE_WLANWIZARDPRIVATE_ENTRY );
   157     OstTraceFunctionEntry0(DUP1_WLANWIZARDPRIVATE_WLANWIZARDPRIVATE_ENTRY);
   149     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_DWLANWIZARDPRIVATE,
   158     
       
   159     OstTrace1(
       
   160         TRACE_BORDER,
       
   161         WLANWIZARDPRIVATE_DWLANWIZARDPRIVATE,
   150         "WlanWizardPrivate::~WlanWizardPrivate;this=%x",
   162         "WlanWizardPrivate::~WlanWizardPrivate;this=%x",
   151         this );
   163         this);
   152     
   164     
   153     // Remove wizard pages from stackedwidgets, since stackedwidget owns the
   165     // Remove wizard pages from stackedwidgets, since stackedwidget owns the
   154     // objects and all pages are deleted below. 
   166     // objects and all pages are deleted below. 
   155     while (mStackedWidget->count()) {
   167     while (mStackedWidget->count()) {
   156         mStackedWidget->removeAt(0);
   168         mStackedWidget->removeAt(0);
   176     mDialog->setAttribute( Qt::WA_DeleteOnClose, true );
   188     mDialog->setAttribute( Qt::WA_DeleteOnClose, true );
   177     mDialog->close();
   189     mDialog->close();
   178     // Remove the pointer from QScopedPointer to prevent double deallocation
   190     // Remove the pointer from QScopedPointer to prevent double deallocation
   179     mDialog.take();
   191     mDialog.take();
   180     
   192     
   181     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_DWLANWIZARDPRIVATE_DONE,
   193     OstTrace1(
       
   194         TRACE_BORDER,
       
   195         WLANWIZARDPRIVATE_DWLANWIZARDPRIVATE_DONE,
   182         "WlanWizardPrivate::~WlanWizardPrivate-Done;this=%x",
   196         "WlanWizardPrivate::~WlanWizardPrivate-Done;this=%x",
   183         this );
   197         this);
   184     OstTraceFunctionExit0( DUP1_WLANWIZARDPRIVATE_WLANWIZARDPRIVATE_EXIT );
   198     
       
   199     OstTraceFunctionExit0(DUP1_WLANWIZARDPRIVATE_WLANWIZARDPRIVATE_EXIT);
   185 }
   200 }
   186 
   201 
   187 /*!
   202 /*!
   188    See WlanWizard::setParameters().
   203    See WlanWizard::setParameters().
   189  */
   204  */
   190 void WlanWizardPrivate::setParameters(
   205 void WlanWizardPrivate::setParameters(
   191     const QString &ssid, 
   206     const QString &ssid,
   192     int networkMode, 
   207     int networkMode,
   193     int securityMode, 
   208     int securityMode, 
   194     bool usePsk,
   209     bool usePsk,
   195     bool hidden, 
       
   196     bool wps)
   210     bool wps)
   197 {
   211 {
   198     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_SETPARAMETERS_ENTRY );
   212     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_SETPARAMETERS_ENTRY);
   199     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_SETPARAMETERS, 
   213     
       
   214     OstTrace1(
       
   215         TRACE_BORDER,
       
   216         WLANWIZARDPRIVATE_SETPARAMETERS, 
   200         "WlanWizardPrivate::setParameters;this=%x", 
   217         "WlanWizardPrivate::setParameters;this=%x", 
   201         this );
   218         this);
   202     
   219     
   203     mFirstPageId = getNextPageId(
   220     mFirstPageId = getNextPageId(
   204         ssid, networkMode, securityMode, usePsk, hidden, wps);
   221         ssid,
   205     
   222         networkMode,
   206     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_SETPARAMETERS_DONE, 
   223         securityMode,
       
   224         usePsk,
       
   225         false,
       
   226         wps);
       
   227     
       
   228     OstTrace1(
       
   229         TRACE_BORDER,
       
   230         WLANWIZARDPRIVATE_SETPARAMETERS_DONE, 
   207         "WlanWizardPrivate::setParameters - Done;this=%x", 
   231         "WlanWizardPrivate::setParameters - Done;this=%x", 
   208         this );
   232         this);
   209     OstTraceFunctionExit0( WLANWIZARDPRIVATE_SETPARAMETERS_EXIT );
   233     
       
   234     OstTraceFunctionExit0(WLANWIZARDPRIVATE_SETPARAMETERS_EXIT);
   210 }
   235 }
   211 
   236 
   212 /*!
   237 /*!
   213    See WlanWizard::show().
   238    See WlanWizard::show().
   214  */
   239  */
   215 void WlanWizardPrivate::show()
   240 void WlanWizardPrivate::show()
   216 {
   241 {
   217     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_SHOW_ENTRY );
   242     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_SHOW_ENTRY);
   218     OstTraceExt2( TRACE_BORDER, WLANWIZARDPRIVATE_SHOW,
   243     
       
   244     OstTraceExt2(
       
   245         TRACE_BORDER,
       
   246         WLANWIZARDPRIVATE_SHOW,
   219         "WlanWizardPrivate::show;this=%x;mFirstPageId=%{PageIds}", 
   247         "WlanWizardPrivate::show;this=%x;mFirstPageId=%{PageIds}", 
   220         ( unsigned )this, mFirstPageId );
   248         (unsigned)this,
       
   249         mFirstPageId);
   221     
   250     
   222     Q_ASSERT(mClosed == false);
   251     Q_ASSERT(mClosed == false);
   223     showPage(mFirstPageId, false);
   252     showPage(mFirstPageId, false);
   224     mDialog->show();
   253     mDialog->show();
   225     
   254     
   226     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_SHOW_DONE,
   255     OstTrace1(
       
   256         TRACE_BORDER,
       
   257         WLANWIZARDPRIVATE_SHOW_DONE,
   227         "WlanWizardPrivate::show - Done;this=%x;",
   258         "WlanWizardPrivate::show - Done;this=%x;",
   228         (unsigned)this );
   259         (unsigned)this);
   229     OstTraceFunctionExit0( WLANWIZARDPRIVATE_SHOW_EXIT );
   260     
       
   261     OstTraceFunctionExit0(WLANWIZARDPRIVATE_SHOW_EXIT);
   230 }
   262 }
   231 
   263 
   232 /*!
   264 /*!
   233    See WlanWizard::setParameters() for descriptions of parameters.
   265    See WlanWizard::setParameters() for descriptions of parameters.
   234    
   266    
   242     int securityMode, 
   274     int securityMode, 
   243     bool usePsk,
   275     bool usePsk,
   244     bool hidden, 
   276     bool hidden, 
   245     bool wps)
   277     bool wps)
   246 {
   278 {
   247     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_GETNEXTPAGEID_ENTRY );
   279     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_GETNEXTPAGEID_ENTRY);
       
   280     
   248     setConfiguration(ConfProcessSettings, true);
   281     setConfiguration(ConfProcessSettings, true);
   249     setConfiguration(ConfSsid, ssid);
   282     setConfiguration(ConfSsid, ssid);
   250     setConfiguration(ConfNetworkMode, networkMode);
   283     setConfiguration(ConfNetworkMode, networkMode);
   251     setConfiguration(ConfSecurityMode, securityMode);
   284     setConfiguration(ConfSecurityMode, securityMode);
   252     setConfiguration(ConfUsePsk, usePsk);
   285     setConfiguration(ConfUsePsk, usePsk);
   253     setConfiguration(ConfHiddenWlan, hidden);
   286     setConfiguration(ConfWlanScanSSID, hidden);
   254 
   287 
   255     OstTrace1( TRACE_NORMAL, WLANWIZARDPRIVATE_GETNEXTPAGEID, 
   288     OstTrace1(
       
   289         TRACE_NORMAL,
       
   290         WLANWIZARDPRIVATE_GETNEXTPAGEID, 
   256         "WlanWizardPrivate::getNextPageId;wps=%u", 
   291         "WlanWizardPrivate::getNextPageId;wps=%u", 
   257         wps );
   292         wps);
   258     OstTraceFunctionExit0( WLANWIZARDPRIVATE_GETNEXTPAGEID_EXIT );
   293     
       
   294     OstTraceFunctionExit0(WLANWIZARDPRIVATE_GETNEXTPAGEID_EXIT);
   259     return nextPageId(wps);
   295     return nextPageId(wps);
   260 }
   296 }
   261 
   297 
   262 /*!
   298 /*!
   263    Utility method for WLAN Wizard pages to query the wlanqtutils class.
   299    Utility method for WLAN Wizard pages to query the wlanqtutils class.
   264    
   300    
   265    @return a valid pointer to WlanQtUtils class.
   301    @return a valid pointer to WlanQtUtils class.
   266  */
   302  */
   267 WlanQtUtils* WlanWizardPrivate::wlanQtUtils() const
   303 WlanQtUtils* WlanWizardPrivate::wlanQtUtils() const
   268 {
   304 {
   269     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_WLANQTUTILS_ENTRY );
   305     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_WLANQTUTILS_ENTRY);
       
   306     
   270     Q_ASSERT(mWlanQtUtils.data());
   307     Q_ASSERT(mWlanQtUtils.data());
   271     OstTraceFunctionExit0( WLANWIZARDPRIVATE_WLANQTUTILS_EXIT );
   308     
       
   309     OstTraceFunctionExit0(WLANWIZARDPRIVATE_WLANQTUTILS_EXIT);
   272     return mWlanQtUtils.data();
   310     return mWlanQtUtils.data();
   273 }
   311 }
   274 
   312 
   275 /*!
   313 /*!
   276    Utility method for WLAN Wizard pages to query active wizard plugin object
   314    Utility method for WLAN Wizard pages to query active wizard plugin object
   277    
   315    
   278    @return NULL in case plugin is not active.
   316    @return NULL in case plugin is not active.
   279  */ 
   317  */ 
   280 WlanWizardPlugin* WlanWizardPrivate::wlanWizardPlugin() const
   318 WlanWizardPlugin* WlanWizardPrivate::wlanWizardPlugin() const
   281 {
   319 {
   282     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_WLANWIZARDPLUGIN_ENTRY );
   320     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_WLANWIZARDPLUGIN_ENTRY);
       
   321     
   283     WlanWizardPlugin* plugin = NULL;
   322     WlanWizardPlugin* plugin = NULL;
   284 
   323 
   285     if (isEapEnabled()) {
   324     if (isEapEnabled()) {
   286         plugin = mEapWizard.data();
   325         plugin = mEapWizard.data();
   287         Q_ASSERT(plugin);
   326         Q_ASSERT(plugin);
   288     }
   327     }
   289     
   328     
   290     OstTrace1( TRACE_NORMAL, WLANWIZARDPRIVATE_WLANWIZARDPLUGIN, 
   329     OstTrace1(
       
   330         TRACE_NORMAL,
       
   331         WLANWIZARDPRIVATE_WLANWIZARDPLUGIN, 
   291         "WlanWizardPrivate::wlanWizardPlugin;plugin=%x", 
   332         "WlanWizardPrivate::wlanWizardPlugin;plugin=%x", 
   292         plugin );
   333         plugin);
   293     
   334     
   294     OstTraceFunctionExit0( WLANWIZARDPRIVATE_WLANWIZARDPLUGIN_EXIT );
   335     OstTraceFunctionExit0(WLANWIZARDPRIVATE_WLANWIZARDPLUGIN_EXIT);
   295     return plugin;
   336     return plugin;
   296 }
   337 }
   297 
   338 
   298 /*!
   339 /*!
   299    Utility method for WLAN Wizard pages to query if EAP mode is active at the
   340    Utility method for WLAN Wizard pages to query if EAP mode is active at the
   301    
   342    
   302    @return true in case EAP is currently activated.
   343    @return true in case EAP is currently activated.
   303  */
   344  */
   304 bool WlanWizardPrivate::isEapEnabled() const
   345 bool WlanWizardPrivate::isEapEnabled() const
   305 {
   346 {
   306     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_ISEAPENABLED_ENTRY );
   347     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_ISEAPENABLED_ENTRY);
       
   348     
   307     bool ret = false;
   349     bool ret = false;
   308     int secMode = configuration(ConfSecurityMode).toInt();
   350     int secMode = configuration(ConfSecurityMode).toInt();
   309 
   351 
   310     if (((secMode == CMManagerShim::WlanSecModeWpa || 
   352     if (((secMode == CMManagerShim::WlanSecModeWpa || 
   311           secMode == CMManagerShim::WlanSecModeWpa2) && 
   353           secMode == CMManagerShim::WlanSecModeWpa2) && 
   312           !configuration(ConfUsePsk).toBool()) || 
   354           !configuration(ConfUsePsk).toBool()) || 
   313         secMode == CMManagerShim::WlanSecMode802_1x) {
   355         secMode == CMManagerShim::WlanSecMode802_1x) {
   314         ret = true;
   356         ret = true;
   315     }
   357     }
   316 
   358 
   317     OstTrace1( TRACE_NORMAL, WLANWIZARDPRIVATE_ISEAPENABLED, 
   359     OstTrace1(
       
   360         TRACE_NORMAL,
       
   361         WLANWIZARDPRIVATE_ISEAPENABLED, 
   318         "WlanWizardPrivate::isEapEnabled;ret=%u", 
   362         "WlanWizardPrivate::isEapEnabled;ret=%u", 
   319         ret );
   363         ret);
   320     
   364     
   321     OstTraceFunctionExit0( WLANWIZARDPRIVATE_ISEAPENABLED_EXIT );
   365     OstTraceFunctionExit0(WLANWIZARDPRIVATE_ISEAPENABLED_EXIT);
   322     return ret;
   366     return ret;
   323 }
   367 }
   324 
   368 
   325 /*!
   369 /*!
   326    Creates new iap or updates existing iap.
   370    Creates new iap or updates existing iap.
   327    
   371    
   328    @return false in case IAP creation/update failed.
   372    @return false in case IAP creation/update failed.
   329  */
   373  */
   330 bool WlanWizardPrivate::handleIap()
   374 bool WlanWizardPrivate::handleIap()
   331 {
   375 {
   332     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_HANDLEIAP_ENTRY );
   376     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_HANDLEIAP_ENTRY);
   333     OstTrace0( TRACE_FLOW, WLANWIZARDPRIVATE_HANDLEIAP,
   377     
   334         "WlanWizardPrivate::handleIap" );
   378     OstTrace0(
       
   379         TRACE_FLOW,
       
   380         WLANWIZARDPRIVATE_HANDLEIAP,
       
   381         "WlanWizardPrivate::handleIap");
   335     
   382     
   336     bool ret = true;
   383     bool ret = true;
   337     bool usePsk = true;
   384     bool usePsk = true;
   338     int securityMode = configuration(ConfSecurityMode).toInt();
   385     int securityMode = configuration(ConfSecurityMode).toInt();
   339     WlanQtUtilsAp wlanAp;
   386     WlanQtUtilsAp wlanAp;
   347     wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey3, QString());
   394     wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey3, QString());
   348     wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey4, QString());
   395     wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey4, QString());
   349     
   396     
   350     // Set configuration
   397     // Set configuration
   351     wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, configuration(ConfSsid));
   398     wlanAp.setValue(WlanQtUtilsAp::ConfIdSsid, configuration(ConfSsid));
   352     wlanAp.setValue(WlanQtUtilsAp::ConfIdConnectionMode, 
   399     wlanAp.setValue(
       
   400         WlanQtUtilsAp::ConfIdConnectionMode, 
   353         configuration(ConfNetworkMode));
   401         configuration(ConfNetworkMode));
   354     wlanAp.setValue(WlanQtUtilsAp::ConfIdSecurityMode, securityMode );
   402     wlanAp.setValue(WlanQtUtilsAp::ConfIdSecurityMode, securityMode);
   355     wlanAp.setValue(WlanQtUtilsAp::ConfIdHidden, configuration(ConfHiddenWlan));
   403     wlanAp.setValue(WlanQtUtilsAp::ConfIdHidden, false);
   356     
   404     wlanAp.setValue(WlanQtUtilsAp::ConfIdWlanScanSSID, configuration(ConfWlanScanSSID));
       
   405 
   357     switch (securityMode) {
   406     switch (securityMode) {
   358     case CMManagerShim::WlanSecModeWep:
   407     case CMManagerShim::WlanSecModeWep:
   359         wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey1, configuration(ConfKeyWep1));
   408         wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey1, configuration(ConfKeyWep1));
   360         wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey2, configuration(ConfKeyWep2));
   409         wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey2, configuration(ConfKeyWep2));
   361         wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey3, configuration(ConfKeyWep3));
   410         wlanAp.setValue(WlanQtUtilsAp::ConfIdWepKey3, configuration(ConfKeyWep3));
   382     }
   431     }
   383     
   432     
   384     // Create IAP if does not exists or update the existing IAP
   433     // Create IAP if does not exists or update the existing IAP
   385     int referenceId = configuration(ConfIapId).toInt();
   434     int referenceId = configuration(ConfIapId).toInt();
   386     if (referenceId == WlanQtUtils::IapIdNone) {
   435     if (referenceId == WlanQtUtils::IapIdNone) {
   387         OstTrace0( TRACE_FLOW, WLANWIZARDPRIVATE_HANDLEIAP_CREATE, 
   436         OstTrace0(
   388             "WlanWizardPrivate::handleIap: Create IAP" );
   437             TRACE_FLOW,
       
   438             WLANWIZARDPRIVATE_HANDLEIAP_CREATE, 
       
   439             "WlanWizardPrivate::handleIap: Create IAP");
   389         
   440         
   390         referenceId = mWlanQtUtils->createIap(&wlanAp);
   441         referenceId = mWlanQtUtils->createIap(&wlanAp);
   391         setConfiguration(ConfIapId, referenceId);
   442         setConfiguration(ConfIapId, referenceId);
   392         
   443         
   393         if (referenceId == WlanQtUtils::IapIdNone) {
   444         if (referenceId == WlanQtUtils::IapIdNone) {
   394             ret = false;
   445             ret = false;
   395         }
   446         }
   396     } else {
   447     } else {
   397         OstTrace0( TRACE_FLOW, WLANWIZARDPRIVATE_HANDLEIAP_UPDATE, 
   448         OstTrace0(
   398             "WlanWizardPrivate::handleIap: Update IAP" );
   449             TRACE_FLOW,
       
   450             WLANWIZARDPRIVATE_HANDLEIAP_UPDATE, 
       
   451             "WlanWizardPrivate::handleIap: Update IAP");
   399 
   452 
   400         ret = mWlanQtUtils->updateIap(referenceId, &wlanAp);
   453         ret = mWlanQtUtils->updateIap(referenceId, &wlanAp);
   401     }
   454     }
   402    
   455    
   403     if (ret) {
   456     if (ret) {
   404         // Store Wizard plugin specific settings here.
   457         // Store Wizard plugin specific settings here.
   405         WlanWizardPlugin* plugin = wlanWizardPlugin();
   458         WlanWizardPlugin* plugin = wlanWizardPlugin();
   406         if (plugin) {
   459         if (plugin) {
   407             OstTrace0( TRACE_FLOW, WLANWIZARDPRIVATE_HANDLEIAP_PLUGIN, 
   460             OstTrace0(
   408                 "WlanWizardPrivate::handleIap: Plugin" );
   461                 TRACE_FLOW,
       
   462                 WLANWIZARDPRIVATE_HANDLEIAP_PLUGIN, 
       
   463                 "WlanWizardPrivate::handleIap: Plugin");
   409             // Plugin gets the IAP ID from configuration
   464             // Plugin gets the IAP ID from configuration
   410             ret = plugin->storeSettings();
   465             ret = plugin->storeSettings();
   411         }
   466         }
   412     }
   467     }
   413     
   468     
   414     OstTrace1( TRACE_FLOW, WLANWIZARDPRIVATE_HANDLEIAP_DONE,
   469     OstTrace1(
       
   470         TRACE_FLOW,
       
   471         WLANWIZARDPRIVATE_HANDLEIAP_DONE,
   415         "WlanWizardPrivate::handleIap: Done;ret=%d",
   472         "WlanWizardPrivate::handleIap: Done;ret=%d",
   416         ret );
   473         ret);
   417     
   474 
   418     OstTraceFunctionExit0( WLANWIZARDPRIVATE_HANDLEIAP_EXIT );
   475     OstTraceFunctionExit0(WLANWIZARDPRIVATE_HANDLEIAP_EXIT);
   419     return ret;
   476     return ret;
   420 }
   477 }
   421 
   478 
   422 /*!
   479 /*!
   423    See WlanWizardHelper::configuration().
   480    See WlanWizardHelper::configuration().
   424  */
   481  */
   425 QVariant WlanWizardPrivate::configuration(ConfigurationId confId) const
   482 QVariant WlanWizardPrivate::configuration(ConfigurationId confId) const
   426 {
   483 {
   427     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_CONFIGURATION_ENTRY );
   484     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_CONFIGURATION_ENTRY);
       
   485     
   428     Q_ASSERT(mConfigurations.contains(confId));
   486     Q_ASSERT(mConfigurations.contains(confId));
   429 
   487 
   430 #ifdef OST_TRACE_COMPILER_IN_USE
   488 #ifdef OST_TRACE_COMPILER_IN_USE
   431     QString tmp;
   489     QString tmp;
   432     QDebug tmpStream(&tmp);
   490     QDebug tmpStream(&tmp);
   433     tmpStream << mConfigurations[confId];
   491     tmpStream << mConfigurations[confId];
   434     TPtrC16 string( tmp.utf16(), tmp.length() );
   492     TPtrC16 string( tmp.utf16(), tmp.length() );
   435     
   493     
   436     OstTraceExt2( TRACE_NORMAL, WLANWIZARDPRIVATE_CONFIGURATIONS, 
   494     OstTraceExt2(
       
   495         TRACE_NORMAL,
       
   496         WLANWIZARDPRIVATE_CONFIGURATIONS, 
   437         "WlanWizardPrivate::configuration;confId=%{ConfigurationId};string=%S", 
   497         "WlanWizardPrivate::configuration;confId=%{ConfigurationId};string=%S", 
   438         (uint)confId, string );
   498         (uint)confId,
       
   499         string);
   439 #endif
   500 #endif
   440     
   501     
   441     OstTraceFunctionExit0( WLANWIZARDPRIVATE_CONFIGURATION_EXIT );
   502     OstTraceFunctionExit0(WLANWIZARDPRIVATE_CONFIGURATION_EXIT);
   442     return mConfigurations[confId];
   503     return mConfigurations[confId];
   443 }
   504 }
   444 
   505 
   445 /*!
   506 /*!
   446    See WlanWizardHelper::setConfiguration().
   507    See WlanWizardHelper::setConfiguration().
   447  */
   508  */
   448 void WlanWizardPrivate::setConfiguration(
   509 void WlanWizardPrivate::setConfiguration(
   449     ConfigurationId confId, 
   510     ConfigurationId confId, 
   450     const QVariant &value)
   511     const QVariant &value)
   451 {
   512 {
   452 OstTraceFunctionEntry0( WLANWIZARDPRIVATE_SETCONFIGURATION_ENTRY );
   513     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_SETCONFIGURATION_ENTRY);
       
   514     
   453 #ifdef OST_TRACE_COMPILER_IN_USE
   515 #ifdef OST_TRACE_COMPILER_IN_USE
   454     QString tmp;
   516     QString tmp;
   455     QDebug tmpStream(&tmp);
   517     QDebug tmpStream(&tmp);
   456     tmpStream << value;
   518     tmpStream << value;
   457     TPtrC16 string( tmp.utf16(), tmp.length() );
   519     TPtrC16 string( tmp.utf16(), tmp.length() );
   458     
   520     
   459     OstTraceExt2( TRACE_NORMAL, WLANWIZARDPRIVATE_SETCONFIGURATION, 
   521     OstTraceExt2(
       
   522         TRACE_NORMAL,
       
   523         WLANWIZARDPRIVATE_SETCONFIGURATION, 
   460         "WlanWizardPrivate::setConfiguration;"
   524         "WlanWizardPrivate::setConfiguration;"
   461         "confId=%{ConfigurationId};string=%S", 
   525         "confId=%{ConfigurationId};string=%S", 
   462         (uint)confId, string );
   526         (uint)confId,
       
   527         string);
   463 #endif
   528 #endif
   464 
   529 
   465     mConfigurations[confId] = value;
   530     mConfigurations[confId] = value;
   466     OstTraceFunctionExit0( WLANWIZARDPRIVATE_SETCONFIGURATION_EXIT );
   531     
       
   532     OstTraceFunctionExit0(WLANWIZARDPRIVATE_SETCONFIGURATION_EXIT);
   467 }
   533 }
   468 
   534 
   469 /*!
   535 /*!
   470  * See WlanWizardHelper::clearConfiguration().
   536  * See WlanWizardHelper::clearConfiguration().
   471  */
   537  */
   472 void WlanWizardPrivate::clearConfiguration(ConfigurationId confId)
   538 void WlanWizardPrivate::clearConfiguration(ConfigurationId confId)
   473 {
   539 {
   474     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_CLEARCONFIGURATION_ENTRY );
   540     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_CLEARCONFIGURATION_ENTRY);
   475     OstTrace1( TRACE_FLOW, WLANWIZARDPRIVATE_CLEARCONFIGURATION,
   541     
       
   542     OstTrace1(
       
   543         TRACE_FLOW,
       
   544         WLANWIZARDPRIVATE_CLEARCONFIGURATION,
   476         "WlanWizardPrivate::clearConfiguration;confId=%{ConfigurationId}",
   545         "WlanWizardPrivate::clearConfiguration;confId=%{ConfigurationId}",
   477         (uint)confId );
   546         (uint)confId);
   478     
   547     
   479     mConfigurations.remove(confId);
   548     mConfigurations.remove(confId);
   480     OstTraceFunctionExit0( WLANWIZARDPRIVATE_CLEARCONFIGURATION_EXIT );
   549     
       
   550     OstTraceFunctionExit0(WLANWIZARDPRIVATE_CLEARCONFIGURATION_EXIT);
   481 }
   551 }
   482 
   552 
   483 /*!
   553 /*!
   484  * See WlanWizardHelper::configurationExists().
   554  * See WlanWizardHelper::configurationExists().
   485  */
   555  */
   486 bool WlanWizardPrivate::configurationExists(ConfigurationId confId)
   556 bool WlanWizardPrivate::configurationExists(ConfigurationId confId)
   487 {
   557 {
   488     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_CONFIGURATIONEXISTS_ENTRY );
   558     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_CONFIGURATIONEXISTS_ENTRY);
   489     OstTrace1( TRACE_DUMP, WLANWIZARDPRIVATE_CONFIGURATIONEXISTS,
   559     
       
   560     OstTrace1(
       
   561         TRACE_DUMP,
       
   562         WLANWIZARDPRIVATE_CONFIGURATIONEXISTS,
   490         "WlanWizardPrivate::configurationExists;confId=%{ConfigurationId}",
   563         "WlanWizardPrivate::configurationExists;confId=%{ConfigurationId}",
   491         (uint)confId );
   564         (uint)confId);
   492     OstTraceFunctionExit0( WLANWIZARDPRIVATE_CONFIGURATIONEXISTS_EXIT );
   565     
       
   566     OstTraceFunctionExit0(WLANWIZARDPRIVATE_CONFIGURATIONEXISTS_EXIT);
   493     return mConfigurations[confId].isValid();
   567     return mConfigurations[confId].isValid();
   494 }
   568 }
   495     
   569     
   496 /*!
   570 /*!
   497    See WlanWizardHelper::enableNextButton().
   571    See WlanWizardHelper::enableNextButton().
   498  */
   572  */
   499 void WlanWizardPrivate::enableNextButton(bool enable)
   573 void WlanWizardPrivate::enableNextButton(bool enable)
   500 {
   574 {
   501     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_ENABLENEXTBUTTON_ENTRY );
   575     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_ENABLENEXTBUTTON_ENTRY);
   502     OstTraceExt2( TRACE_FLOW, WLANWIZARDPRIVATE_ENABLENEXTBUTTON,
   576     
       
   577     OstTraceExt2(
       
   578         TRACE_FLOW,
       
   579         WLANWIZARDPRIVATE_ENABLENEXTBUTTON,
   503         "WlanWizardPrivate::enableNextButton;this=%x;enable=%x",
   580         "WlanWizardPrivate::enableNextButton;this=%x;enable=%x",
   504         (unsigned)this, (uint)enable );
   581         (unsigned)this,
       
   582         (uint)enable);
   505     mActionNext->setEnabled(enable);
   583     mActionNext->setEnabled(enable);
   506     OstTraceFunctionExit0( WLANWIZARDPRIVATE_ENABLENEXTBUTTON_EXIT );
   584     
       
   585     OstTraceFunctionExit0(WLANWIZARDPRIVATE_ENABLENEXTBUTTON_EXIT);
   507 }
   586 }
   508 
   587 
   509 /*!
   588 /*!
   510    See WlanWizardHelper::addPage().
   589    See WlanWizardHelper::addPage().
   511  */
   590  */
   512 void WlanWizardPrivate::addPage(int pageId, WlanWizardPage *page)
   591 void WlanWizardPrivate::addPage(int pageId, WlanWizardPage *page)
   513 {
   592 {
   514     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_ADDPAGE_ENTRY );
   593     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_ADDPAGE_ENTRY);
   515     OstTraceExt3( TRACE_FLOW, WLANWIZARDPRIVATE_ADDPAGE, 
   594     
       
   595     OstTraceExt3(
       
   596         TRACE_FLOW,
       
   597         WLANWIZARDPRIVATE_ADDPAGE, 
   516         "WlanWizardPrivate::addPage;this=%x;pageId=%{PageIds};page=%x",
   598         "WlanWizardPrivate::addPage;this=%x;pageId=%{PageIds};page=%x",
   517         (unsigned)this, pageId, (uint)(page) );
   599         (unsigned)this,
       
   600         pageId,
       
   601         (uint)(page));
   518 
   602 
   519     Q_ASSERT(!mPages.contains(pageId));
   603     Q_ASSERT(!mPages.contains(pageId));
   520     mPages[pageId] = page;
   604     mPages[pageId] = page;
   521     OstTraceFunctionExit0( WLANWIZARDPRIVATE_ADDPAGE_EXIT );
   605     
       
   606     OstTraceFunctionExit0(WLANWIZARDPRIVATE_ADDPAGE_EXIT);
   522 }
   607 }
   523 
   608 
   524 /*!
   609 /*!
   525    See WlanWizardHelper::nextPage().
   610    See WlanWizardHelper::nextPage().
   526  */
   611  */
   527 void WlanWizardPrivate::nextPage()
   612 void WlanWizardPrivate::nextPage()
   528 {
   613 {
   529     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_NEXTPAGE_ENTRY );
   614     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_NEXTPAGE_ENTRY);
   530     OstTrace1( TRACE_FLOW, WLANWIZARDPRIVATE_NEXTPAGE,
   615     
       
   616     OstTrace1(
       
   617         TRACE_FLOW,
       
   618         WLANWIZARDPRIVATE_NEXTPAGE,
   531         "WlanWizardPrivate::nextPage;this=%x",
   619         "WlanWizardPrivate::nextPage;this=%x",
   532         this );
   620         this);
   533     
   621     
   534     mPageFinished = true;
   622     mPageFinished = true;
   535     toNextPage();
   623     toNextPage();
   536     OstTraceFunctionExit0( WLANWIZARDPRIVATE_NEXTPAGE_EXIT );
   624     
       
   625     OstTraceFunctionExit0(WLANWIZARDPRIVATE_NEXTPAGE_EXIT);
   537 }
   626 }
   538 
   627 
   539 /*!
   628 /*!
   540    See WlanWizardHelper::mainWindow().
   629    See WlanWizardHelper::mainWindow().
   541  */
   630  */
   542 HbMainWindow* WlanWizardPrivate::mainWindow() const
   631 HbMainWindow* WlanWizardPrivate::mainWindow() const
   543 {
   632 {
   544     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_MAINWINDOW_ENTRY );
   633     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_MAINWINDOW_ENTRY);
   545     OstTraceFunctionExit0( WLANWIZARDPRIVATE_MAINWINDOW_EXIT );
   634     OstTraceFunctionExit0(WLANWIZARDPRIVATE_MAINWINDOW_EXIT);
   546     return mMainWindow;
   635     return mMainWindow;
   547 }
   636 }
   548 
   637 
   549 /*!
   638 /*!
   550    See WlanWizardHelper::isCurrentPage().
   639    See WlanWizardHelper::isCurrentPage().
   551  */
   640  */
   552 bool WlanWizardPrivate::isCurrentPage(const HbWidget *page) const
   641 bool WlanWizardPrivate::isCurrentPage(const HbWidget *page) const
   553 {
   642 {
   554     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_ISCURRENTPAGE_ENTRY );
   643     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_ISCURRENTPAGE_ENTRY);
       
   644     
   555     bool ret = false;
   645     bool ret = false;
   556     if (mStackedWidget->currentWidget() == page) {
   646     if (mStackedWidget->currentWidget() == page) {
   557         ret = true;
   647         ret = true;
   558     }
   648     }
   559     
   649     
   560     OstTraceExt2( TRACE_FLOW, WLANWIZARDPRIVATE_ISCURRENTPAGE, 
   650     OstTraceExt2(
       
   651         TRACE_FLOW,
       
   652         WLANWIZARDPRIVATE_ISCURRENTPAGE, 
   561         "WlanWizardPrivate::isCurrentPage;page=%x;ret=%d", 
   653         "WlanWizardPrivate::isCurrentPage;page=%x;ret=%d", 
   562         (uint)page, ret);
   654         (uint)page,
   563     
   655         ret);
   564     OstTraceFunctionExit0( WLANWIZARDPRIVATE_ISCURRENTPAGE_EXIT );
   656     
       
   657     OstTraceFunctionExit0(WLANWIZARDPRIVATE_ISCURRENTPAGE_EXIT);
   565     return ret;
   658     return ret;
   566 }
   659 }
   567 
   660 
   568 /*!
   661 /*!
   569    See WlanWizardHelper::nextPageId()
   662    See WlanWizardHelper::nextPageId()
   570  */
   663  */
   571 int WlanWizardPrivate::nextPageId(bool useWps)
   664 int WlanWizardPrivate::nextPageId(bool useWps)
   572 {
   665 {
   573     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_NEXTPAGEID_ENTRY );
   666     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_NEXTPAGEID_ENTRY);
       
   667     
   574     int ret;
   668     int ret;
   575     if (useWps) {
   669     if (useWps) {
   576         ret = WlanWizardPage::PageWpsStart;
   670         ret = WlanWizardPage::PageWpsStart;
   577     } else {
   671     } else {
   578         int secMode = configuration(WlanWizardHelper::ConfSecurityMode).toInt();
   672         int secMode = configuration(WlanWizardHelper::ConfSecurityMode).toInt();
   603             ret = WlanWizardPageInternal::PageProcessSettings;
   697             ret = WlanWizardPageInternal::PageProcessSettings;
   604             break;
   698             break;
   605         }
   699         }
   606     }
   700     }
   607 
   701 
   608     OstTraceExt3( TRACE_NORMAL, WLANWIZARDPRIVATE_NEXTPAGEID,
   702     OstTraceExt3(
       
   703         TRACE_NORMAL,
       
   704         WLANWIZARDPRIVATE_NEXTPAGEID,
   609         "WlanWizardPrivate::nextPageId;this=%x;useWps=%x;ret=%{PageIds}",
   705         "WlanWizardPrivate::nextPageId;this=%x;useWps=%x;ret=%{PageIds}",
   610         ( unsigned )this, ( TUint )( useWps ), ret );
   706         (unsigned)this,
   611 
   707         (TUint)(useWps),
   612     OstTraceFunctionExit0( WLANWIZARDPRIVATE_NEXTPAGEID_EXIT );
   708         ret);
       
   709 
       
   710     OstTraceFunctionExit0(WLANWIZARDPRIVATE_NEXTPAGEID_EXIT);
   613     return ret;
   711     return ret;
   614 }
   712 }
   615 
   713 
   616 /*!
   714 /*!
   617    Called when Cancel toolbar button is pressed. In case IAP has been created
   715    Called when Cancel toolbar button is pressed. In case IAP has been created
   620    
   718    
   621    Indicates also to the current wizard page that cancel has been pressed.
   719    Indicates also to the current wizard page that cancel has been pressed.
   622  */
   720  */
   623 void WlanWizardPrivate::cancelTriggered()
   721 void WlanWizardPrivate::cancelTriggered()
   624 {
   722 {
   625     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_CANCELTRIGGERED_ENTRY );
   723     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_CANCELTRIGGERED_ENTRY);
   626     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_CANCELTRIGGERED,
   724     
       
   725     OstTrace1(
       
   726         TRACE_BORDER,
       
   727         WLANWIZARDPRIVATE_CANCELTRIGGERED,
   627         "WlanWizardPrivate::cancelTriggered;this=%x",
   728         "WlanWizardPrivate::cancelTriggered;this=%x",
   628         this );
   729         this);
   629     
   730     
   630     // Disconnect receiving more signals from any actions
   731     // Disconnect receiving more signals from any actions
   631     disconnectActions();
   732     disconnectActions();
   632     
   733     
   633     mPageTimer->stop();
   734     mPageTimer->stop();
   648         setConfiguration(ConfIapId, WlanQtUtils::IapIdNone);
   749         setConfiguration(ConfIapId, WlanQtUtils::IapIdNone);
   649     }
   750     }
   650     closeViews();
   751     closeViews();
   651     Q_ASSERT(q_ptr);
   752     Q_ASSERT(q_ptr);
   652 
   753 
   653     OstTrace0( TRACE_BORDER, WLANWIZARDPRIVATE_CANCELTRIGGERED_EMIT,
   754     OstTrace0(
   654         "WlanWizardPrivate::cancelTriggered - emit cancelled()" );
   755         TRACE_BORDER,
       
   756         WLANWIZARDPRIVATE_CANCELTRIGGERED_EMIT,
       
   757         "WlanWizardPrivate::cancelTriggered - emit cancelled()");
   655     
   758     
   656     emit q_ptr->cancelled();
   759     emit q_ptr->cancelled();
   657     
   760     
   658     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_CANCELTRIGGERED_DONE,
   761     OstTrace1(
   659         "WlanWizardPrivate::cancelTriggered - Done;this=%x", this );
   762         TRACE_BORDER,
   660     OstTraceFunctionExit0( WLANWIZARDPRIVATE_CANCELTRIGGERED_EXIT );
   763         WLANWIZARDPRIVATE_CANCELTRIGGERED_DONE,
       
   764         "WlanWizardPrivate::cancelTriggered - Done;this=%x",
       
   765         this);
       
   766     
       
   767     OstTraceFunctionExit0(WLANWIZARDPRIVATE_CANCELTRIGGERED_EXIT);
   661 }
   768 }
   662 
   769 
   663 /*!
   770 /*!
   664    Called when Previous toolbar button is pressed. Shows the previous wizard 
   771    Called when Previous toolbar button is pressed. Shows the previous wizard 
   665    page in stacked widget and indicates wizard page that previous has been 
   772    page in stacked widget and indicates wizard page that previous has been 
   666    pressed.
   773    pressed.
   667  */
   774  */
   668 void WlanWizardPrivate::previousTriggered()
   775 void WlanWizardPrivate::previousTriggered()
   669 {
   776 {
   670     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_PREVIOUSTRIGGERED_ENTRY );
   777     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_PREVIOUSTRIGGERED_ENTRY);
   671     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_PREVIOUSTRIGGERED,
   778     
       
   779     OstTrace1(
       
   780         TRACE_BORDER,
       
   781         WLANWIZARDPRIVATE_PREVIOUSTRIGGERED,
   672         "WlanWizardPrivate::previousTriggered;this=%x",
   782         "WlanWizardPrivate::previousTriggered;this=%x",
   673         this );
   783         this);
   674     
   784     
   675     mPageTimer->stop();
   785     mPageTimer->stop();
   676 
   786 
   677     int index = mStackedWidget->currentIndex();
   787     int index = mStackedWidget->currentIndex();
   678     HbWidget *widget = qobject_cast<HbWidget*>(mStackedWidget->currentWidget());
   788     HbWidget *widget = qobject_cast<HbWidget*>(mStackedWidget->currentWidget());
   695     // In error case if page (value) is not found default contructed key is 
   805     // In error case if page (value) is not found default contructed key is 
   696     // returned, in this case default value for int is 0 which means PageNone.
   806     // returned, in this case default value for int is 0 which means PageNone.
   697     updateFrame(mPages.key(page));
   807     updateFrame(mPages.key(page));
   698     enableNextButton(page->showPage());
   808     enableNextButton(page->showPage());
   699     
   809     
   700     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_PREVIOUSTRIGGERED_DONE,
   810     OstTrace1(
       
   811         TRACE_BORDER,
       
   812         WLANWIZARDPRIVATE_PREVIOUSTRIGGERED_DONE,
   701         "WlanWizardPrivate::previousTriggered - Done;this=%x",
   813         "WlanWizardPrivate::previousTriggered - Done;this=%x",
   702         this );
   814         this);
   703     OstTraceFunctionExit0( WLANWIZARDPRIVATE_PREVIOUSTRIGGERED_EXIT );
   815     
       
   816     OstTraceFunctionExit0(WLANWIZARDPRIVATE_PREVIOUSTRIGGERED_EXIT);
   704 }
   817 }
   705 
   818 
   706 /*!
   819 /*!
   707    Next toolbar button has been pressed. Wizard framework asks from the current
   820    Next toolbar button has been pressed. Wizard framework asks from the current
   708    page what should be the next page id and shows it.
   821    page what should be the next page id and shows it.
   709  */
   822  */
   710 void WlanWizardPrivate::nextTriggered()
   823 void WlanWizardPrivate::nextTriggered()
   711 {
   824 {
   712     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_NEXTTRIGGERED_ENTRY );
   825     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_NEXTTRIGGERED_ENTRY);
   713     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_NEXTTRIGGERED,
   826     
       
   827     OstTrace1(
       
   828         TRACE_BORDER,
       
   829         WLANWIZARDPRIVATE_NEXTTRIGGERED,
   714         "WlanWizardPrivate::nextTriggered;this=%x",
   830         "WlanWizardPrivate::nextTriggered;this=%x",
   715         this );
   831         this);
   716     
   832     
   717     mPageTimer->stop();
   833     mPageTimer->stop();
   718 
   834 
   719     HbWidget *widget = qobject_cast<HbWidget*>(mStackedWidget->currentWidget());
   835     HbWidget *widget = qobject_cast<HbWidget*>(mStackedWidget->currentWidget());
   720     Q_ASSERT(widget);
   836     Q_ASSERT(widget);
   721 
   837 
   722     bool removeFromStack;
   838     bool removeFromStack;
   723     int pageId = mPageMapper[widget]->nextId(removeFromStack);
   839     int pageId = mPageMapper[widget]->nextId(removeFromStack);
   724     showPage(pageId, removeFromStack);
   840     showPage(pageId, removeFromStack);
   725     
   841     
   726     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_NEXTTRIGGERED_DONE,
   842     OstTrace1(
       
   843         TRACE_BORDER,
       
   844         WLANWIZARDPRIVATE_NEXTTRIGGERED_DONE,
   727         "WlanWizardPrivate::nextTriggered - Done;this=%x",
   845         "WlanWizardPrivate::nextTriggered - Done;this=%x",
   728         this );
   846         this);
   729     OstTraceFunctionExit0( WLANWIZARDPRIVATE_NEXTTRIGGERED_EXIT );
   847     
       
   848     OstTraceFunctionExit0(WLANWIZARDPRIVATE_NEXTTRIGGERED_EXIT);
   730 }
   849 }
   731 
   850 
   732 /*!
   851 /*!
   733    Finish button has been pressed. Closes the wizard and sends finished()
   852    Finish button has been pressed. Closes the wizard and sends finished()
   734    signal to the client. 
   853    signal to the client. 
   735  */
   854  */
   736 void WlanWizardPrivate::finishTriggered()
   855 void WlanWizardPrivate::finishTriggered()
   737 {
   856 {
   738     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_FINISHTRIGGERED_ENTRY );
   857     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_FINISHTRIGGERED_ENTRY);
   739     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_FINISHTRIGGERED,
   858     
       
   859     OstTrace1(
       
   860         TRACE_BORDER,
       
   861         WLANWIZARDPRIVATE_FINISHTRIGGERED,
   740         "WlanWizardPrivate::finishTriggered;this=%x",
   862         "WlanWizardPrivate::finishTriggered;this=%x",
   741         this );
   863         this);
   742     
   864     
   743     // Disconnect receiving more signals from any actions
   865     // Disconnect receiving more signals from any actions
   744     disconnectActions();
   866     disconnectActions();
   745     
   867     
   746     mPageTimer->stop();
   868     mPageTimer->stop();
   749     Q_ASSERT(q_ptr);
   871     Q_ASSERT(q_ptr);
   750     emit q_ptr->finished(
   872     emit q_ptr->finished(
   751         configuration(ConfIapId).toInt(), 
   873         configuration(ConfIapId).toInt(), 
   752         configuration(ConfConnected).toBool());
   874         configuration(ConfConnected).toBool());
   753     
   875     
   754     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_FINISHTRIGGERED_DONE,
   876     OstTrace1(
       
   877         TRACE_BORDER,
       
   878         WLANWIZARDPRIVATE_FINISHTRIGGERED_DONE,
   755         "WlanWizardPrivate::finishTriggered - Done;this=%x",
   879         "WlanWizardPrivate::finishTriggered - Done;this=%x",
   756         this );
   880         this);
   757     OstTraceFunctionExit0( WLANWIZARDPRIVATE_FINISHTRIGGERED_EXIT );
   881     
       
   882     OstTraceFunctionExit0(WLANWIZARDPRIVATE_FINISHTRIGGERED_EXIT);
   758 }
   883 }
   759 
   884 
   760 /*!
   885 /*!
   761    In case wizard page is using timer protection for the page, this is the
   886    In case wizard page is using timer protection for the page, this is the
   762    slot to handle the callback from the timer.
   887    slot to handle the callback from the timer.
   763  */
   888  */
   764 void WlanWizardPrivate::onTimeOut()
   889 void WlanWizardPrivate::onTimeOut()
   765 {
   890 {
   766     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_ONTIMEOUT_ENTRY );
   891     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_ONTIMEOUT_ENTRY);
   767     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_ONTIMEOUT,
   892     
       
   893     OstTrace1(
       
   894         TRACE_BORDER,
       
   895         WLANWIZARDPRIVATE_ONTIMEOUT,
   768         "WlanWizardPrivate::onTimeOut;this=%x",
   896         "WlanWizardPrivate::onTimeOut;this=%x",
   769         this );
   897         this);
   770     
   898     
   771     toNextPage();
   899     toNextPage();
   772     
   900     
   773     OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_ONTIMEOUT_DONE,
   901     OstTrace1(
       
   902         TRACE_BORDER,
       
   903         WLANWIZARDPRIVATE_ONTIMEOUT_DONE,
   774         "WlanWizardPrivate::onTimeOut - Done;this=%x",
   904         "WlanWizardPrivate::onTimeOut - Done;this=%x",
   775         this );
   905         this);
   776     OstTraceFunctionExit0( WLANWIZARDPRIVATE_ONTIMEOUT_EXIT );
   906     
       
   907     OstTraceFunctionExit0(WLANWIZARDPRIVATE_ONTIMEOUT_EXIT);
   777 }
   908 }
   778 
   909 
   779 /*!
   910 /*!
   780    Slot to start wizard page operation asynchronous. Starts also the timer
   911    Slot to start wizard page operation asynchronous. Starts also the timer
   781    to protect the wizard page.
   912    to protect the wizard page.
   782  */
   913  */
   783 void WlanWizardPrivate::startPageOperation()
   914 void WlanWizardPrivate::startPageOperation()
   784 {
   915 {
   785     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_STARTPAGEOPERATION_ENTRY );
   916     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_STARTPAGEOPERATION_ENTRY);
       
   917     
   786     // Process this if wizard has not been closed
   918     // Process this if wizard has not been closed
   787     if (mClosed == false) {
   919     if (mClosed == false) {
   788         OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_STARTPAGEOPERATION,
   920         OstTrace1(
       
   921             TRACE_BORDER,
       
   922             WLANWIZARDPRIVATE_STARTPAGEOPERATION,
   789             "WlanWizardPrivate::startPageOperation;this=%x",
   923             "WlanWizardPrivate::startPageOperation;this=%x",
   790             this );
   924             this);
   791         
   925         
   792         HbWidget *widget = 
   926         HbWidget *widget = 
   793             qobject_cast<HbWidget*>(mStackedWidget->currentWidget());
   927             qobject_cast<HbWidget*>(mStackedWidget->currentWidget());
   794         Q_ASSERT(widget);
   928         Q_ASSERT(widget);
   795         mPageFinished = false;
   929         mPageFinished = false;
   796         mPageTimer->start(PageTimeout);
   930         mPageTimer->start(PageTimeout);
   797         mPageMapper[widget]->startOperation();
   931         mPageMapper[widget]->startOperation();
   798         
   932         
   799         OstTrace1( TRACE_BORDER, WLANWIZARDPRIVATE_STARTPAGEOPERATION_DONE,
   933         OstTrace1(
       
   934             TRACE_BORDER,
       
   935             WLANWIZARDPRIVATE_STARTPAGEOPERATION_DONE,
   800             "WlanWizardPrivate::startPageOperation - DONE;this=%x",
   936             "WlanWizardPrivate::startPageOperation - DONE;this=%x",
   801             this );
   937             this);
   802     }
   938     }
   803     OstTraceFunctionExit0( WLANWIZARDPRIVATE_STARTPAGEOPERATION_EXIT );
   939     
       
   940     OstTraceFunctionExit0(WLANWIZARDPRIVATE_STARTPAGEOPERATION_EXIT);
   804 }
   941 }
   805 
   942 
   806 /*!
   943 /*!
   807    In case the wizard page uses timer protection this method determines when
   944    In case the wizard page uses timer protection this method determines when
   808    the next page is shown.
   945    the next page is shown.
   809  */
   946  */
   810 void WlanWizardPrivate::toNextPage()
   947 void WlanWizardPrivate::toNextPage()
   811 {
   948 {
   812     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_TONEXTPAGE_ENTRY );
   949     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_TONEXTPAGE_ENTRY);
       
   950     
   813     if (mPageFinished && !(mPageTimer->isActive())) {
   951     if (mPageFinished && !(mPageTimer->isActive())) {
   814         OstTrace1( TRACE_FLOW, WLANWIZARDPRIVATE_TONEXTPAGE,
   952         OstTrace1(
       
   953             TRACE_FLOW,
       
   954             WLANWIZARDPRIVATE_TONEXTPAGE,
   815             "WlanWizardPrivate::toNextPage;this=%x",
   955             "WlanWizardPrivate::toNextPage;this=%x",
   816             this );
   956             this);
   817         
   957         
   818         // process this asynchronous. Main purpose is to release the current
   958         // process this asynchronous. Main purpose is to release the current
   819         // call stack and process the page change using new call stack
   959         // call stack and process the page change using new call stack
   820         QMetaObject::invokeMethod(this, "nextTriggered", Qt::QueuedConnection);
   960         QMetaObject::invokeMethod(this, "nextTriggered", Qt::QueuedConnection);
   821     }
   961     }
   822     OstTraceFunctionExit0( WLANWIZARDPRIVATE_TONEXTPAGE_EXIT );
   962     
       
   963     OstTraceFunctionExit0(WLANWIZARDPRIVATE_TONEXTPAGE_EXIT);
   823 }
   964 }
   824 
   965 
   825 /*!
   966 /*!
   826    Show requested page and removes the current wizard page from the stack if
   967    Show requested page and removes the current wizard page from the stack if
   827    required. This method updates the title and toolbar accordingly.
   968    required. This method updates the title and toolbar accordingly.
   832    @param [in] removeFromStack if true the current wizard page is removed from
   973    @param [in] removeFromStack if true the current wizard page is removed from
   833                                the stackedwidget. 
   974                                the stackedwidget. 
   834  */
   975  */
   835 void WlanWizardPrivate::showPage(int pageId, bool removeFromStack)
   976 void WlanWizardPrivate::showPage(int pageId, bool removeFromStack)
   836 {
   977 {
   837     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_SHOWPAGE_ENTRY );
   978     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_SHOWPAGE_ENTRY);
   838     OstTraceExt3( TRACE_FLOW, WLANWIZARDPRIVATE_SHOWPAGE,
   979     
       
   980     OstTraceExt3(
       
   981         TRACE_FLOW,
       
   982         WLANWIZARDPRIVATE_SHOWPAGE,
   839         "WlanWizardPrivate::showPage;this=%x;"
   983         "WlanWizardPrivate::showPage;this=%x;"
   840         "pageId=%{PageIds};removeFromStack=%x",
   984         "pageId=%{PageIds};removeFromStack=%x",
   841         ( unsigned )this, pageId, ( TUint )( removeFromStack ) );
   985         (unsigned)this,
       
   986         pageId,
       
   987         (TUint)(removeFromStack));
   842     
   988     
   843     // PageNone is returned by wizard pages when some validation of page content
   989     // PageNone is returned by wizard pages when some validation of page content
   844     // has not passed and the page does not want to process wizard to next page
   990     // has not passed and the page does not want to process wizard to next page
   845     if (pageId == WlanWizardPage::PageNone) {
   991     if (pageId == WlanWizardPage::PageNone) {
   846         OstTraceFunctionExit0( WLANWIZARDPRIVATE_SHOWPAGE_EXIT );
   992         OstTraceFunctionExit0(WLANWIZARDPRIVATE_SHOWPAGE_EXIT);
   847         return;
   993         return;
   848     }
   994     }
   849     
   995     
   850     //  PageProcessSettings is shown only when WLAN AP is found in scanning
   996     //  PageProcessSettings is shown only when WLAN AP is found in scanning
   851     // 1/ when client calls setParameters()
   997     // 1/ when client calls setParameters()
   862                 
  1008                 
   863                 setConfiguration(
  1009                 setConfiguration(
   864                     ConfGenericErrorPageStepsBackwards, 
  1010                     ConfGenericErrorPageStepsBackwards, 
   865                     WlanWizardPage::OneStepBackwards);
  1011                     WlanWizardPage::OneStepBackwards);
   866             }
  1012             }
   867             OstTraceExt2( TRACE_FLOW, WLANWIZARDPRIVATE_SHOWPAGE_UPDATE,
  1013             OstTraceExt2(
       
  1014                 TRACE_FLOW,
       
  1015                 WLANWIZARDPRIVATE_SHOWPAGE_UPDATE,
   868                 "WlanWizardPrivate::showPage - change page;this=%x;"
  1016                 "WlanWizardPrivate::showPage - change page;this=%x;"
   869                 "pageId=%{PageIds}",
  1017                 "pageId=%{PageIds}",
   870                 ( unsigned )this, pageId);
  1018                 (unsigned)this,
       
  1019                 pageId);
   871         }
  1020         }
   872     }
  1021     }
   873 
  1022 
   874     // Create visualization of next page and store it to mappers
  1023     // Create visualization of next page and store it to mappers
   875     WlanWizardPage* page = mPages[pageId];
  1024     WlanWizardPage* page = mPages[pageId];
   899     // If wizard page needs to start some control operation trigger it 
  1048     // If wizard page needs to start some control operation trigger it 
   900     // asyncronously so that the UI gets more priority to get painted correctly
  1049     // asyncronously so that the UI gets more priority to get painted correctly
   901     // before any operation takes place in wizard page. This is important for
  1050     // before any operation takes place in wizard page. This is important for
   902     // timer protected pages. Makes wizard to work smother from UI perspective
  1051     // timer protected pages. Makes wizard to work smother from UI perspective
   903     if (page->requiresStartOperation()) {
  1052     if (page->requiresStartOperation()) {
   904         OstTrace0( TRACE_FLOW, WLANWIZARDPRIVATE_SHOWPAGE_INVOKE,
  1053         OstTrace0(
   905             "WlanWizardPrivate::showPage - Invoke startOperation" );
  1054             TRACE_FLOW,
       
  1055             WLANWIZARDPRIVATE_SHOWPAGE_INVOKE,
       
  1056             "WlanWizardPrivate::showPage - Invoke startOperation");
   906         
  1057         
   907         QMetaObject::invokeMethod(this, "startPageOperation", Qt::QueuedConnection);
  1058         QMetaObject::invokeMethod(this, "startPageOperation", Qt::QueuedConnection);
   908     }
  1059     }
   909     OstTraceFunctionExit0( DUP1_WLANWIZARDPRIVATE_SHOWPAGE_EXIT );
  1060     
       
  1061     OstTraceFunctionExit0(DUP1_WLANWIZARDPRIVATE_SHOWPAGE_EXIT);
   910 }
  1062 }
   911 
  1063 
   912 /*!
  1064 /*!
   913    Creates all control objects of WLAN wizard pages which are inherited from
  1065    Creates all control objects of WLAN wizard pages which are inherited from
   914    WlanWizardPage and adds those into a internal database. 
  1066    WlanWizardPage and adds those into a internal database. 
   915  */
  1067  */
   916 void WlanWizardPrivate::createPages()
  1068 void WlanWizardPrivate::createPages()
   917 {
  1069 {
   918     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_CREATEPAGES_ENTRY );
  1070     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_CREATEPAGES_ENTRY);
       
  1071     
   919     OstTrace0(
  1072     OstTrace0(
   920         TRACE_NORMAL,
  1073         TRACE_NORMAL,
   921         WLANWIZARDPRIVATE_CREATEPAGES,
  1074         WLANWIZARDPRIVATE_CREATEPAGES,
   922         "WlanWizardPrivate::createPages");
  1075         "WlanWizardPrivate::createPages");
   923     
  1076     
   950         new WlanWizardPageNetworkMode(this));
  1103         new WlanWizardPageNetworkMode(this));
   951     
  1104     
   952     addPage(
  1105     addPage(
   953         WlanWizardPageInternal::PageNetworkSecurity, 
  1106         WlanWizardPageInternal::PageNetworkSecurity, 
   954         new WlanWizardPageSecurityMode(this));
  1107         new WlanWizardPageSecurityMode(this));
   955     OstTraceFunctionExit0( WLANWIZARDPRIVATE_CREATEPAGES_EXIT );
  1108     
       
  1109     OstTraceFunctionExit0(WLANWIZARDPRIVATE_CREATEPAGES_EXIT);
   956 }
  1110 }
   957 
  1111 
   958 /*!
  1112 /*!
   959    Called when wizard is closed 
  1113    Called when wizard is closed 
   960    - cancelled by the user
  1114    - cancelled by the user
   961    - finished by the user
  1115    - finished by the user
   962  */
  1116  */
   963 void WlanWizardPrivate::closeViews()
  1117 void WlanWizardPrivate::closeViews()
   964 {
  1118 {
   965     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_CLOSEVIEWS_ENTRY );
  1119     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_CLOSEVIEWS_ENTRY);
       
  1120     
   966     mDialog->hide();
  1121     mDialog->hide();
   967     mClosed = true;
  1122     mClosed = true;
   968     OstTraceFunctionExit0( WLANWIZARDPRIVATE_CLOSEVIEWS_EXIT );
  1123     
       
  1124     OstTraceFunctionExit0(WLANWIZARDPRIVATE_CLOSEVIEWS_EXIT);
   969 }
  1125 }
   970 
  1126 
   971 /*!
  1127 /*!
   972    This method takes care of the title of wizard and toolbutton. Correct items
  1128    This method takes care of the title of wizard and toolbutton. Correct items
   973    are selected based on the \a pageId and the amount of objects in the stacked
  1129    are selected based on the \a pageId and the amount of objects in the stacked
   975    
  1131    
   976    @param [in] pageId Wizard Page Id
  1132    @param [in] pageId Wizard Page Id
   977  */
  1133  */
   978 void WlanWizardPrivate::updateFrame(int pageId)
  1134 void WlanWizardPrivate::updateFrame(int pageId)
   979 {
  1135 {
   980     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_UPDATEFRAME_ENTRY );
  1136     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_UPDATEFRAME_ENTRY);
       
  1137     
   981     int currentIndex = mStackedWidget->currentIndex();
  1138     int currentIndex = mStackedWidget->currentIndex();
   982 
  1139 
   983     OstTraceExt3( TRACE_FLOW, WLANWIZARDPRIVATE_UPDATEFRAME, 
  1140     OstTraceExt3(
       
  1141         TRACE_FLOW,
       
  1142         WLANWIZARDPRIVATE_UPDATEFRAME, 
   984         "WlanWizardPrivate::updateFrame;this=%x;pageId=%{PageIds};currentIndex=%d",
  1143         "WlanWizardPrivate::updateFrame;this=%x;pageId=%{PageIds};currentIndex=%d",
   985         (unsigned)this, pageId, (uint)(currentIndex) );
  1144         (unsigned)this,
       
  1145         pageId,
       
  1146         (uint)(currentIndex));
   986     
  1147     
   987     // For last page (summary) show Finish instead of Next button
  1148     // For last page (summary) show Finish instead of Next button
   988     if (pageId == WlanWizardPageInternal::PageSummary) {
  1149     if (pageId == WlanWizardPageInternal::PageSummary) {
   989         mTitle->setPlainText(hbTrId("txt_occ_title_wlan_setup_wizard_summary"));
  1150         mTitle->setPlainText(hbTrId("txt_occ_title_wlan_setup_wizard_summary"));
   990         mActionFinish->setVisible(true);
  1151         mActionFinish->setVisible(true);
  1008             } else {
  1169             } else {
  1009                 mActionPrevious->setEnabled(true);
  1170                 mActionPrevious->setEnabled(true);
  1010             }
  1171             }
  1011         }
  1172         }
  1012     }
  1173     }
  1013     OstTraceFunctionExit0( WLANWIZARDPRIVATE_UPDATEFRAME_EXIT );
  1174     
       
  1175     OstTraceFunctionExit0(WLANWIZARDPRIVATE_UPDATEFRAME_EXIT);
  1014 }
  1176 }
  1015 
  1177 
  1016 /*!
  1178 /*!
  1017    Loads widgets and objects from the docml file. 
  1179    Loads widgets and objects from the docml file. 
  1018  */
  1180  */
  1019 void WlanWizardPrivate::loadDocml()
  1181 void WlanWizardPrivate::loadDocml()
  1020 {
  1182 {
  1021     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_LOADDOCML_ENTRY );
  1183     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_LOADDOCML_ENTRY);
       
  1184     
  1022     bool ok = true;
  1185     bool ok = true;
  1023     
  1186     
  1024     mDocLoader->load(":/docml/occ_wlan_wizard_main.docml", &ok);
  1187     mDocLoader->load(":/docml/occ_wlan_wizard_main.docml", &ok);
  1025     Q_ASSERT(ok);
  1188     Q_ASSERT(ok);
  1026 
  1189 
  1064     ok = true;
  1227     ok = true;
  1065     ok = connect(mPageTimer, SIGNAL(timeout()), this, SLOT(onTimeOut()));
  1228     ok = connect(mPageTimer, SIGNAL(timeout()), this, SLOT(onTimeOut()));
  1066     Q_ASSERT(ok);
  1229     Q_ASSERT(ok);
  1067     
  1230     
  1068     ok = connect(
  1231     ok = connect(
  1069         mActionNext, SIGNAL(triggered()), 
  1232         mActionNext,
  1070         this, SLOT(nextTriggered()));
  1233         SIGNAL(triggered()), 
       
  1234         this,
       
  1235         SLOT(nextTriggered()));
  1071     Q_ASSERT(ok);
  1236     Q_ASSERT(ok);
  1072     
  1237     
  1073     ok = connect(
  1238     ok = connect(
  1074         mActionPrevious, SIGNAL(triggered()), 
  1239         mActionPrevious,
  1075         this, SLOT(previousTriggered()));
  1240         SIGNAL(triggered()), 
       
  1241         this,
       
  1242         SLOT(previousTriggered()));
  1076     Q_ASSERT(ok);
  1243     Q_ASSERT(ok);
  1077     
  1244     
  1078     ok = connect(
  1245     ok = connect(
  1079         mActionFinish, SIGNAL(triggered()), 
  1246         mActionFinish,
  1080         this, SLOT(finishTriggered()));
  1247         SIGNAL(triggered()), 
       
  1248         this,
       
  1249         SLOT(finishTriggered()));
  1081     Q_ASSERT(ok);
  1250     Q_ASSERT(ok);
  1082     
  1251     
  1083     ok = connect(
  1252     ok = connect(
  1084         mActionCancel, SIGNAL(triggered()), 
  1253         mActionCancel,
  1085         this, SLOT(cancelTriggered()));
  1254         SIGNAL(triggered()), 
       
  1255         this,
       
  1256         SLOT(cancelTriggered()));
  1086     Q_ASSERT(ok);
  1257     Q_ASSERT(ok);
  1087 
  1258 
  1088     // TODO: workaround for full screen dialog, with docml it is possible to
  1259     // TODO: workaround for full screen dialog, with docml it is possible to
  1089     // define fullscreen dialog, mut resize is not done correctly when orientation
  1260     // define fullscreen dialog, mut resize is not done correctly when orientation
  1090     // is changed. See TSW Error: MTAA-854DK8
  1261     // is changed. See TSW Error: MTAA-854DK8
  1091     ok = HbStyleLoader::registerFilePath(":/css/custom.css");
  1262     ok = HbStyleLoader::registerFilePath(":/css/custom.css");
  1092     Q_ASSERT(ok);
  1263     Q_ASSERT(ok);
  1093     OstTraceFunctionExit0( WLANWIZARDPRIVATE_LOADDOCML_EXIT );
  1264     
       
  1265     OstTraceFunctionExit0(WLANWIZARDPRIVATE_LOADDOCML_EXIT);
  1094 }
  1266 }
  1095 
  1267 
  1096 /*!
  1268 /*!
  1097    Disconnect receiving triggered() signal from any toolbar action.
  1269    Disconnect receiving triggered() signal from any toolbar action.
  1098  */
  1270  */
  1099 void WlanWizardPrivate::disconnectActions()
  1271 void WlanWizardPrivate::disconnectActions()
  1100 {
  1272 {
  1101     OstTraceFunctionEntry0( WLANWIZARDPRIVATE_DISCONNECTACTIONS_ENTRY );
  1273     OstTraceFunctionEntry0(WLANWIZARDPRIVATE_DISCONNECTACTIONS_ENTRY);
       
  1274     
  1102     disconnect(
  1275     disconnect(
  1103         mActionNext, SIGNAL(triggered()), 
  1276         mActionNext,
  1104         this, SLOT(nextTriggered()));
  1277         SIGNAL(triggered()), 
       
  1278         this,
       
  1279         SLOT(nextTriggered()));
  1105     
  1280     
  1106     disconnect(
  1281     disconnect(
  1107         mActionPrevious, SIGNAL(triggered()), 
  1282         mActionPrevious,
  1108         this, SLOT(previousTriggered()));
  1283         SIGNAL(triggered()), 
       
  1284         this,
       
  1285         SLOT(previousTriggered()));
  1109     
  1286     
  1110     disconnect(
  1287     disconnect(
  1111         mActionFinish, SIGNAL(triggered()), 
  1288         mActionFinish,
  1112         this, SLOT(finishTriggered()));
  1289         SIGNAL(triggered()), 
       
  1290         this,
       
  1291         SLOT(finishTriggered()));
  1113 
  1292 
  1114     disconnect(
  1293     disconnect(
  1115         mActionCancel, SIGNAL(triggered()), 
  1294         mActionCancel,
  1116         this, SLOT(cancelTriggered()));
  1295         SIGNAL(triggered()), 
  1117     OstTraceFunctionExit0( WLANWIZARDPRIVATE_DISCONNECTACTIONS_EXIT );
  1296         this,
  1118 }
  1297         SLOT(cancelTriggered()));
       
  1298     
       
  1299     OstTraceFunctionExit0(WLANWIZARDPRIVATE_DISCONNECTACTIONS_EXIT);
       
  1300 }