98 |
98 |
99 //Set the dialog to be on the screen until user reacts |
99 //Set the dialog to be on the screen until user reacts |
100 //by pressing any of the Action buttons |
100 //by pressing any of the Action buttons |
101 this->setModal(true); |
101 this->setModal(true); |
102 this->setTimeout(HbPopup::NoTimeout); |
102 this->setTimeout(HbPopup::NoTimeout); |
103 this->setDismissPolicy(HbPopup::NoDismiss); |
103 this->setDismissPolicy(HbPopup::NoDismiss); |
|
104 this->setDismissOnAction(false); |
104 this->setPromptText(labelText, 0); |
105 this->setPromptText(labelText, 0); |
105 mEdit = this->lineEdit(0); |
106 mEdit = this->lineEdit(0); |
106 mEdit->setEchoMode(HbLineEdit::Password); |
107 mEdit->setEchoMode(HbLineEdit::Password); |
107 |
108 |
108 //Get the EAP type from parameters (for the Validator) |
109 //Get the EAP type from parameters (for the Validator) |
134 |
135 |
135 //Add a new Cancel button action |
136 //Add a new Cancel button action |
136 HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this); |
137 HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this); |
137 this->addAction(actionCancel); |
138 this->addAction(actionCancel); |
138 |
139 |
139 //Disconnect action Ok from the default SLOT and connect to |
140 //Connect to a SLOT owned by this class |
140 //a SLOT owned by this class |
|
141 disconnect(actionOk, SIGNAL(triggered()),this, SLOT(close())); |
|
142 bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed())); |
141 bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed())); |
143 Q_ASSERT(connected == true); |
142 Q_ASSERT(connected == true); |
144 |
143 |
145 //Disconnect action Cancel from the default SLOT and connect to |
144 //Connect to a SLOT owned by this class |
146 //a SLOT owned by this class |
|
147 disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close())); |
|
148 connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed())); |
145 connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed())); |
149 Q_ASSERT(connected == true); |
146 Q_ASSERT(connected == true); |
150 |
147 |
151 // Connect the about to close and hide signals, so that we are able to inform |
148 // Connect the about to close and hide signals, so that we are able to inform |
152 // the caller that the dialog was closed |
149 // the caller that the dialog was closed |