securitysettings/eapqtdialogs/src/eapfastcreatemasterkeyquerydialog.cpp
changeset 49 43351a4f2da3
parent 44 22d80358905b
equal deleted inserted replaced
47:712b4ffd76bb 49:43351a4f2da3
    14 * Description: EAP-FAST Create Master Key Query Dialog implementation
    14 * Description: EAP-FAST Create Master Key Query Dialog implementation
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 6 %
    19 * %version: 8 %
    20 */
    20 */
    21 
    21 
    22 // System includes
    22 // System includes
    23 #include <HbLineEdit>
    23 #include <HbLineEdit>
    24 #include <HbAction>
    24 #include <HbAction>
    89         
    89         
    90     //Set the dialog to be on the screen until user reacts
    90     //Set the dialog to be on the screen until user reacts
    91     //by pressing any of the Action buttons
    91     //by pressing any of the Action buttons
    92     this->setModal(true);
    92     this->setModal(true);
    93     this->setTimeout(HbPopup::NoTimeout);
    93     this->setTimeout(HbPopup::NoTimeout);
    94     this->setDismissPolicy(HbPopup::NoDismiss);    
    94     this->setDismissPolicy(HbPopup::NoDismiss);   
       
    95     this->setDismissOnAction(false);     
    95     this->setAdditionalRowVisible(true);
    96     this->setAdditionalRowVisible(true);
    96     
    97     
    97     this->setPromptText(labelText1, 0);   
    98     this->setPromptText(labelText1, 0);   
    98     mEdit1 = this->lineEdit(0);
    99     mEdit1 = this->lineEdit(0);
    99     mEdit1->setEchoMode(HbLineEdit::Password);
   100     mEdit1->setEchoMode(HbLineEdit::Password);
   107     mPwdValidator.reset( eap_config_if.validatorPacStore(
   108     mPwdValidator.reset( eap_config_if.validatorPacStore(
   108                 EapQtPacStoreConfig::PacStorePassword) ); 
   109                 EapQtPacStoreConfig::PacStorePassword) ); 
   109     Q_ASSERT( mPwdValidator.isNull() == false );                
   110     Q_ASSERT( mPwdValidator.isNull() == false );                
   110                      
   111                      
   111     mPwdValidator->updateEditor(mEdit1);
   112     mPwdValidator->updateEditor(mEdit1);
   112     
   113     mPwdValidator->updateEditor(mEdit2);
   113    
   114    
   114     //Remove all default actions from the dialog  
   115     //Remove all default actions from the dialog  
   115     QList<QAction*> action_list = this->actions();        
   116     QList<QAction*> action_list = this->actions();        
   116     for ( int i = 0; i < action_list.count(); i++ ) {
   117     for ( int i = 0; i < action_list.count(); i++ ) {
   117         this->removeAction(action_list.at(i));
   118         this->removeAction(action_list.at(i));
   123     
   124     
   124     //Add a new Cancel button action 
   125     //Add a new Cancel button action 
   125     HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
   126     HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
   126     this->addAction(actionCancel);    
   127     this->addAction(actionCancel);    
   127     
   128     
   128     //Disconnect action Ok from the default SLOT and connect to 
   129     //Connect to a SLOT owned by this class    
   129     //a SLOT owned by this class    
       
   130     disconnect(actionOk, SIGNAL(triggered()),this, SLOT(close()));
       
   131     bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
   130     bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
   132     Q_ASSERT(connected == true);
   131     Q_ASSERT(connected == true);
   133     
   132     
   134     //Disconnect action Cancel from the default SLOT and connect to 
   133     //Connect to a SLOT owned by this class  
   135     //a SLOT owned by this class  
       
   136     disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close()));
       
   137     connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
   134     connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
   138     Q_ASSERT(connected == true);
   135     Q_ASSERT(connected == true);
   139     
   136     
   140     // Connect the about to close and hide signals, so that we are able to inform 
   137     // Connect the about to close and hide signals, so that we are able to inform 
   141     // the caller that the dialog was closed   
   138     // the caller that the dialog was closed