securitysettings/eapqtdialogs/inc/eapmschapv2oldpwddialog.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 06 Jul 2010 14:18:35 +0300
changeset 39 fe6b6762fccd
child 36 c98682f98478
permissions -rw-r--r--
Revision: 201025 Kit: 2010127

/*
* 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 "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: EAP-MSCHAPv2 Old Password Input Dialog
*
*/

/*
* %version: 3 %
*/

#ifndef __EAPMSCHAPV2OLDPWDDIALOG_H__
#define __EAPMSCHAPV2OLDPWDDIALOG_H__

#include <HbInputDialog>
#include <hbdevicedialoginterface.h>

class HbTranslator;
class EapQtValidator;

class EapMschapv2OldPwdDialog: public HbInputDialog, public HbDeviceDialogInterface
    {
    Q_OBJECT

    public:
        /* Constructor */
        EapMschapv2OldPwdDialog(const QVariantMap &parameters);
        
        /* Destructor */
        ~EapMschapv2OldPwdDialog();
        
        /* Function creates the actual dialog widget */
        void createDialog( const QVariantMap &parameters );
        
        /* Device dialog parameters to be set while dialog is displayed.
         * Not supported.
         */
        bool setDeviceDialogParameters(const QVariantMap &parameters);
        
        /* Not supported */
        int deviceDialogError() const;
        
        /* Closes the device dialog */
        void closeDeviceDialog(bool byClient);
        
        /* Returns a pointer to this dialog widget */
        HbPopup *deviceDialogWidget() const;
                
    signals:
        /* Signal is emitted when the dialog is closed */
        void deviceDialogClosed();
    
        /* Data is emitted in QVariantMap when Ok Action button is selected */
        void deviceDialogData(QVariantMap data);
        
    private slots:
        /* Slot that is mapped to the Ok Action button's triggered signal */
        void okPressed();
                
        /* Slot that is mapped to the Cancel Action button's triggered signal */
        void cancelPressed();
        
        /* Slot that is mapped to the signal that indicates to closing of the dialog */
        void closingDialog();
                       
    private:
         
        bool validate() const;
        
        Q_DISABLE_COPY(EapMschapv2OldPwdDialog)
    
    private:
        /* Pointer to the line edit object */
        HbLineEdit *mEdit;
                
        /* Pointer to the password validator object */
        QScopedPointer<EapQtValidator> mPwdValidator;
                
        /* Pointer to the HbTranslator */
        QScopedPointer<HbTranslator> mTranslator;
        
        /* Tells whether Ok Action has already been pressed */
        bool mOkActionPressed;
        
        /* Tells whether close has already been called for the dialog */
        bool mClose;
    };


#endif // __EAPMSCHAPV2OLDPWDDIALOG_H__