securitysettings/eapqtdialogs/src/eappasswordquerydialog.cpp
changeset 36 c98682f98478
parent 34 ad1f037f1ac2
child 44 22d80358905b
equal deleted inserted replaced
34:ad1f037f1ac2 36:c98682f98478
    14 * Description: EAP Password Query Dialog implementation
    14 * Description: EAP Password Query Dialog implementation
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 4 %
    19 * %version: 5 %
    20 */
    20 */
    21 
    21 
       
    22 // System includes
    22 #include <HbTranslator>
    23 #include <HbTranslator>
    23 #include <HbLineEdit>
    24 #include <HbLineEdit>
    24 #include <HbAction>
    25 #include <HbAction>
    25 #include <HbTranslator>
    26 #include <HbTranslator>
    26 #include <HbParameterLengthLimiter>
    27 #include <HbParameterLengthLimiter>
    27 #include <eapqtvalidator.h>
    28 #include <eapqtvalidator.h>
    28 #include <eapqtexpandedeaptype.h>
    29 #include <eapqtexpandedeaptype.h>
    29 #include <eapqtconfiginterface.h>
    30 #include <eapqtconfiginterface.h>
    30 #include <eapqtconfig.h>
    31 #include <eapqtconfig.h>
       
    32 
       
    33 // User includes
    31 #include "eappasswordquerydialog.h"
    34 #include "eappasswordquerydialog.h"
    32 #include "OstTraceDefinitions.h"
    35 #include "OstTraceDefinitions.h"
    33 #ifdef OST_TRACE_COMPILER_IN_USE
    36 #ifdef OST_TRACE_COMPILER_IN_USE
    34 #endif
    37 #endif
    35 
    38 
    36 
    39 /*!
    37 /**
    40  * \class EapPasswordQueryDialog
    38  * The constructor
    41  * \brief Implements Password Query Dialog. 
       
    42  */
       
    43 
       
    44 // External function prototypes
       
    45 
       
    46 // Local constants
       
    47  
       
    48 // ======== LOCAL FUNCTIONS ========
       
    49 
       
    50 // ======== MEMBER FUNCTIONS ========
       
    51 
       
    52 
       
    53 /*!
       
    54  * Constructor.
       
    55  * 
       
    56  * @param [in]  parameters Parameters for the Constructor.
    39  */
    57  */
    40 EapPasswordQueryDialog::EapPasswordQueryDialog(const QVariantMap &parameters) 
    58 EapPasswordQueryDialog::EapPasswordQueryDialog(const QVariantMap &parameters) 
    41  :mEdit(NULL), 
    59  :mEdit(NULL), 
    42  mPwdValidator(NULL),
    60  mPwdValidator(NULL),
    43  mTranslator(new HbTranslator("eapprompts")),
    61  mTranslator(new HbTranslator("eapprompts")),
    51         
    69         
    52     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_EAPPASSWORDQUERYDIALOG_EXIT );
    70     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_EAPPASSWORDQUERYDIALOG_EXIT );
    53     qDebug("EapPasswordQueryDialog::EapPasswordQueryDialog EXIT");
    71     qDebug("EapPasswordQueryDialog::EapPasswordQueryDialog EXIT");
    54 }
    72 }
    55     
    73     
    56 /**
    74 /*!
    57  * The construction of the dialog
    75  * The construction of the dialog
       
    76  *
       
    77  * @param [in] parameters Parameters for the Construction of the dialog.
    58  */ 
    78  */ 
    59 void EapPasswordQueryDialog::createDialog(const QVariantMap &parameters )
    79 void EapPasswordQueryDialog::createDialog(const QVariantMap &parameters )
    60 {
    80 {
    61     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_CREATEDIALOG_ENTRY );
    81     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_CREATEDIALOG_ENTRY );
    62     qDebug("EapPasswordQueryDialog::createDialog ENTER");
    82     qDebug("EapPasswordQueryDialog::createDialog ENTER");
   136    
   156    
   137     OstTraceFunctionExit0( DUP1_EAPPASSWORDQUERYDIALOG_CREATEDIALOG_EXIT );
   157     OstTraceFunctionExit0( DUP1_EAPPASSWORDQUERYDIALOG_CREATEDIALOG_EXIT );
   138     qDebug("EapPasswordQueryDialog::createDialog EXIT");
   158     qDebug("EapPasswordQueryDialog::createDialog EXIT");
   139 }
   159 }
   140 
   160 
   141 /**
   161 /*!
   142  * Destructor
   162  * Destructor
   143  */
   163  */
   144 EapPasswordQueryDialog::~EapPasswordQueryDialog()
   164 EapPasswordQueryDialog::~EapPasswordQueryDialog()
   145 {
   165 {
   146     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_DEAPPASSWORDQUERYDIALOG_ENTRY );
   166     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_DEAPPASSWORDQUERYDIALOG_ENTRY );
   149     // mPwdValidator:   scoped pointer deleted automatically
   169     // mPwdValidator:   scoped pointer deleted automatically
   150     
   170     
   151     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_DEAPPASSWORDQUERYDIALOG_EXIT );
   171     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_DEAPPASSWORDQUERYDIALOG_EXIT );
   152 }
   172 }
   153 
   173 
   154 /**
   174 /*!
   155  * Line edit validator
   175  * Line edit validator
       
   176  *
       
   177  * @return true if content is valid.
   156  */
   178  */
   157 bool EapPasswordQueryDialog::validate() const
   179 bool EapPasswordQueryDialog::validate() const
   158 {
   180 {
   159     qDebug("EapPasswordQueryDialog::validate ENTER");
   181     qDebug("EapPasswordQueryDialog::validate ENTER");
   160     
   182     
   168     
   190     
   169     qDebug("EapPasswordQueryDialog::validate EXIT");
   191     qDebug("EapPasswordQueryDialog::validate EXIT");
   170     return valid;
   192     return valid;
   171 }
   193 }
   172 
   194 
   173 /**
   195 /*!
   174  * Function is called when the Ok Action button is pressed
   196  * Function is called when the Ok Action button is pressed
   175  */
   197  */
   176 void EapPasswordQueryDialog::okPressed()
   198 void EapPasswordQueryDialog::okPressed()
   177 {
   199 {
   178     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_OKPRESSED_ENTRY );
   200     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_OKPRESSED_ENTRY );
   193     }
   215     }
   194     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_OKPRESSED_EXIT );
   216     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_OKPRESSED_EXIT );
   195     qDebug("EapPasswordQueryDialog::okPressed EXIT");
   217     qDebug("EapPasswordQueryDialog::okPressed EXIT");
   196 }
   218 }
   197 
   219 
   198 /**
   220 /*!
   199  * Function is called when the Cancel Action button is pressed
   221  * Function is called when the Cancel Action button is pressed
   200  */
   222  */
   201 void EapPasswordQueryDialog::cancelPressed()
   223 void EapPasswordQueryDialog::cancelPressed()
   202 {
   224 {
   203     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_CANCELPRESSED_ENTRY );
   225     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_CANCELPRESSED_ENTRY );
   209     }   
   231     }   
   210     qDebug("EapPasswordQueryDialog::cancelPressed EXIT");
   232     qDebug("EapPasswordQueryDialog::cancelPressed EXIT");
   211     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_CANCELPRESSED_EXIT );
   233     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_CANCELPRESSED_EXIT );
   212 }
   234 }
   213 
   235 
   214 /**
   236 /*!
   215  * Function is called when the dialog is about to close
   237  * Function is called when the dialog is about to close
   216  * 
       
   217  */
   238  */
   218 void EapPasswordQueryDialog::closingDialog()
   239 void EapPasswordQueryDialog::closingDialog()
   219 {
   240 {
   220     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_CLOSINGDIALOG_ENTRY );
   241     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_CLOSINGDIALOG_ENTRY );
   221     qDebug("EapPasswordQueryDialog::closingDialog ENTER");
   242     qDebug("EapPasswordQueryDialog::closingDialog ENTER");
   223     
   244     
   224     qDebug("EapPasswordQueryDialog::closingDialog EXIT");
   245     qDebug("EapPasswordQueryDialog::closingDialog EXIT");
   225     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_CLOSINGDIALOG_EXIT );
   246     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_CLOSINGDIALOG_EXIT );
   226 }
   247 }
   227 
   248 
   228 /**
   249 /*!
   229  * Updating the dialog during its showing is not allowed.
   250  * Device dialog parameters to be set while dialog is displayed.
   230  */ 
   251  * Not supported. 
       
   252  *
       
   253  * @param [in] parameters NOT USED
       
   254  * @return true always.
       
   255  */  
   231 bool EapPasswordQueryDialog::setDeviceDialogParameters
   256 bool EapPasswordQueryDialog::setDeviceDialogParameters
   232                 (const QVariantMap &parameters)
   257                 (const QVariantMap &parameters)
   233 {
   258 {
   234     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
   259     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
   235     
   260     
   238     
   263     
   239     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
   264     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
   240     return true;
   265     return true;
   241 }
   266 }
   242 
   267 
   243 /**
   268 /*!
   244  * Not supported, 0 always returned
   269  * Not supported
       
   270  *
       
   271  * @return 0 always returned.
   245  */
   272  */
   246 int EapPasswordQueryDialog::deviceDialogError() const
   273 int EapPasswordQueryDialog::deviceDialogError() const
   247 {
   274 {
   248     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_DEVICEDIALOGERROR_ENTRY );
   275     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_DEVICEDIALOGERROR_ENTRY );
   249     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_DEVICEDIALOGERROR_EXIT);
   276     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_DEVICEDIALOGERROR_EXIT);
   250     return 0;
   277     return 0;
   251 }
   278 }
   252 
   279 
   253 /**
   280 /*!
   254  * Dialog is closed and the signal about closing is emitted
   281  * Dialog is closed and the signal about closing is emitted
       
   282  *
       
   283  * @param [in] byClient indicates when the user closes the dialog
   255  */
   284  */
   256 void EapPasswordQueryDialog::closeDeviceDialog(bool byClient)
   285 void EapPasswordQueryDialog::closeDeviceDialog(bool byClient)
   257 {   
   286 {   
   258     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_CLOSEDEVICEDIALOG_ENTRY );
   287     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_CLOSEDEVICEDIALOG_ENTRY );
   259     qDebug("EapPasswordQueryDialog::closeDeviceDialog ENTER");
   288     qDebug("EapPasswordQueryDialog::closeDeviceDialog ENTER");
   267     
   296     
   268     qDebug("EapPasswordQueryDialog::closeDeviceDialog EXIT");
   297     qDebug("EapPasswordQueryDialog::closeDeviceDialog EXIT");
   269     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_CLOSEDEVICEDIALOG_EXIT );
   298     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_CLOSEDEVICEDIALOG_EXIT );
   270 }
   299 }
   271 
   300 
   272 /**
   301 /*!
   273  * This dialog widget is returned to the caller
   302  * This dialog widget is returned to the caller
       
   303  *
       
   304  * @return this dialog widget
   274  */
   305  */
   275 HbPopup *EapPasswordQueryDialog::deviceDialogWidget() const
   306 HbPopup *EapPasswordQueryDialog::deviceDialogWidget() const
   276 {
   307 {
   277     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_DEVICEDIALOGWIDGET_ENTRY );
   308     OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_DEVICEDIALOGWIDGET_ENTRY );
   278     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_DEVICEDIALOGWIDGET_EXIT );
   309     OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_DEVICEDIALOGWIDGET_EXIT );