securitysettings/cpeapuiplugins/cpeapuserpasswordui/inc/cpeapuserpasswordui.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 username-password based EAP method configuration
    15  *   Control Panel QT UI for username-password based EAP method configuration
    16  *
    16  *
    17  */
    17  */
    18 
    18 
    19 /*
    19 /*
    20  * %version: 18 %
    20  * %version: 21 %
    21  */
    21  */
    22 
    22 
    23 #ifndef CPEAPUSERPASSWORDUI_H
    23 #ifndef CPEAPUSERPASSWORDUI_H
    24 #define CPEAPUSERPASSWORDUI_H
    24 #define CPEAPUSERPASSWORDUI_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 HbLineEdit;
    39 class HbLineEdit;
    39 class EapQtValidator;
    40 class EapQtValidator;
    40 
    41 
    41 // External data types
    42 // External data types
    45 /*!
    46 /*!
    46  * @addtogroup group_eap_ui_plugin_userpassword
    47  * @addtogroup group_eap_ui_plugin_userpassword
    47  * @{
    48  * @{
    48  */
    49  */
    49 
    50 
    50 class CpEapUserPasswordUi: public CpBaseSettingView
    51 class CpEapUserPasswordUi : public CpBaseSettingView
    51 {
    52 {
    52 Q_OBJECT
    53 Q_OBJECT
    53 
    54 
    54 public:
    55 public:
    55     CpEapUserPasswordUi(
    56     CpEapUserPasswordUi(
    62 protected:
    63 protected:
    63     bool eventFilter(QObject *obj, QEvent *event);
    64     bool eventFilter(QObject *obj, QEvent *event);
    64     void close();
    65     void close();
    65     
    66     
    66 private:
    67 private:
    67     void initializeUserPasswordUi();
    68     void createUi();
       
    69     void createUsername();
       
    70     void createPassword();
       
    71     
    68     bool checkStateToBool(const int state);
    72     bool checkStateToBool(const int state);
    69     int boolToCheckState(const bool state);
    73     int boolToCheckState(const bool state);
    70     void storeSettings();
    74     
       
    75     bool storeSettings();
    71     bool validate();
    76     bool validate();
       
    77     bool validateUsername();
    72     bool validatePasswordGroup();
    78     bool validatePasswordGroup();
    73     
    79     
    74 private slots:
    80 private slots:
    75     void setValidator(const QModelIndex);
    81     void setValidator(const QModelIndex);
    76     void passwordPromptChanged(int state);
    82     void passwordPromptChanged(int state);
    77     void passwordChanged();
    83     void passwordChanged();
    78     
    84     
    79 private:
    85 private:
       
    86     //! Pointer to EapQtConfigInterface
    80     QScopedPointer <EapQtConfigInterface> mConfigIf;
    87     QScopedPointer <EapQtConfigInterface> mConfigIf;
       
    88     //! Plugin info
    81     EapQtPluginInfo mPluginInfo;
    89     EapQtPluginInfo mPluginInfo;
       
    90     //! Outer handle
    82     EapQtPluginHandle mOuterHandle;
    91     EapQtPluginHandle mOuterHandle;
       
    92     //! Current EAP configuration
       
    93     EapQtConfig mEapConfig;
       
    94     
       
    95     //! Dataform
    83     HbDataForm *mForm;
    96     HbDataForm *mForm;
       
    97     //! Datform model
    84     HbDataFormModel *mModel;
    98     HbDataFormModel *mModel;
       
    99     //! Control Panel item data helper for username-password plugins
       
   100     CpItemDataHelper *mItemDataHelper;
       
   101     //! Username-password settings group
       
   102     HbDataFormModelItem *mGroupItem;
       
   103     //! Username lineEdit
    85     CpSettingFormItemData *mUsername;
   104     CpSettingFormItemData *mUsername;
       
   105     //! Prompt password checkBox
    86     CpSettingFormItemData *mPasswordPrompt;
   106     CpSettingFormItemData *mPasswordPrompt;
       
   107     //! Password lineEdit
    87     CpSettingFormItemData *mPassword;
   108     CpSettingFormItemData *mPassword;
    88 
   109 
       
   110     //! Realm validator
    89     QScopedPointer<EapQtValidator> mValidatorUsername;
   111     QScopedPointer<EapQtValidator> mValidatorUsername;
       
   112     //! Password validator
    90     QScopedPointer<EapQtValidator> mValidatorPassword;
   113     QScopedPointer<EapQtValidator> mValidatorPassword;
    91     
   114     
       
   115     //! Password is stored
    92     bool mPasswordStored;
   116     bool mPasswordStored;
       
   117     //! Password is saved
    93     bool mPasswordChanged;
   118     bool mPasswordChanged;
       
   119     //! Password lineEdit
    94     HbLineEdit *mPasswordEdit;
   120     HbLineEdit *mPasswordEdit;
    95         
   121         
    96 };
   122 };
    97 
   123 
    98 /*! @} */
   124 /*! @} */