wlanutilities/wlanwizard/inc/wlanwizardpagenetworkmode.h
changeset 31 e8f4211554fb
child 39 7b3e49e4608a
equal deleted inserted replaced
30:ab513c8439db 31:e8f4211554fb
       
     1 /*
       
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: 
       
    15  *   WLAN Wizard Page: Manual Network mode query page.  
       
    16  *
       
    17  */
       
    18 
       
    19 /*
       
    20  * %version: 8 %
       
    21  */
       
    22 
       
    23 #ifndef WLANWIZARDPAGENETWORKMODE_H
       
    24 #define WLANWIZARDPAGENETWORKMODE_H
       
    25 
       
    26 // System includes
       
    27 
       
    28 // User includes
       
    29 #include "wlanwizardpageinternal.h"
       
    30 
       
    31 // Forward declarations
       
    32 class HbRadioButtonList;
       
    33 class HbLabel;
       
    34 class WlanWizardPrivate;
       
    35 class HbDocumentLoader;
       
    36 
       
    37 // External data types
       
    38 
       
    39 // Constants
       
    40 
       
    41 /*!
       
    42  * @addtogroup group_wlan_wizard
       
    43  * @{
       
    44  */
       
    45 
       
    46 class WlanWizardPageNetworkMode : public WlanWizardPageInternal
       
    47 {
       
    48     Q_OBJECT
       
    49 public:
       
    50     
       
    51     /*!
       
    52      * Constructor method for the network mode view object
       
    53      * @param parent pointer to parent object.
       
    54      */
       
    55     WlanWizardPageNetworkMode(WlanWizardPrivate* parent);
       
    56     
       
    57     /*!
       
    58      * Destructor for the network mode view object.
       
    59      */
       
    60     ~WlanWizardPageNetworkMode();
       
    61 
       
    62     
       
    63 public: // From WlanWizardPageInternal
       
    64     /*!
       
    65      * Page initialization procedures. Inherited from WlanWizardPage.
       
    66      */
       
    67     HbWidget* initializePage();
       
    68 
       
    69     /*!
       
    70      * Evaluates the network mode selection and sets the configuration in
       
    71      * the wlanwizard.
       
    72      * @param removeFromStack output parameter that returns false
       
    73      * @return WlanWizardPageSecurityMode page id.
       
    74      */
       
    75     int nextId(bool &removeFromStack) const;
       
    76     
       
    77     /*!
       
    78      * This method is overrides the default implementation from WlanWizardPage.
       
    79      * It indicates whether the Next-button should be enabled or not.
       
    80      * @return true, if a mode has been selected.
       
    81      */
       
    82     bool showPage();
       
    83 
       
    84 public slots:
       
    85     /*!
       
    86      * Is invoked when user selects a mode from the radio button list.
       
    87      * (HbRadioButtonList's itemSelected-signal)
       
    88      */
       
    89     void itemSelected(int index);
       
    90 
       
    91     /*!
       
    92      * Loads the document orientation information from occ_add_wlan_02_03.docml.
       
    93      * This is called each time phone orientation changes.
       
    94      * @param orientation indicates whether the phone is in portrait or
       
    95      * landscape mode.
       
    96      */
       
    97     void loadDocml(Qt::Orientation orientation);
       
    98     
       
    99 private:
       
   100     
       
   101     /*!
       
   102      * A support function to map the radio button list to a generic network
       
   103      * mode list. This enables the changing of button order without it
       
   104      * affecting the entire class.
       
   105      */
       
   106     void addToList(QStringList &list, const QString &item, int mode, bool isHidden);
       
   107     
       
   108     /*!
       
   109      * Pointer to the view.
       
   110      */
       
   111     HbWidget *mWidget;
       
   112     
       
   113     /*!
       
   114      * Pointer to the radio button list object.
       
   115      */
       
   116     HbRadioButtonList *mList;
       
   117     
       
   118     /*!
       
   119      * Pointer to the label object.
       
   120      */
       
   121     HbLabel *mLabel;
       
   122     
       
   123     /*!
       
   124      * Pointer to document loader object.
       
   125      */
       
   126     HbDocumentLoader *mLoader;
       
   127     
       
   128     /*!
       
   129      * True, if a mode has been selected. False otherwise.
       
   130      */
       
   131     bool mValid;
       
   132     
       
   133     /*!
       
   134      * List of network modes. This list is tied to the radio buttons during
       
   135      * the initialization of the page.
       
   136      */
       
   137     QList<int> mNetworkModes;
       
   138     
       
   139     /*!
       
   140      * List of publicity modes. This list is tied to the radio buttons during
       
   141      * the initialization of the page.
       
   142      */
       
   143     QList<bool> mIsHidden;
       
   144 };
       
   145 
       
   146 /*! @} */
       
   147 
       
   148 #endif