diff -r 093cf0757204 -r 938269283a16 securitysettings/cpeapuiplugins/cpeapuserpasswordui/inc/cpeapuserpasswordui.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitysettings/cpeapuiplugins/cpeapuserpasswordui/inc/cpeapuserpasswordui.h Fri Jun 11 13:40:22 2010 +0300 @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * Control Panel QT UI for username-password based EAP method configuration + * + */ + +/* + * %version: 18 % + */ + +#ifndef CPEAPUSERPASSWORDUI_H +#define CPEAPUSERPASSWORDUI_H + +// System includes +#include +#include +#include +#include + +// User includes + +// Forward declarations +class HbDataForm; +class HbDataFormModel; +class CpSettingFormItemData; +class HbLineEdit; +class EapQtValidator; + +// External data types + +// Constants + +/*! + * @addtogroup group_eap_ui_plugin_userpassword + * @{ + */ + +class CpEapUserPasswordUi: public CpBaseSettingView +{ +Q_OBJECT + +public: + CpEapUserPasswordUi( + const EapQtConfigInterface::EapBearerType bearer, + const int iapId, + const EapQtPluginInfo &plugin, + const EapQtPluginHandle& outerHandle); + ~CpEapUserPasswordUi(); + +protected: + bool eventFilter(QObject *obj, QEvent *event); + void close(); + +private: + void initializeUserPasswordUi(); + bool checkStateToBool(const int state); + int boolToCheckState(const bool state); + void storeSettings(); + bool validate(); + bool validatePasswordGroup(); + +private slots: + void setValidator(const QModelIndex); + void passwordPromptChanged(int state); + void passwordChanged(); + +private: + QScopedPointer mConfigIf; + EapQtPluginInfo mPluginInfo; + EapQtPluginHandle mOuterHandle; + HbDataForm *mForm; + HbDataFormModel *mModel; + CpSettingFormItemData *mUsername; + CpSettingFormItemData *mPasswordPrompt; + CpSettingFormItemData *mPassword; + + QScopedPointer mValidatorUsername; + QScopedPointer mValidatorPassword; + + bool mPasswordStored; + bool mPasswordChanged; + HbLineEdit *mPasswordEdit; + +}; + +/*! @} */ + +#endif