equal
deleted
inserted
replaced
99 mDialpad->editor().text().length()); |
99 mDialpad->editor().text().length()); |
100 } |
100 } |
101 |
101 |
102 void DialpadTestView::setDialpadPosition() |
102 void DialpadTestView::setDialpadPosition() |
103 { |
103 { |
104 // workaround to tsw error JMKN-83NAPU (fix coming in MCL wk14) |
104 QRectF screenRect(mMainWindow.layoutRect()); |
105 // QRectF screenRect(mMainWindow.layoutRect()); |
|
106 QRectF screenRect = (mMainWindow.orientation() == Qt::Horizontal) ? |
|
107 QRectF(0,0,640,360) : QRectF(0,0,360,640); |
|
108 |
105 |
109 if (mMainWindow.orientation() == Qt::Horizontal) { |
106 if (mMainWindow.orientation() == Qt::Horizontal) { |
110 // dialpad takes half of the screen |
107 // dialpad takes half of the screen |
111 if (layoutDirection() == Qt::LeftToRight) { |
108 if (layoutDirection() == Qt::LeftToRight) { |
112 mDialpad->setPos(QPointF(screenRect.width()/2, |
109 mDialpad->setPos(QPointF(screenRect.width()/2, |
208 return HbView::event(event); |
205 return HbView::event(event); |
209 } |
206 } |
210 |
207 |
211 void DialpadTestView::handleLongKeyPress() |
208 void DialpadTestView::handleLongKeyPress() |
212 { |
209 { |
213 HbMessageBox msgBox; |
|
214 QString msg; |
210 QString msg; |
215 msg.append("Long press: "); |
211 msg.append("Long press: "); |
216 msg.append(mPressedKey); |
212 msg.append(mPressedKey); |
217 |
213 |
218 msgBox.setText(msg); |
214 HbMessageBox::information(msg); |
219 msgBox.setTimeout(3000); |
|
220 |
|
221 msgBox.show(); |
|
222 } |
215 } |
223 |
216 |
224 void DialpadTestView::handleDial() |
217 void DialpadTestView::handleDial() |
225 { |
218 { |
226 HbMessageBox msgBox; |
|
227 QString msg; |
219 QString msg; |
228 if (mDialpad->editor().text().length()) { |
220 if (mDialpad->editor().text().length()) { |
229 msg.append("Dialing to number: "); |
221 msg.append("Dialing to number: "); |
230 msg.append(mDialpad->editor().text()); |
222 msg.append(mDialpad->editor().text()); |
231 } else { |
223 } else { |
232 msg.append("Please, enter phone number first"); |
224 msg.append("Please, enter phone number first"); |
233 } |
225 } |
234 |
226 |
235 msgBox.setText(msg); |
227 HbMessageBox::information(msg); |
236 msgBox.setTimeout(3000); |
|
237 |
|
238 msgBox.show(); |
|
239 } |
228 } |
240 |
229 |
241 void DialpadTestView::setTapOutsideDismiss() |
230 void DialpadTestView::setTapOutsideDismiss() |
242 { |
231 { |
243 mTapOutsideDismiss = !mTapOutsideDismiss; |
232 mTapOutsideDismiss = !mTapOutsideDismiss; |