209 HbInputDialog* inputDialog = new HbInputDialog(); |
209 HbInputDialog* inputDialog = new HbInputDialog(); |
210 mCurrentDialog = inputDialog; |
210 mCurrentDialog = inputDialog; |
211 // Set PromptText |
211 // Set PromptText |
212 inputDialog->setPromptText(heading); |
212 inputDialog->setPromptText(heading); |
213 // Set ContentText |
213 // Set ContentText |
214 HbEditorInterface inputMode(inputDialog->lineEdit()); |
|
215 inputDialog->lineEdit()->setFocus(); |
214 inputDialog->lineEdit()->setFocus(); |
216 if (ESatDigitOnly == characterSet) { |
215 if (ESatDigitOnly == characterSet) { |
217 // digit mode, digits only (0 9, *, #, and +) |
216 // digit mode, digits only (0 9, *, #, and +) |
218 inputMode.setFilter(HbPhoneNumberFilter::instance()); |
217 inputDialog->lineEdit()->setInputMethodHints( |
219 inputMode.setMode(HbInputModeNumeric); |
218 Qt::ImhDialableCharactersOnly); |
220 inputMode.setInputConstraints(HbEditorConstraintFixedInputMode); |
|
221 } else { |
|
222 // char mode |
|
223 inputMode.setUpAsLatinAlphabetOnlyEditor(); |
|
224 } |
219 } |
225 composeDialog(inputDialog, GetInkey); |
220 composeDialog(inputDialog, GetInkey); |
226 mCurrentAction->set(KeyMinLength, 1); |
221 mCurrentAction->set(KeyMinLength, 1); |
227 inputDialog->lineEdit()->setMaxLength(1); |
222 inputDialog->lineEdit()->setMaxLength(1); |
228 |
223 |
256 HbInputDialog* inputDialog = new HbInputDialog(); |
251 HbInputDialog* inputDialog = new HbInputDialog(); |
257 mCurrentDialog = inputDialog; |
252 mCurrentDialog = inputDialog; |
258 // Set PromptText |
253 // Set PromptText |
259 inputDialog->setPromptText(heading); |
254 inputDialog->setPromptText(heading); |
260 // Set ContentText |
255 // Set ContentText |
261 HbEditorInterface inputMode(inputDialog->lineEdit()); |
|
262 inputDialog->lineEdit()->setFocus(); |
256 inputDialog->lineEdit()->setFocus(); |
263 |
257 inputDialog->lineEdit()->setInputMethodHints( |
264 inputMode.setFilter(HbPhoneNumberFilter::instance()); |
258 Qt::ImhDialableCharactersOnly); |
265 inputMode.setMode(HbInputModeNumeric); |
|
266 inputMode.setInputConstraints(HbEditorConstraintFixedInputMode); |
|
267 |
259 |
268 composeDialog(inputDialog, GetImmediate); |
260 composeDialog(inputDialog, GetImmediate); |
269 |
261 |
270 // when receiving first input character, send it immediately |
262 // when receiving first input character, send it immediately |
271 SAT_ASSERT(connect(inputDialog->lineEdit(), SIGNAL(textChanged(QString)), |
263 SAT_ASSERT(connect(inputDialog->lineEdit(), SIGNAL(textChanged(QString)), |
331 |
323 |
332 HbInputDialog* inputQuery = new HbInputDialog(); |
324 HbInputDialog* inputQuery = new HbInputDialog(); |
333 mCurrentDialog = inputQuery; |
325 mCurrentDialog = inputQuery; |
334 inputQuery->setPromptText(heading); |
326 inputQuery->setPromptText(heading); |
335 inputQuery->setValue(QVariant(content)); |
327 inputQuery->setValue(QVariant(content)); |
336 HbEditorInterface inputMode(inputQuery->lineEdit()); |
|
337 inputQuery->lineEdit()->setFocus(); |
328 inputQuery->lineEdit()->setFocus(); |
338 if (ESatDigitOnly == characterSet) { |
329 if (ESatDigitOnly == characterSet) { |
339 // digit mode, digits only (0 9, *, #, and +) |
330 // digit mode, digits only (0 9, *, #, and +) |
340 inputMode.setFilter(HbPhoneNumberFilter::instance()); |
331 inputQuery->lineEdit()->setInputMethodHints( |
341 inputMode.setMode(HbInputModeNumeric); |
332 Qt::ImhDialableCharactersOnly); |
342 inputMode.setInputConstraints(HbEditorConstraintFixedInputMode); |
|
343 } else { |
|
344 // char mode |
|
345 inputMode.setUpAsLatinAlphabetOnlyEditor(); |
|
346 } |
333 } |
347 |
334 |
348 inputQuery->lineEdit()->setMaxLength(maxLength); |
335 inputQuery->lineEdit()->setMaxLength(maxLength); |
349 |
336 |
350 composeDialog(inputQuery, GetInput); |
337 composeDialog(inputQuery, GetInput); |
590 newDuration); |
577 newDuration); |
591 mCurrentAction->set(KeyDuration, newDuration); |
578 mCurrentAction->set(KeyDuration, newDuration); |
592 } |
579 } |
593 mCurrentAction->completeWithSuccess(); |
580 mCurrentAction->completeWithSuccess(); |
594 mCurrentAction = 0; |
581 mCurrentAction = 0; |
595 qDebug("SATAPP: SatAppInputProvider::transmitStringFromDialog >"); |
582 qDebug("SATAPP: SatAppInputProvider::transmitStringFromDialog <"); |
596 } |
583 } |
597 |
584 |
598 // ---------------------------------------------------------------------------- |
585 // ---------------------------------------------------------------------------- |
599 // SatAppInputProvider::startDurationTimer |
586 // SatAppInputProvider::startDurationTimer |
600 // ---------------------------------------------------------------------------- |
587 // ---------------------------------------------------------------------------- |