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