securitysettings/eapqtdialogs/src/eapmschapv2oldpwddialog.cpp
changeset 49 43351a4f2da3
parent 44 22d80358905b
equal deleted inserted replaced
47:712b4ffd76bb 49:43351a4f2da3
    15 *   EAP-MSCHAPv2 Old Password Input Dialog implementation
    15 *   EAP-MSCHAPv2 Old Password Input Dialog implementation
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 /*
    19 /*
    20 * %version: 6 %
    20 * %version: 7 %
    21 */
    21 */
    22 
    22 
    23 // System includes
    23 // System includes
    24 #include <HbAction>
    24 #include <HbAction>
    25 #include <HbTranslator>
    25 #include <HbTranslator>
    85     
    85     
    86     //Set the dialog to be on the screen until user reacts
    86     //Set the dialog to be on the screen until user reacts
    87     //by pressing any of the Action buttons
    87     //by pressing any of the Action buttons
    88     this->setModal(true);
    88     this->setModal(true);
    89     this->setTimeout(HbPopup::NoTimeout);
    89     this->setTimeout(HbPopup::NoTimeout);
    90     this->setDismissPolicy(HbPopup::NoDismiss);    
    90     this->setDismissPolicy(HbPopup::NoDismiss); 
       
    91     this->setDismissOnAction(false);       
    91     this->setPromptText(labelText1, 0);      
    92     this->setPromptText(labelText1, 0);      
    92     mEdit = this->lineEdit(0);
    93     mEdit = this->lineEdit(0);
    93     mEdit->setEchoMode(HbLineEdit::Password);
    94     mEdit->setEchoMode(HbLineEdit::Password);
    94       
    95       
    95     EapQtConfigInterface eap_config_if;
    96     EapQtConfigInterface eap_config_if;
   112     
   113     
   113     //Add a new Cancel button action 
   114     //Add a new Cancel button action 
   114     HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
   115     HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
   115     this->addAction(actionCancel);    
   116     this->addAction(actionCancel);    
   116     
   117     
   117     //Disconnect action Ok from the default SLOT and connect to 
   118     //Connect to a SLOT owned by this class   
   118     //a SLOT owned by this class   
       
   119     disconnect(actionOk, SIGNAL(triggered()),this, SLOT(close()));
       
   120     bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
   119     bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
   121     Q_ASSERT(connected == true);
   120     Q_ASSERT(connected == true);
   122     
   121     
   123     //Disconnect action Cancel from the default SLOT and connect to 
   122     //Connect to a SLOT owned by this class  
   124     //a SLOT owned by this class  
       
   125     disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close()));
       
   126     connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
   123     connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
   127     Q_ASSERT(connected == true);
   124     Q_ASSERT(connected == true);
   128     
   125     
   129     // Connect the about to close and hide signals, so that we are able to inform 
   126     // Connect the about to close and hide signals, so that we are able to inform 
   130     // the caller that the dialog was closed   
   127     // the caller that the dialog was closed