securitysettings/cpeapuiplugins/cpeapsimakaui/inc/cpeapsimakaui.h
changeset 39 fe6b6762fccd
parent 33 938269283a16
equal deleted inserted replaced
38:7a0216d033ac 39:fe6b6762fccd
     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 License "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.
    15  *   Control Panel QT UI for EAP-SIM and EAP-AKA method configuration
    15  *   Control Panel QT UI for EAP-SIM and EAP-AKA method configuration
    16  *
    16  *
    17  */
    17  */
    18 
    18 
    19 /*
    19 /*
    20  * %version:  12 %
    20  * %version:  14 %
    21  */
    21  */
    22 
    22 
    23 #ifndef CPEAPSIMAKAUI_H
    23 #ifndef CPEAPSIMAKAUI_H
    24 #define CPEAPSIMAKAUI_H
    24 #define CPEAPSIMAKAUI_H
    25 
    25 
    32 // User includes
    32 // User includes
    33 
    33 
    34 // Forward declarations
    34 // Forward declarations
    35 class HbDataForm;
    35 class HbDataForm;
    36 class HbDataFormModel;
    36 class HbDataFormModel;
       
    37 class HbDataFormModelItem;
    37 class CpSettingFormItemData;
    38 class CpSettingFormItemData;
    38 class EapQtValidator;
    39 class EapQtValidator;
    39 
    40 
    40 // External data types
    41 // External data types
    41 
    42 
    44 /*!
    45 /*!
    45  * @addtogroup group_eap_ui_plugin_simaka
    46  * @addtogroup group_eap_ui_plugin_simaka
    46  * @{
    47  * @{
    47  */
    48  */
    48 
    49 
    49 class CpEapSimAkaUi: public CpBaseSettingView
    50 class CpEapSimAkaUi : public CpBaseSettingView
    50 {
    51 {
    51 Q_OBJECT
    52 Q_OBJECT
    52 
    53 
    53 public:
    54 public:
    54     CpEapSimAkaUi(
    55     CpEapSimAkaUi(
    60 
    61 
    61 protected:
    62 protected:
    62     void close();
    63     void close();
    63     
    64     
    64 private:
    65 private:
    65     void initializeSimAkaUi();
    66     void createUi();
       
    67     void createUsername();
       
    68     void createRealm();
       
    69     
    66     bool checkStateToBool(const int state);
    70     bool checkStateToBool(const int state);
    67     int boolToCheckState(const bool state);
    71     int boolToCheckState(const bool state);
    68     void storeSettings();
    72     
       
    73     bool storeSettings();
    69     bool validate();
    74     bool validate();
    70     bool validateGroup(CpSettingFormItemData *edit, CpSettingFormItemData *checkBox,
    75     bool validateGroup(CpSettingFormItemData *edit, CpSettingFormItemData *checkBox,
    71         EapQtValidator* validator);
    76         EapQtValidator* validator);
    72 
    77 
    73 private slots:
    78 private slots:
    74     void setValidator(const QModelIndex);
    79     void setValidator(const QModelIndex);
    75     void usernameAutomaticChanged(int state);
    80     void usernameAutomaticChanged(int state);
    76     void realmAutomaticChanged(int state);
    81     void realmAutomaticChanged(int state);
    77 
    82 
    78 private:
    83 private:
       
    84     //! Pointer to EapQtConfigInterface
    79     QScopedPointer <EapQtConfigInterface> mConfigIf;
    85     QScopedPointer <EapQtConfigInterface> mConfigIf;
       
    86     //! Plugin info
    80     EapQtPluginInfo mPluginInfo;
    87     EapQtPluginInfo mPluginInfo;
       
    88     //! Outer handle
    81     EapQtPluginHandle mOuterHandle;
    89     EapQtPluginHandle mOuterHandle;
       
    90     //! Current EAP configuration
       
    91     EapQtConfig mEapConfig;
       
    92     
       
    93     //! Dataform
    82     HbDataForm *mForm;
    94     HbDataForm *mForm;
       
    95     //! Datform model
    83     HbDataFormModel *mModel;
    96     HbDataFormModel *mModel;
       
    97     //! Control Panel item data helper for EAP-SIM/AKA plugins
       
    98     CpItemDataHelper *mItemDataHelper;
       
    99     //! EAP-SIM/AKA settings group
       
   100     HbDataFormModelItem *mGroupItem;
       
   101     //! Username generate automatically checkBox
    84     CpSettingFormItemData *mUsernameAutomatic;
   102     CpSettingFormItemData *mUsernameAutomatic;
       
   103     //! Username lineEdit
    85     CpSettingFormItemData *mUsername;
   104     CpSettingFormItemData *mUsername;
       
   105     //! Realm generate automatically checkBox
    86     CpSettingFormItemData *mRealmAutomatic;
   106     CpSettingFormItemData *mRealmAutomatic;
       
   107     //! Realm lineEdit
    87     CpSettingFormItemData *mRealm;
   108     CpSettingFormItemData *mRealm;
    88 
   109 
       
   110     //! Realm validator
    89     QScopedPointer<EapQtValidator> mValidatorRealm;
   111     QScopedPointer<EapQtValidator> mValidatorRealm;
       
   112     //! Username validator
    90     QScopedPointer<EapQtValidator> mValidatorUsername;
   113     QScopedPointer<EapQtValidator> mValidatorUsername;
    91 };
   114 };
    92 
   115 
    93 /*! @} */
   116 /*! @} */
    94 
   117