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 //Set the first Line Edit to be on the screen |
98 //Set the first Line Edit to be on the screen |
98 this->setPromptText(labelText1, 0); |
99 this->setPromptText(labelText1, 0); |
99 mEdit1 = this->lineEdit(0); |
100 mEdit1 = this->lineEdit(0); |
124 |
125 |
125 //Add a new Cancel button action |
126 //Add a new Cancel button action |
126 HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this); |
127 HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this); |
127 this->addAction(actionCancel); |
128 this->addAction(actionCancel); |
128 |
129 |
129 //Disconnect action Ok from the default SLOT and connect to |
130 //Connect to a SLOT owned by this class |
130 //a SLOT owned by this class |
|
131 disconnect(actionOk, SIGNAL(triggered()),this, SLOT(close())); |
|
132 bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed())); |
131 bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed())); |
133 Q_ASSERT(connected == true); |
132 Q_ASSERT(connected == true); |
134 |
133 |
135 //Disconnect action Cancel from the default SLOT and connect to |
134 //Connect to a SLOT owned by this class |
136 //a SLOT owned by this class |
|
137 disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close())); |
|
138 connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed())); |
135 connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed())); |
139 Q_ASSERT(connected == true); |
136 Q_ASSERT(connected == true); |
140 |
137 |
141 //Connect the about to close and hide signals, so that we are able to inform |
138 //Connect the about to close and hide signals, so that we are able to inform |
142 //the caller that the dialog was closed |
139 //the caller that the dialog was closed |