securitysettings/eapqtdialogs/inc/eapusernamepwddialog.h
branchRCL_3
changeset 46 c74b3d9f6b9e
parent 45 bad0cc58d154
child 55 9c2aa05919d9
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
     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: User authentication Dialog
       
    15 */
       
    16 
       
    17 /*
       
    18  * %version: 4 %
       
    19  */
       
    20 
       
    21 #ifndef __EAPUSERNAMEPWDDIALOG_H__
       
    22 #define __EAPUSERNAMEPWDDIALOG_H__
       
    23 
       
    24 // System includes
       
    25 #include <HbInputDialog>
       
    26 #include <hbdevicedialoginterface.h>
       
    27 
       
    28 // User includes
       
    29 
       
    30 // Forward declarations
       
    31 class EapQtValidator;
       
    32 class HbTranslator;
       
    33 class HbLineEdit;
       
    34 class HbAction;
       
    35 
       
    36 // External data types
       
    37 
       
    38 // Constants
       
    39 
       
    40 /*!
       
    41    @addtogroup group_eap_username_pwd_dialog
       
    42    @{
       
    43  */
       
    44 
       
    45 // Class declaration
       
    46 
       
    47 class EapUsernamePwdDialog: public HbInputDialog, public HbDeviceDialogInterface
       
    48     {
       
    49     Q_OBJECT
       
    50 
       
    51     public:
       
    52         /* Constructor */
       
    53         EapUsernamePwdDialog(const QVariantMap &parameters);
       
    54         /* Destructor */
       
    55         ~EapUsernamePwdDialog();
       
    56         
       
    57         /* Function creates the actual dialog widget */
       
    58         void createDialog( const QVariantMap &parameters );
       
    59         
       
    60         /* Device dialog parameters to be set while dialog is displayed.
       
    61          * Not supported. (from HbDeviceDialogInterface)
       
    62          */
       
    63         bool setDeviceDialogParameters(const QVariantMap &parameters);
       
    64         
       
    65         /* Not supported. (from HbDeviceDialogInterface) */
       
    66         int deviceDialogError() const;
       
    67         
       
    68         /* Closes the device dialog. (from HbDeviceDialogInterface) */
       
    69         void closeDeviceDialog(bool byClient);
       
    70         
       
    71         /* Returns a pointer to this dialog widget.
       
    72            (from HbDeviceDialogInterface) */
       
    73         HbPopup *deviceDialogWidget() const;
       
    74         
       
    75     signals:
       
    76         /* Signal is emitted when the dialog is closed */
       
    77         void deviceDialogClosed();
       
    78     
       
    79         /* Data is emitted in QVariantMap when Ok Action button is selected */
       
    80         void deviceDialogData(QVariantMap data);
       
    81         
       
    82     private slots:
       
    83         /* Slot that is mapped to the Ok Action button's triggered signal */
       
    84         void okPressed();
       
    85                 
       
    86         /* Slot that is mapped to the Cancel Action button's triggered signal */
       
    87         void cancelPressed();
       
    88         
       
    89         /* Slot that is mapped to the signal that indicates to closing of the dialog */
       
    90         void closingDialog();
       
    91                
       
    92     private:
       
    93         
       
    94         bool validate() const;
       
    95         
       
    96         Q_DISABLE_COPY(EapUsernamePwdDialog)
       
    97    
       
    98     private: // data
       
    99         // NOT OWNED
       
   100         //! Pointer to the line edit 1 object 
       
   101         HbLineEdit *mEdit1;
       
   102         
       
   103         //! Pointer to the line edit 2 object
       
   104         HbLineEdit *mEdit2;
       
   105         
       
   106         // OWNED        
       
   107         //! Pointer to the user name validator object
       
   108         QScopedPointer<EapQtValidator> mUnameValidator;
       
   109                 
       
   110         //! Pointer to the password validator object
       
   111         QScopedPointer<EapQtValidator> mPwdValidator;
       
   112                 
       
   113         //! Pointer to the HbTranslator
       
   114         QScopedPointer<HbTranslator> mTranslator;
       
   115         
       
   116         //! Tells whether close has already been called for the dialog
       
   117         bool mClose;
       
   118         
       
   119         //! Tells whether Ok Action has already been pressed
       
   120         bool mOkActionPressed;
       
   121     };
       
   122 
       
   123 /*! @} */
       
   124 
       
   125 #endif // __EAPUSERNAMEPWDDIALOG_H__
       
   126