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