securitydialogs/secuinotifications/secuinotificationdialogplugin/src/secuinotificationcontentwidget.cpp
equal
deleted
inserted
replaced
207 } |
207 } |
208 qDebug() << "SecUiNotificationContentWidget::KCodeTop 4"; |
208 qDebug() << "SecUiNotificationContentWidget::KCodeTop 4"; |
209 |
209 |
210 connect(codeTop, SIGNAL(textChanged(const QString &)), this, SIGNAL(codeTopChanged(const QString &))); |
210 connect(codeTop, SIGNAL(textChanged(const QString &)), this, SIGNAL(codeTopChanged(const QString &))); |
211 connect(codeTop, SIGNAL(contentsChanged()), this, SIGNAL(codeTopContentChanged())); |
211 connect(codeTop, SIGNAL(contentsChanged()), this, SIGNAL(codeTopContentChanged())); |
|
212 |
|
213 if (parameters.contains(KDefaultCode)) { // this is done in this step so that the OK becomes valid (if rules are fulfilled) |
|
214 qDebug() << "SecUiNotificationContentWidget::KDefaultCode"; |
|
215 QString defaultCode = parameters.value(KDefaultCode).toString(); |
|
216 qDebug() << defaultCode; |
|
217 codeTop->setText(defaultCode); |
|
218 } |
|
219 qDebug() << "SecUiNotificationContentWidget::KCodeTop 4"; |
|
220 |
212 mainLayout->addItem(codeTop); |
221 mainLayout->addItem(codeTop); |
|
222 // double-query |
213 if (parameters.contains(KCodeBottom)) |
223 if (parameters.contains(KCodeBottom)) |
214 { |
224 { |
215 queryDual=1; |
225 queryDual=1; |
216 QString titleText = parameters.value(KDialogTitle).toString(); |
226 QString titleText = parameters.value(KDialogTitle).toString(); |
217 if(titleText.indexOf('|')>0) |
227 if(titleText.indexOf('|')>0) |
226 codeBottom->setMaxLength(lMaxLength); |
236 codeBottom->setMaxLength(lMaxLength); |
227 codeBottom->setInputMethodHints(Qt::ImhDigitsOnly); // default |
237 codeBottom->setInputMethodHints(Qt::ImhDigitsOnly); // default |
228 if (queryType & ESecUiAlphaSupported) |
238 if (queryType & ESecUiAlphaSupported) |
229 { |
239 { |
230 qDebug() << "SecUiNotificationContentWidget::KCodeBottom setUpAsLatinAlphabetOnlyEditor"; |
240 qDebug() << "SecUiNotificationContentWidget::KCodeBottom setUpAsLatinAlphabetOnlyEditor"; |
231 codeTop->setInputMethodHints(Qt::ImhNone); |
241 codeBottom->setInputMethodHints(Qt::ImhNone); |
232 } |
242 } |
233 qDebug() << "SecUiNotificationContentWidget::KCodeBottom 3"; |
243 qDebug() << "SecUiNotificationContentWidget::KCodeBottom 3"; |
234 connect(codeBottom, SIGNAL(textChanged(const QString &)), this, SIGNAL(codeBottomChanged(const QString &))); |
244 connect(codeBottom, SIGNAL(textChanged(const QString &)), this, SIGNAL(codeBottomChanged(const QString &))); |
235 connect(codeBottom, SIGNAL(contentsChanged(const QString &)), this, SIGNAL(codeBottomChanged(const QString &))); |
245 connect(codeBottom, SIGNAL(contentsChanged(const QString &)), this, SIGNAL(codeBottomChanged(const QString &))); |
236 mainLayout->addItem(codeBottom); |
246 mainLayout->addItem(codeBottom); |
249 mainLayoutButtons->addItem(but3); |
259 mainLayoutButtons->addItem(but3); |
250 #endif |
260 #endif |
251 |
261 |
252 mainLayout->addItem(mainLayoutButtons); |
262 mainLayout->addItem(mainLayoutButtons); |
253 |
263 |
254 codeTop->setFocus(); |
264 codeTop->setFocus(); // this should open the VKB |
255 |
265 |
256 } |
266 } |
257 |
267 |
258 setLayout(mainLayout); |
268 setLayout(mainLayout); |
259 } |
269 } |