36 // ----------------------------------------------------------------------------- |
36 // ----------------------------------------------------------------------------- |
37 // UssdEditorQuery::UssdEditorQuery |
37 // UssdEditorQuery::UssdEditorQuery |
38 // Constructor. |
38 // Constructor. |
39 // ----------------------------------------------------------------------------- |
39 // ----------------------------------------------------------------------------- |
40 // |
40 // |
41 UssdEditorQuery::UssdEditorQuery(CUssdComms &ussd, QGraphicsItem *parent) |
41 UssdEditorQuery::UssdEditorQuery(UssdComms &ussd, QGraphicsItem *parent) |
42 :HbInputDialog(parent), mComms(ussd) |
42 :HbInputDialog(parent), mComms(ussd) |
43 { |
43 { |
44 TFLOGSTRING("USSDEDITOR: UssdEditorQuery::UssdEditorQuery IN") |
44 TFLOGSTRING("USSDEDITOR: UssdEditorQuery::UssdEditorQuery IN") |
45 setPromptText(hbTrId("txt_ussd_title_reply")); |
45 setPromptText(hbTrId("txt_ussd_title_reply")); |
46 |
46 |
48 // Set max length and rows |
48 // Set max length and rows |
49 lineEdit()->setMaxLength(KUssdEditorMaxLength); |
49 lineEdit()->setMaxLength(KUssdEditorMaxLength); |
50 lineEdit()->setMaxRows(KUssdMaxNumberOfEditorLines); |
50 lineEdit()->setMaxRows(KUssdMaxNumberOfEditorLines); |
51 lineEdit()->setText(QString()); |
51 lineEdit()->setText(QString()); |
52 |
52 |
53 // 0-9, *, +, # |
53 lineEdit()->setInputMethodHints(Qt::ImhEmailCharactersOnly); |
54 lineEdit()->setInputMethodHints(Qt::ImhDialableCharactersOnly); |
|
55 |
54 |
56 mComms.appStarting(); |
55 mComms.appStarting(); |
57 // Disable Ok key by default |
56 // Disable Ok key by default |
58 actions().at(0)->setEnabled(false); |
57 actions().at(0)->setEnabled(false); |
59 bool ret(false); |
58 connect(actions().at(0), SIGNAL(triggered(bool)), |
60 ret = connect(actions().at(0), SIGNAL(triggered(bool)), |
|
61 this, SLOT(sendUssdString())); |
59 this, SLOT(sendUssdString())); |
62 TFLOGSTRING2("USSDEDITOR: UssdEditorQuery::UssdEditorQuery \ |
|
63 connect send %d", ret); |
|
64 |
60 |
65 ret = connect(lineEdit(), SIGNAL(textChanged(QString)), |
61 connect(lineEdit(), SIGNAL(textChanged(QString)), |
66 this, SLOT(updateButtonVisible(QString))); |
62 this, SLOT(updateButtonVisible(QString))); |
67 TFLOGSTRING2("USSDEDITOR: UssdEditorQuery::UssdEditorQuery \ |
|
68 connect ok button %d", ret); |
|
69 |
63 |
70 // Connect cancel |
64 // Connect cancel |
71 ret = connect(actions().at(1), SIGNAL(triggered(bool)), |
65 connect(actions().at(1), SIGNAL(triggered(bool)), |
72 this, SLOT(cancelUssdString())); |
66 this, SLOT(cancelUssdString())); |
73 TFLOGSTRING2("USSDEDITOR: UssdEditorQuery::UssdEditorQuery \ |
|
74 connect send %d", ret); |
|
75 } |
67 } |
76 TFLOGSTRING("USSDEDITOR: UssdEditorQuery::UssdEditorQuery OUT") |
68 TFLOGSTRING("USSDEDITOR: UssdEditorQuery::UssdEditorQuery OUT") |
77 } |
69 } |
78 |
70 |
79 // ----------------------------------------------------------------------------- |
71 // ----------------------------------------------------------------------------- |