cellular/psuinotes/src/psuinotes.cpp
changeset 52 d841fb1cc818
parent 50 2313cb430f28
child 53 25b8d29b7c59
equal deleted inserted replaced
50:2313cb430f28 52:d841fb1cc818
   295     QScopedPointer<HbInputDialog> passwordDialog(new HbInputDialog());
   295     QScopedPointer<HbInputDialog> passwordDialog(new HbInputDialog());
   296     
   296     
   297     // configure editor so that only digits can be inputted
   297     // configure editor so that only digits can be inputted
   298     passwordDialog->setPromptText(title);
   298     passwordDialog->setPromptText(title);
   299     passwordDialog->setEchoMode(HbLineEdit::Password);
   299     passwordDialog->setEchoMode(HbLineEdit::Password);
   300     passwordDialog->setInputMethodHints(Qt::ImhDigitsOnly);
       
   301     passwordDialog->actions().at(0)->setEnabled(false);
   300     passwordDialog->actions().at(0)->setEnabled(false);
   302     
       
   303     HbLineEdit *hbLineEdit = passwordDialog->lineEdit();
   301     HbLineEdit *hbLineEdit = passwordDialog->lineEdit();
   304     hbLineEdit->setMaxLength(maxPasswordLength);
   302     hbLineEdit->setMaxLength(maxPasswordLength);
   305     
   303     hbLineEdit->setInputMethodHints(Qt::ImhDigitsOnly);
   306     HbEditorInterface editorInterface(hbLineEdit);
       
   307     editorInterface.setMode(HbInputModeNumeric);
       
   308     editorInterface.setInputConstraints(HbEditorConstraintFixedInputMode);
       
   309     editorInterface.setFilter(HbDigitsOnlyFilter::instance());
       
   310     
   304     
   311     m_passwordValidator = &validator;
   305     m_passwordValidator = &validator;
   312     
   306     
   313     connect(
   307     connect(
   314         hbLineEdit, SIGNAL(contentsChanged()), 
   308         hbLineEdit, SIGNAL(contentsChanged()),