|
1 /*! |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Phone UI's Qt view. |
|
15 * |
|
16 */ |
|
17 #include <hbinstance.h> |
|
18 #include <QSignalMapper> |
|
19 #include <hbaction.h> |
|
20 #include <hbtoolbar.h> |
|
21 #include <hbvolumesliderpopup.h> |
|
22 #include <hbnamespace.h> |
|
23 #include <bubblemanager2.h> |
|
24 #include <hblineedit.h> |
|
25 #include <hbmenu.h> |
|
26 |
|
27 #include <xqserviceutil.h> |
|
28 #include <xqkeycapture.h> |
|
29 #include <dialpad.h> |
|
30 #include <dialpadkeyhandler.h> |
|
31 |
|
32 #include "phoneuiqtview.h" |
|
33 #include "phoneaction.h" |
|
34 #include "qtphonelog.h" |
|
35 |
|
36 PhoneUIQtView::PhoneUIQtView (HbMainWindow &window, QGraphicsItem *parent) : |
|
37 HbView (parent), |
|
38 m_window(window), |
|
39 m_bubbleManager(0), |
|
40 m_signalMapper(0), |
|
41 m_volumeSlider (0), |
|
42 m_expandSignalMapper(0), |
|
43 m_participantListSignalMapper(0), |
|
44 m_volumeCommandId(0), |
|
45 m_backAction(0), |
|
46 m_dialpad(0), |
|
47 m_menuSignalMapper(0), |
|
48 m_keyCapture(0), |
|
49 m_networkInfo(0), |
|
50 m_dialpadKeyHandler(0), |
|
51 m_restrictedMode(false) |
|
52 { |
|
53 // Set network name |
|
54 m_networkInfo = new QSystemNetworkInfo(this); |
|
55 QString networkName = m_networkInfo->networkName(QSystemNetworkInfo::WcdmaMode); |
|
56 if(networkName.isEmpty()) { |
|
57 networkName = m_networkInfo->networkName(QSystemNetworkInfo::GsmMode); |
|
58 } |
|
59 connect(m_networkInfo, SIGNAL (networkNameChanged(QSystemNetworkInfo::NetworkMode,QString)), |
|
60 this, SLOT(networkNameChanged(QSystemNetworkInfo::NetworkMode, QString))); |
|
61 setTitle(networkName); |
|
62 |
|
63 // Capturing long press of end key |
|
64 m_keyCapture = new XQKeyCapture(); |
|
65 |
|
66 // Dialpad |
|
67 m_dialpad = new Dialpad(m_window); |
|
68 m_dialpad->setCallButtonEnabled(false); |
|
69 m_dialpad->setTapOutsideDismiss(true); |
|
70 connect(m_dialpad,SIGNAL(aboutToClose()),this, |
|
71 SLOT(dialpadClosed())); |
|
72 |
|
73 // Call handling widget |
|
74 m_bubbleManager = new BubbleManager (this); |
|
75 setWidget(m_bubbleManager); |
|
76 |
|
77 // Set event filter |
|
78 m_window.installEventFilter(this); |
|
79 |
|
80 m_signalMapper = new QSignalMapper (this); |
|
81 connect(m_signalMapper, SIGNAL (mapped (int)), this, SIGNAL (command (int))); |
|
82 connect(&m_window,SIGNAL(orientationChanged(Qt::Orientation)), |
|
83 this,SLOT(handleOrientationChange(Qt::Orientation))); |
|
84 |
|
85 m_menuSignalMapper = new QSignalMapper(this); |
|
86 connect(m_menuSignalMapper, SIGNAL(mapped(int)), this, SIGNAL(command(int))); |
|
87 |
|
88 m_bubbleManager->handleOrientationChange(m_window.orientation()); |
|
89 |
|
90 // change exit softkey to back button |
|
91 m_backAction = new HbAction(Hb::BackNaviAction, this); |
|
92 connect(m_backAction, SIGNAL(triggered()), this, SLOT(backButtonClicked())); |
|
93 setNavigationAction(m_backAction); |
|
94 |
|
95 createToolBarActions(); |
|
96 |
|
97 // Set restricted mode off, normal state |
|
98 setRestrictedMode(false); |
|
99 } |
|
100 |
|
101 PhoneUIQtView::~PhoneUIQtView () |
|
102 { |
|
103 qDeleteAll(m_toolbarActions); |
|
104 m_window.removeEventFilter(this); |
|
105 delete m_volumeSlider; |
|
106 delete m_dialpad; |
|
107 } |
|
108 |
|
109 BubbleManagerIF& PhoneUIQtView::bubbleManager() |
|
110 { |
|
111 return *m_bubbleManager; |
|
112 } |
|
113 |
|
114 void PhoneUIQtView::addBubbleCommand ( |
|
115 int bubbleId, |
|
116 const PhoneAction& action ) |
|
117 { |
|
118 HbAction* bubbleAction = new HbAction (); |
|
119 bubbleAction->setText (action.text()); |
|
120 bubbleAction->setIcon (action.icon()); |
|
121 setActionRole(action,*bubbleAction); |
|
122 m_bubbleManager->addAction (bubbleId, bubbleAction); |
|
123 |
|
124 QList<int> bubbles = m_bubbleMap.keys(); |
|
125 bool found(false); |
|
126 |
|
127 for ( int i=0; i<bubbles.size(); ++i ) { |
|
128 if (bubbleId==bubbles[i]){ |
|
129 connect(bubbleAction, SIGNAL (triggered ()), m_bubbleMap.value(bubbleId), SLOT (map ())); |
|
130 m_bubbleMap.value(bubbleId)->setMapping(bubbleAction, action.command()); |
|
131 m_bubbleActionMap.value(bubbleId)->append(bubbleAction); |
|
132 found = true; |
|
133 } |
|
134 } |
|
135 |
|
136 if (!found) { |
|
137 QSignalMapper *mapper = new QSignalMapper(); |
|
138 connect(mapper, SIGNAL (mapped (int)), this, SIGNAL (command (int))); |
|
139 connect(bubbleAction, SIGNAL (triggered ()), mapper, SLOT (map ())); |
|
140 mapper->setMapping (bubbleAction, action.command()); |
|
141 QList<HbAction *> *actionList = new QList<HbAction *>(); |
|
142 actionList->append( bubbleAction ); |
|
143 m_bubbleActionMap.insert(bubbleId,actionList); |
|
144 m_bubbleMap.insert(bubbleId,mapper); |
|
145 } |
|
146 } |
|
147 |
|
148 void PhoneUIQtView::addParticipantListAction( |
|
149 int commandId, |
|
150 const QString& text, |
|
151 const HbIcon& icon) |
|
152 { |
|
153 HbAction* action = new HbAction (); |
|
154 action->setText (text); |
|
155 action->setIcon (icon); |
|
156 m_bubbleManager->addParticipantListAction(action); |
|
157 |
|
158 if (!m_participantListSignalMapper) { |
|
159 m_participantListSignalMapper = new QSignalMapper(); |
|
160 connect(m_participantListSignalMapper, SIGNAL (mapped (int)), this, SIGNAL (command (int))); |
|
161 } |
|
162 |
|
163 connect(action, SIGNAL (triggered ()), m_participantListSignalMapper, SLOT (map ())); |
|
164 m_participantListSignalMapper->setMapping (action, commandId); |
|
165 m_participantListActions.append( action ); |
|
166 } |
|
167 |
|
168 void PhoneUIQtView::clearParticipantListActions() |
|
169 { |
|
170 |
|
171 if (m_participantListSignalMapper) { |
|
172 m_bubbleManager->clearParticipantListActions(); |
|
173 |
|
174 foreach (HbAction *action, m_participantListActions ) { |
|
175 m_participantListSignalMapper->removeMappings(action); |
|
176 } |
|
177 qDeleteAll(m_participantListActions); |
|
178 m_participantListActions.clear(); |
|
179 delete m_participantListSignalMapper; |
|
180 m_participantListSignalMapper = 0; |
|
181 } |
|
182 |
|
183 } |
|
184 |
|
185 void PhoneUIQtView::clearBubbleCommands (int bubbleId) |
|
186 { |
|
187 m_bubbleManager->clearActions (bubbleId); |
|
188 QSignalMapper *mapper = m_bubbleMap.value(bubbleId); |
|
189 |
|
190 if (mapper) { |
|
191 QList<HbAction *> *actions = m_bubbleActionMap.value(bubbleId); |
|
192 if (actions) { |
|
193 foreach (HbAction *action, *actions ) { |
|
194 mapper->removeMappings(action); |
|
195 } |
|
196 |
|
197 qDeleteAll(*actions); |
|
198 actions->clear(); |
|
199 delete actions; |
|
200 } |
|
201 |
|
202 m_bubbleMap.remove(bubbleId); |
|
203 m_bubbleActionMap.remove(bubbleId); |
|
204 delete mapper; |
|
205 } |
|
206 |
|
207 } |
|
208 |
|
209 void PhoneUIQtView::setToolbarActions(const QList<PhoneAction*>& actions) |
|
210 { |
|
211 // clear current toolbar actions |
|
212 for (int i=0;i<toolBar()->actions().count();++i) { |
|
213 m_signalMapper->removeMappings( |
|
214 static_cast<HbAction*>(toolBar()->actions().at(i))); |
|
215 } |
|
216 |
|
217 QList<QAction*> toolBarActions = toolBar()->actions(); |
|
218 |
|
219 if (toolBarActions.size()<actions.size()) { |
|
220 for (int i=toolBarActions.size(); i<actions.size(); ++i) { |
|
221 toolBar()->addAction(m_toolbarActions.at(i)); |
|
222 } |
|
223 } else if (toolBarActions.size()>actions.size()) { |
|
224 for (int i=toolBarActions.size(); 0<i; --i) { |
|
225 if (i>actions.size()) { |
|
226 HbAction* action = static_cast<HbAction*>(toolBarActions.at(i-1)); |
|
227 toolBar()->removeAction(action); |
|
228 } |
|
229 } |
|
230 } |
|
231 |
|
232 for (int i=0; i<toolBar()->actions().size(); ++i) { |
|
233 |
|
234 if (i<actions.count()) { |
|
235 HbAction* action = static_cast<HbAction*>(toolBar()->actions().at(i)); |
|
236 action->setText(actions.at(i)->text()); |
|
237 action->setIcon(actions.at(i)->icon()); |
|
238 action->setDisabled(actions.at(i)->isDisabled()); |
|
239 |
|
240 m_signalMapper->setMapping(action, actions.at(i)->command()); |
|
241 } |
|
242 } |
|
243 |
|
244 if ( m_window.orientation() == Qt::Horizontal ) { |
|
245 toolBar()->setOrientation(Qt::Horizontal); |
|
246 } |
|
247 // update toolbar |
|
248 toolBar()->update(); |
|
249 } |
|
250 |
|
251 void PhoneUIQtView::hideToolbar () |
|
252 { |
|
253 toolBar()->hide (); |
|
254 } |
|
255 |
|
256 void PhoneUIQtView::showToolbar () |
|
257 { |
|
258 setFocus(); |
|
259 toolBar()->show(); |
|
260 } |
|
261 |
|
262 int PhoneUIQtView::volumeSliderValue () |
|
263 { |
|
264 if (m_volumeSlider) { |
|
265 return m_volumeSlider->value (); |
|
266 } else { |
|
267 return -1; |
|
268 } |
|
269 } |
|
270 |
|
271 void PhoneUIQtView::removeVolumeSlider () |
|
272 { |
|
273 if (m_volumeSlider) { |
|
274 if (m_volumeSlider->isVisible()) { |
|
275 m_volumeSlider->hide(); |
|
276 } |
|
277 m_volumeSlider->deleteLater(); |
|
278 m_volumeSlider = 0; |
|
279 } |
|
280 } |
|
281 |
|
282 void PhoneUIQtView::volumeSliderClosed () |
|
283 { |
|
284 removeVolumeSlider(); |
|
285 } |
|
286 |
|
287 void PhoneUIQtView::setVolumeSliderValue ( |
|
288 int value, int commandId, int maxVolumeValue, int minVolumeValue) |
|
289 { |
|
290 m_volumeCommandId = commandId; |
|
291 |
|
292 if (!m_volumeSlider) { |
|
293 m_volumeSlider = new HbVolumeSliderPopup (); |
|
294 m_volumeSlider->setDismissPolicy(HbDialog::TapOutside); |
|
295 m_volumeSlider->setTimeout (10000); // TODO: 10 seconds for now, replace with correct value when spec is ready and says what it is |
|
296 connect(m_volumeSlider, SIGNAL(valueChanged(int)), this, SLOT(volumeSliderChanged(int))); |
|
297 connect(m_volumeSlider, SIGNAL(aboutToClose()), this, SLOT(volumeSliderClosed())); |
|
298 } |
|
299 |
|
300 |
|
301 if (m_volumeSlider->minimum() != minVolumeValue || |
|
302 m_volumeSlider->maximum() != maxVolumeValue ) { |
|
303 m_volumeSlider->setRange (minVolumeValue, maxVolumeValue); |
|
304 } |
|
305 |
|
306 if (value != m_volumeSlider->value()) |
|
307 m_volumeSlider->setValue (value); |
|
308 |
|
309 if (false == m_volumeSlider->isVisible()) { |
|
310 m_volumeSlider->show(); |
|
311 } |
|
312 } |
|
313 |
|
314 void PhoneUIQtView::volumeSliderChanged(int value) |
|
315 { |
|
316 Q_UNUSED (value); |
|
317 emit command (m_volumeCommandId); |
|
318 } |
|
319 |
|
320 void PhoneUIQtView::setExpandAction(int bubbleId, int commandId) |
|
321 { |
|
322 removeExpandAction(bubbleId); |
|
323 |
|
324 HbAction* action = new HbAction(); |
|
325 m_bubbleManager->setExpandAction(bubbleId, action); |
|
326 |
|
327 if (!m_expandSignalMapper) { |
|
328 m_expandSignalMapper = new QSignalMapper(this); |
|
329 connect(m_expandSignalMapper, SIGNAL (mapped (int)), |
|
330 this, SIGNAL (command (int))); |
|
331 } |
|
332 |
|
333 connect(action, SIGNAL (triggered ()), m_expandSignalMapper, SLOT (map ())); |
|
334 m_expandSignalMapper->setMapping(action, commandId); |
|
335 |
|
336 m_expandActionMap.insert(bubbleId,action); |
|
337 } |
|
338 |
|
339 void PhoneUIQtView::removeExpandAction(int bubbleId) |
|
340 { |
|
341 if (m_expandActionMap.contains(bubbleId)) { |
|
342 m_bubbleManager->setExpandAction(bubbleId, 0); |
|
343 HbAction* action = m_expandActionMap.value(bubbleId); |
|
344 m_expandSignalMapper->removeMappings(action); |
|
345 m_expandActionMap.remove(bubbleId); |
|
346 delete action; |
|
347 } |
|
348 } |
|
349 |
|
350 void PhoneUIQtView::showDialpad() |
|
351 { |
|
352 if (false == m_dialpad->isVisible()) { |
|
353 setDialpadPosition(); |
|
354 m_dialpad->openDialpad(); |
|
355 } |
|
356 } |
|
357 |
|
358 void PhoneUIQtView::hideDialpad() |
|
359 { |
|
360 if (true == m_dialpad->isVisible()) |
|
361 m_dialpad->closeDialpad(); |
|
362 } |
|
363 |
|
364 bool PhoneUIQtView::isDialpadVisible() |
|
365 { |
|
366 return m_dialpad->isVisible(); |
|
367 } |
|
368 |
|
369 QString PhoneUIQtView::dialpadText() |
|
370 { |
|
371 return m_dialpad->editor().text(); |
|
372 } |
|
373 |
|
374 void PhoneUIQtView::clearAndHideDialpad() |
|
375 { |
|
376 m_dialpad->editor().setText(QString("")); |
|
377 m_dialpad->closeDialpad(); |
|
378 } |
|
379 |
|
380 void PhoneUIQtView::clearDialpad() |
|
381 { |
|
382 m_dialpad->editor().setText(QString("")); |
|
383 } |
|
384 |
|
385 void PhoneUIQtView::bringToForeground() |
|
386 { |
|
387 m_window.show(); |
|
388 } |
|
389 |
|
390 void PhoneUIQtView::setMenuActions(const QList<PhoneAction*>& actions) |
|
391 { |
|
392 |
|
393 for (int i=menu()->actions().count(); 0<i; --i) { |
|
394 HbAction* action = static_cast<HbAction*>(menu()->actions().at(i-1)); |
|
395 m_menuSignalMapper->removeMappings(action); |
|
396 menu()->removeAction(action); |
|
397 delete action; |
|
398 } |
|
399 |
|
400 for (int i=0; i<actions.count(); ++i) { |
|
401 HbAction* action = new HbAction(); |
|
402 action->setText(actions.at(i)->text()); |
|
403 menu()->addAction(action); |
|
404 connect(action, SIGNAL(triggered()), m_menuSignalMapper, SLOT(map())); |
|
405 m_menuSignalMapper->setMapping(action, actions.at(i)->command()); |
|
406 } |
|
407 |
|
408 } |
|
409 |
|
410 HbMenu &PhoneUIQtView::menuReference() |
|
411 { |
|
412 return *menu(); |
|
413 } |
|
414 |
|
415 void PhoneUIQtView::captureKey(Qt::Key key, bool capture) |
|
416 { |
|
417 if (capture) { |
|
418 if (!m_keyCaptures.contains(key)) { |
|
419 m_keyCapture->captureLongKey(key); |
|
420 m_keyCapture->captureKey(key); |
|
421 m_keyCaptures.append(key); |
|
422 } |
|
423 } else { |
|
424 if (m_keyCaptures.contains(key)) { |
|
425 m_keyCapture->cancelCaptureKey(key); |
|
426 m_keyCapture->cancelCaptureLongKey(key); |
|
427 m_keyCaptures.removeOne(key); |
|
428 } |
|
429 } |
|
430 } |
|
431 |
|
432 void PhoneUIQtView::handleOrientationChange(Qt::Orientation orientation) |
|
433 { |
|
434 if (orientation==Qt::Horizontal) { |
|
435 toolBar()->setOrientation(Qt::Horizontal); |
|
436 } |
|
437 |
|
438 m_bubbleManager->handleOrientationChange(orientation); |
|
439 |
|
440 setDialpadPosition(); |
|
441 } |
|
442 |
|
443 void PhoneUIQtView::backButtonClicked() |
|
444 { |
|
445 XQServiceUtil::toBackground(true); |
|
446 } |
|
447 |
|
448 void PhoneUIQtView::onEditorContentChanged() |
|
449 { |
|
450 m_dialpad->setCallButtonEnabled( |
|
451 m_dialpad->editor().text().length()); |
|
452 } |
|
453 |
|
454 void PhoneUIQtView::dialpadClosed() |
|
455 { |
|
456 emit dialpadIsAboutToClose(); |
|
457 } |
|
458 |
|
459 bool PhoneUIQtView::eventFilter(QObject *watched, QEvent * event) |
|
460 { |
|
461 Q_UNUSED(watched); |
|
462 PHONE_DEBUG2("PhoneUIQtView::eventFilter event type:", event->type()); |
|
463 |
|
464 // Allow send key only when there is callbutton enabled or no text in input field |
|
465 bool sendKeyAllowed = m_dialpad->isCallButtonEnabled() || |
|
466 (m_dialpad->editor().text().length() == 0); |
|
467 |
|
468 if(event->type() == QEvent::KeyPress) { |
|
469 QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event); |
|
470 PHONE_DEBUG2("PhoneUIQtView::eventFilter pressed key:", keyEvent->key()); |
|
471 PHONE_DEBUG2("PhoneUIQtView::eventFilter isAutoRepeat:", keyEvent->isAutoRepeat()); |
|
472 if ( (keyEvent->key() != Qt::Key_Yes && keyEvent->key() != Qt::Key_Enter) || |
|
473 sendKeyAllowed) { |
|
474 emit keyPressed(keyEvent); |
|
475 keyEvent->accept(); |
|
476 } |
|
477 |
|
478 return false; |
|
479 } else if(event->type() == QEvent::KeyRelease) { |
|
480 QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event); |
|
481 PHONE_DEBUG2("PhoneUIQtView::eventFilter released key:", keyEvent->key()); |
|
482 if ( (keyEvent->key() != Qt::Key_Yes && keyEvent->key() != Qt::Key_Enter) || |
|
483 sendKeyAllowed) { |
|
484 emit keyReleased(keyEvent); |
|
485 keyEvent->accept(); |
|
486 } |
|
487 return false; |
|
488 } else if (event->type() == QEvent::WindowActivate){ |
|
489 PHONE_DEBUG("PhoneUIQtView::eventFilter WindowActivate"); |
|
490 emit windowActivated(); |
|
491 return false; |
|
492 } else if (event->type() == QEvent::WindowDeactivate){ |
|
493 PHONE_DEBUG("PhoneUIQtView::eventFilter WindowDeactivate"); |
|
494 emit windowDeactivated(); |
|
495 return false; |
|
496 }else{ |
|
497 return false; |
|
498 } |
|
499 } |
|
500 |
|
501 void PhoneUIQtView::setDialpadPosition() |
|
502 { |
|
503 QRectF screenRect(m_window.layoutRect()); |
|
504 |
|
505 if (m_window.orientation() == Qt::Horizontal) { |
|
506 // dialpad takes half of the screen |
|
507 m_dialpad->setPos(QPointF(screenRect.width()/2, |
|
508 this->scenePos().y())); |
|
509 m_dialpad->setPreferredSize(screenRect.width()/2, |
|
510 (screenRect.height()-scenePos().y())); |
|
511 } else { |
|
512 // dialpad takes 65% of the screen height |
|
513 qreal screenHeight = screenRect.height(); |
|
514 m_dialpad->setPos(QPointF(0, |
|
515 screenHeight/2.25)); |
|
516 m_dialpad->setPreferredSize(screenRect.width(), |
|
517 screenHeight-screenHeight/2.25); |
|
518 } |
|
519 } |
|
520 |
|
521 void PhoneUIQtView::setActionRole(const PhoneAction& pa, HbAction& action) |
|
522 { |
|
523 if (pa.actionRole()==PhoneAction::Accept) { |
|
524 action.setSoftKeyRole(QAction::PositiveSoftKey); |
|
525 } else if (pa.actionRole()==PhoneAction::Decline) { |
|
526 action.setSoftKeyRole(QAction::NegativeSoftKey); |
|
527 } |
|
528 } |
|
529 |
|
530 void PhoneUIQtView::createToolBarActions() |
|
531 { |
|
532 for (int i=0;i<4;++i) { |
|
533 HbAction* action = new HbAction(); |
|
534 connect(action, SIGNAL(triggered()), m_signalMapper, SLOT(map())); |
|
535 m_toolbarActions.append(action); |
|
536 } |
|
537 } |
|
538 |
|
539 void PhoneUIQtView::shutdownPhoneApp() |
|
540 { |
|
541 PHONE_DEBUG("PhoneUIQtView::shutdownPhoneApp"); |
|
542 QCoreApplication::quit(); |
|
543 } |
|
544 |
|
545 void PhoneUIQtView::setBackButtonVisible(bool visible) |
|
546 { |
|
547 if (!m_restrictedMode) { |
|
548 m_backAction->setEnabled(visible); |
|
549 } |
|
550 } |
|
551 |
|
552 void PhoneUIQtView::setRestrictedMode(bool restrictedMode) |
|
553 { |
|
554 m_restrictedMode = restrictedMode; |
|
555 m_backAction->setEnabled(!restrictedMode); |
|
556 m_dialpad->setCallButtonEnabled(false); |
|
557 m_dialpad->editor().setText(""); // Clead dialpad |
|
558 if (m_restrictedMode) { |
|
559 delete m_dialpadKeyHandler; |
|
560 m_dialpadKeyHandler = 0; |
|
561 m_dialpadKeyHandler = new DialpadKeyHandler( |
|
562 m_dialpad, DialpadKeyHandler::EmergencyCall, this); |
|
563 disconnect(&m_dialpad->editor(),SIGNAL(contentsChanged()), |
|
564 this, SLOT(onEditorContentChanged())); // Let emergency handler do updating |
|
565 } else { |
|
566 delete m_dialpadKeyHandler; |
|
567 m_dialpadKeyHandler = 0; |
|
568 // enable key sequence handling during a call |
|
569 m_dialpadKeyHandler = new DialpadKeyHandler( |
|
570 m_dialpad, DialpadKeyHandler::KeySequence, this); |
|
571 connect(&m_dialpad->editor(),SIGNAL(contentsChanged()), |
|
572 SLOT(onEditorContentChanged())); // Update our self |
|
573 } |
|
574 |
|
575 } |
|
576 |
|
577 void PhoneUIQtView::networkNameChanged(QSystemNetworkInfo::NetworkMode mode, const QString &netName) |
|
578 { |
|
579 if((mode == QSystemNetworkInfo::GsmMode) || |
|
580 (mode == QSystemNetworkInfo::WcdmaMode)) { |
|
581 setTitle(netName); |
|
582 } |
|
583 } |
|
584 |