108 |
108 |
109 //Set the dialog to be on the screen until user reacts |
109 //Set the dialog to be on the screen until user reacts |
110 //by pressing any of the Action buttons |
110 //by pressing any of the Action buttons |
111 this->setModal(true); |
111 this->setModal(true); |
112 this->setTimeout(HbPopup::NoTimeout); |
112 this->setTimeout(HbPopup::NoTimeout); |
113 this->setDismissPolicy(HbPopup::NoDismiss); |
113 this->setDismissPolicy(HbPopup::NoDismiss); |
|
114 this->setDismissOnAction(false); |
114 this->setAdditionalRowVisible(true); |
115 this->setAdditionalRowVisible(true); |
115 |
116 |
116 //Set the first Line Edit (user name) to be on the screen |
117 //Set the first Line Edit (user name) to be on the screen |
117 this->setPromptText(labelText1, 0); |
118 this->setPromptText(labelText1, 0); |
118 mEdit1 = this->lineEdit(0); |
119 mEdit1 = this->lineEdit(0); |
156 this->addAction(actionOk); |
157 this->addAction(actionOk); |
157 //Add a new Cancel button action |
158 //Add a new Cancel button action |
158 HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this); |
159 HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this); |
159 this->addAction( actionCancel ); |
160 this->addAction( actionCancel ); |
160 |
161 |
161 //Disconnect action Ok from the default SLOT and connect to |
162 //Connect to a SLOT owned by this class |
162 //a SLOT owned by this class |
|
163 disconnect(actionOk, SIGNAL(triggered()),this, SLOT(close())); |
|
164 bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed())); |
163 bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed())); |
165 Q_ASSERT(connected == true); |
164 Q_ASSERT(connected == true); |
166 |
165 |
167 //Disconnect action Cancel from the default SLOT and connect to |
166 //Connect to a SLOT owned by this class |
168 //a SLOT owned by this class |
|
169 disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close())); |
|
170 connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed())); |
167 connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed())); |
171 Q_ASSERT(connected == true); |
168 Q_ASSERT(connected == true); |
172 |
169 |
173 // Connect the about to close and hide signals, so that we are able to inform |
170 // Connect the about to close and hide signals, so that we are able to inform |
174 // the caller that the dialog was closed |
171 // the caller that the dialog was closed |