securitysettings/eapqtdialogs/src/eapfastpacfilepwquerydialog.cpp
changeset 52 c23bdf5a328a
parent 48 432fb2364cb8
equal deleted inserted replaced
51:e863583e6720 52:c23bdf5a328a
    14 * Description: EAP-FAST PAC File Password Query Dialog implementation
    14 * Description: EAP-FAST PAC File Password Query Dialog implementation
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 5 %
    19 * %version: 8 %
    20 */
    20 */
    21 
    21 
    22 // System includes
    22 // System includes
    23 #include <HbTranslator>
    23 #include <HbTranslator>
    24 #include <HbAction>
    24 #include <HbAction>
    25 #include <HbParameterLengthLimiter>
    25 #include <HbParameterLengthLimiter>
       
    26 #include <HbEditorInterface>
       
    27 #include <EapSettings.h>
    26 
    28 
    27 // User includes
    29 // User includes
    28 #include "eapfastpacfilepwquerydialog.h"
    30 #include "eapfastpacfilepwquerydialog.h"
    29 #include "OstTraceDefinitions.h"
    31 #include "OstTraceDefinitions.h"
    30 #ifdef OST_TRACE_COMPILER_IN_USE
    32 #ifdef OST_TRACE_COMPILER_IN_USE
    96     this->setTimeout(PacFilePwQueryTimeout);
    98     this->setTimeout(PacFilePwQueryTimeout);
    97     this->setDismissPolicy(HbPopup::NoDismiss);
    99     this->setDismissPolicy(HbPopup::NoDismiss);
    98     this->setPromptText(mainText, 0);   
   100     this->setPromptText(mainText, 0);   
    99     mEdit = this->lineEdit(0);
   101     mEdit = this->lineEdit(0);
   100     mEdit->setEchoMode(HbLineEdit::Password);
   102     mEdit->setEchoMode(HbLineEdit::Password);
       
   103     mEdit->setMaxLength(KGeneralStringMaxLength);
       
   104     mEdit->setInputMethodHints(
       
   105         Qt::ImhNoAutoUppercase | Qt::ImhPreferLowercase | Qt::ImhNoPredictiveText);
       
   106     
       
   107     HbEditorInterface editInterface(mEdit);
       
   108     editInterface.setSmileyTheme(HbSmileyTheme());    
   101               
   109               
   102     //Remove all default actions from the dialog           
   110     //Remove all default actions from the dialog           
   103     QList<QAction*> action_list = this->actions();     
   111     QList<QAction*> action_list = this->actions();     
   104     for ( int i = 0; i < action_list.count(); i++ ) {
   112     for ( int i = 0; i < action_list.count(); i++ ) {
   105         this->removeAction(action_list.at(i));
   113         this->removeAction(action_list.at(i));
   111     
   119     
   112     //Add a new Cancel button action 
   120     //Add a new Cancel button action 
   113     HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
   121     HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
   114     this->addAction(actionCancel);    
   122     this->addAction(actionCancel);    
   115      
   123      
   116     //Disconnect action Ok from the default SLOT and connect to 
   124     //Connect to a SLOT owned by this class    
   117     //a SLOT owned by this class    
       
   118     disconnect(actionOk, SIGNAL(triggered()),this, SLOT(close()));
       
   119     bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
   125     bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
   120     Q_ASSERT(connected == true);
   126     Q_ASSERT(connected == true);
   121     
   127     
   122     //Disconnect action Cancel from the default SLOT and connect to 
   128     //Connect to a SLOT owned by this class
   123     //a SLOT owned by this class  
       
   124     disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close()));
       
   125     connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
   129     connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
   126     Q_ASSERT(connected == true);
   130     Q_ASSERT(connected == true);
   127     
   131     
   128     // Connect the about to close and hide signals, so that we are able to inform 
   132     // Connect the about to close and hide signals, so that we are able to inform 
   129     // the caller that the dialog was closed   
   133     // the caller that the dialog was closed