wlanutilities/wlanwizard/tsrc/ut/testwlanwizardcontext.cpp
changeset 58 301aeb18ae47
parent 56 de27cc8389dd
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 "Eclipse Public License v1.0"
     5 * under the terms of "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  */
    15 * WLAN Wizard test context.
       
    16 */
    16 
    17 
    17 // System includes
    18 // System includes
       
    19 
    18 #include <HbApplication>
    20 #include <HbApplication>
    19 #include <HbDocumentLoader>
    21 #include <HbDocumentLoader>
    20 #include <HbStackedWidget>
    22 #include <HbStackedWidget>
    21 #include <HbRadioButtonList>
    23 #include <HbRadioButtonList>
    22 #include <HbAction>
    24 #include <HbAction>
    23 #include <HbLineEdit>
    25 #include <HbLineEdit>
    24 #include <HbLabel>
    26 #include <HbLabel>
    25 #include <HbCheckBox>
    27 #include <HbCheckBox>
       
    28 #include <HbListWidget>
       
    29 #include <HbListWidgetItem>
       
    30 #include <HbParameterLengthLimiter>
       
    31 
    26 #include <QGraphicsWidget>
    32 #include <QGraphicsWidget>
    27 #include <QObjectList>
    33 #include <QObjectList>
    28 #include <QtCore>
    34 #include <QtCore>
    29 #include <QTest>
    35 #include <QTest>
    30 #include <QDebug>
    36 #include <QDebug>
    31 #include <QList>
    37 #include <QList>
    32 #include <HbListWidget>
       
    33 #include <HbListWidgetItem>
       
    34 #include <HbParameterLengthLimiter>
       
    35 
    38 
    36 // User includes
    39 // User includes
       
    40 
    37 #include "testwlanwizardcontext.h"
    41 #include "testwlanwizardcontext.h"
    38 #include "hbautotest.h"
    42 #include "hbautotest.h"
    39 #include "wlanwizard.h"
    43 #include "wlanwizard.h"
    40 #include "wlanwizard_p.h"
    44 #include "wlanwizard_p.h"
    41 #include "wlanwizardpageinternal.h"
    45 #include "wlanwizardpageinternal.h"
    76 ContextWlanApList::~ContextWlanApList()
    80 ContextWlanApList::~ContextWlanApList()
    77 {
    81 {
    78     clear();
    82     clear();
    79 }
    83 }
    80 
    84 
    81 void ContextWlanApList::Add(QString name, int netMode, int secMode, bool wpaPskInUse,
    85 void ContextWlanApList::Add(
    82     bool wpsSupported, int signalStrength)
    86     QString name,
       
    87     int netMode,
       
    88     int secMode,
       
    89     bool wpaPskInUse,
       
    90     bool wpsSupported,
       
    91     int signalStrength)
    83 {
    92 {
    84     QSharedPointer<WlanQtUtilsAp> temp = QSharedPointer<WlanQtUtilsAp>(new WlanQtUtilsAp());
    93     QSharedPointer<WlanQtUtilsAp> temp = QSharedPointer<WlanQtUtilsAp>(new WlanQtUtilsAp());
    85     temp->setValue(WlanQtUtilsAp::ConfIdSsid, name);
    94     temp->setValue(WlanQtUtilsAp::ConfIdName, name);
       
    95     temp->setValue(WlanQtUtilsAp::ConfIdSsid, name.toUtf8());
    86     temp->setValue(WlanQtUtilsAp::ConfIdConnectionMode, netMode);
    96     temp->setValue(WlanQtUtilsAp::ConfIdConnectionMode, netMode);
    87     temp->setValue(WlanQtUtilsAp::ConfIdSecurityMode, secMode);
    97     temp->setValue(WlanQtUtilsAp::ConfIdSecurityMode, secMode);
    88     temp->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, wpaPskInUse);
    98     temp->setValue(WlanQtUtilsAp::ConfIdWpaPskUse, wpaPskInUse);
    89     temp->setValue(WlanQtUtilsAp::ConfIdWpsSupported, wpsSupported);
    99     temp->setValue(WlanQtUtilsAp::ConfIdWpsSupported, wpsSupported);
    90     temp->setValue(WlanQtUtilsAp::ConfIdSignalStrength, signalStrength);
   100     temp->setValue(WlanQtUtilsAp::ConfIdSignalStrength, signalStrength);
   962             ret = false;
   972             ret = false;
   963         }
   973         }
   964     }
   974     }
   965     return ret;
   975     return ret;
   966 }
   976 }
   967 
       
   968