wlanutilities/wpswizard/src/wpswizard_p.cpp
changeset 58 301aeb18ae47
parent 46 2fbd1d709fe7
equal deleted inserted replaced
56:de27cc8389dd 58:301aeb18ae47
     1 /*
     1 /*
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3  * All rights reserved.
     3 * All rights reserved.
     4  * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5  * under the terms of the "Eclipse Public License v1.0"
     5 * under the terms of the "Eclipse Public License v1.0"
     6  * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8  *
     8 *
     9  * Initial Contributors:
     9 * Initial Contributors:
    10  * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11  *
    11 *
    12  * Contributors:
    12 * Contributors:
    13  *
    13 *
    14  * Description: 
    14 * Description: 
    15  *   WPS Wizard: Private implementation.
    15 * WPS Wizard: Private implementation.
    16  *
    16 */
    17  */
       
    18 
    17 
    19 // System includes
    18 // System includes
       
    19 
       
    20 #include <QGraphicsWidget>
       
    21 #include <QApplication>
       
    22 
    20 #include <HbTranslator>
    23 #include <HbTranslator>
    21 #include <HbDocumentLoader>
    24 #include <HbDocumentLoader>
    22 #include <QGraphicsWidget>
       
    23 #include <HbMainWindow>
    25 #include <HbMainWindow>
    24 #include <HbView>
    26 #include <HbView>
    25 #include <HbStackedWidget>
    27 #include <HbStackedWidget>
    26 #include <HbLabel>
    28 #include <HbLabel>
    27 #include <HbAction>
    29 #include <HbAction>
    28 #include <QApplication>
    30 
    29 #include <cmmanagerdefines_shim.h>
    31 #include <cmmanagerdefines_shim.h>
    30 
    32 
    31 // Trace includes
       
    32 #include "OstTraceDefinitions.h"
       
    33 #ifdef OST_TRACE_COMPILER_IN_USE
       
    34 #include "wpswizard_pTraces.h"
       
    35 #endif
       
    36 
       
    37 // User includes
    33 // User includes
       
    34 
    38 #include "wlanwizardhelper.h"
    35 #include "wlanwizardhelper.h"
    39 // WPS Wizard 
    36 // WPS Wizard 
    40 #include "wpswizard.h"
    37 #include "wpswizard.h"
    41 #include "wpswizard_p.h"
    38 #include "wpswizard_p.h"
    42 // Wizard Pages
    39 // Wizard Pages
    44 #include "wpswizardstepthreebutton.h"
    41 #include "wpswizardstepthreebutton.h"
    45 #include "wpswizardstepthreenumber.h"
    42 #include "wpswizardstepthreenumber.h"
    46 #include "wpswizardstepfour.h"
    43 #include "wpswizardstepfour.h"
    47 #include "wpswizardstepfive.h"
    44 #include "wpswizardstepfive.h"
    48 
    45 
       
    46 // Trace includes
       
    47 
       
    48 #include "OstTraceDefinitions.h"
       
    49 #ifdef OST_TRACE_COMPILER_IN_USE
       
    50 #include "wpswizard_pTraces.h"
       
    51 #endif
       
    52 
    49 //Forward Decalrations
    53 //Forward Decalrations
    50 
    54 
    51 // External function prototypes
    55 // External function prototypes
    52 
    56 
    53 // Local constants
    57 // Local constants
    68    @param [in] wizard WpsWizard* pointer to the framework object
    72    @param [in] wizard WpsWizard* pointer to the framework object
    69    @param [in] wizardHelper WlanWizardHelper * pointer to the wizard helpper class 
    73    @param [in] wizardHelper WlanWizardHelper * pointer to the wizard helpper class 
    70    
    74    
    71    @return WpsWizardPrivate 
    75    @return WpsWizardPrivate 
    72  */
    76  */
    73 WpsWizardPrivate::WpsWizardPrivate(WpsWizard* wizard,
    77 WpsWizardPrivate::WpsWizardPrivate(
       
    78     WpsWizard* wizard,
    74     WlanWizardHelper *wizardHelper) :
    79     WlanWizardHelper *wizardHelper) :
    75     q_ptr(wizard), 
    80     q_ptr(wizard), 
    76     mWizardHelper(wizardHelper),
    81     mWizardHelper(wizardHelper),
    77     mTranslator(new HbTranslator("wpswizardplugin")), 
    82     mTranslator(new HbTranslator("wpswizardplugin")), 
    78     mRandomNumber(0)
    83     mRandomNumber(0)
   140         mWpsAttr = mIapList[index];
   145         mWpsAttr = mIapList[index];
   141     
   146     
   142         // SSID
   147         // SSID
   143         QString ssid = QString::fromUtf8(reinterpret_cast<const char*> (mWpsAttr.iSsid.Ptr()),
   148         QString ssid = QString::fromUtf8(reinterpret_cast<const char*> (mWpsAttr.iSsid.Ptr()),
   144                 mWpsAttr.iSsid.Length());    
   149                 mWpsAttr.iSsid.Length());    
   145         mWizardHelper->setConfiguration(WlanWizardHelper::ConfSsid, ssid);
   150         mWizardHelper->setConfiguration(WlanWizardHelper::ConfName, ssid);
       
   151         mWizardHelper->setConfiguration(WlanWizardHelper::ConfSsid, ssid.toUtf8());
   146         // WEP Key1
   152         // WEP Key1
   147         QString str = QString::fromUtf8(reinterpret_cast<const char*>(mWpsAttr.iWepKey1.Ptr()),
   153         QString str = QString::fromUtf8(reinterpret_cast<const char*>(mWpsAttr.iWepKey1.Ptr()),
   148                 mWpsAttr.iWepKey1.Length());
   154                 mWpsAttr.iWepKey1.Length());
   149         mWizardHelper->setConfiguration(WlanWizardHelper::ConfKeyWep1, str);
   155         mWizardHelper->setConfiguration(WlanWizardHelper::ConfKeyWep1, str);
   150         // WEP Key2
   156         // WEP Key2