author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:33:21 +0100 | |
branch | GCC_SURGE |
changeset 51 | f39ed5e045e0 |
parent 30 | ebdbd102c78a |
parent 46 | bc5a64e5bc3c |
permissions | -rw-r--r-- |
37 | 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 symbian adapter for Qt view. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#include "phoneuiqtviewadapter.h" |
|
19 |
#include "phoneuiqtviewif.h" |
|
20 |
#include "phonebubblewrapper.h" |
|
21 |
#include "tphonecmdparaminteger.h" |
|
22 |
#include "tphonecmdparamboolean.h" |
|
23 |
#include "tphonecmdparamaudioavailability.h" |
|
24 |
#include "tphonecmdparamaudiooutput.h" |
|
25 |
#include "tphonecmdparamcallstatedata.h" |
|
26 |
#include "tphonecmdparamcallheaderdata.h" |
|
27 |
#include "tphonecmdparamemergencycallheaderdata.h" |
|
28 |
#include "tphonecmdparamstring.h" |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
29 |
#include "tphonecmdparamkeycapture.h" |
37 | 30 |
#include "cphonepubsubproxy.h" |
31 |
#include "pevirtualengine.h" |
|
32 |
#include "cphoneringingtonecontroller.h" |
|
33 |
#include "phoneresourceadapter.h" |
|
34 |
#include "phoneui.hrh" |
|
35 |
#include "cphonemediatorfactory.h" |
|
36 |
#include "phoneuiqtbuttonscontroller.h" |
|
37 |
#include "phoneconstants.h" |
|
38 |
#include "phonenotecontroller.h" |
|
39 |
#include "telephonyservice.h" |
|
40 |
#include "phoneuicommandcontroller.h" |
|
41 |
#include "phonemessagecontroller.h" |
|
42 |
#include "phoneindicatorcontroller.h" |
|
43 |
#include "qtphonelog.h" |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
44 |
#include "phonevisibilityhandler.h" |
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
45 |
#include "phoneapplauncher.h" |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
46 |
#include "cphonecenrepproxy.h" |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
47 |
|
37 | 48 |
#include <UikonInternalPSKeys.h> |
49 |
#include <bubblemanagerif.h> |
|
50 |
#include <hbaction.h> |
|
51 |
#include <pevirtualengine.h> |
|
52 |
#include <QtGlobal> |
|
53 |
#include <xqserviceutil.h> |
|
54 |
#include <hbinstance.h> |
|
55 |
#include <QKeyEvent> |
|
56 |
#include <hbextendedlocale.h> |
|
57 |
#include <hbi18ndef.h> |
|
58 |
#include <eikenv.h> |
|
59 |
#include <w32std.h> |
|
60 |
#include <hbstringutil.h> |
|
61 |
#include <AknSgcc.h> |
|
62 |
#include <AknCapServerClient.h> |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
63 |
#include <logsservices.h> |
37 | 64 |
|
65 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
66 |
|
37 | 67 |
//CONSTANTS |
68 |
static const int PHONE_CALL_NOT_FOUND = -1; |
|
69 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
70 |
const TUid KCRUidTelTouchButtons = {0x2001B2E6}; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
71 |
const TUint32 KTelIncallTouchButtons = 0x00000001; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
72 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
73 |
|
37 | 74 |
PhoneUIQtViewAdapter::PhoneUIQtViewAdapter (PhoneUIQtViewIF &view, QObject *parent) : |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
75 |
QObject (parent), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
76 |
m_view (view), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
77 |
m_idleUid(-1), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
78 |
m_bubbleWrapper(0), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
79 |
m_ringingtonecontroller(0), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
80 |
m_resourceAdapter(0), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
81 |
m_noteController(0), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
82 |
m_telephonyService(0), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
83 |
m_uiCommandController(0), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
84 |
m_messageController(0), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
85 |
m_indicatorController(0), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
86 |
m_dialpadAboutToClose(false), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
87 |
m_homeScreenToForeground(false), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
88 |
m_visibilityHandler(0), |
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
89 |
m_appLauncher(0), |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
90 |
m_clearDialpadOnClose(true), |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
91 |
m_speakerAsDefaultButton(false) |
37 | 92 |
{ |
93 |
m_bubbleWrapper = new PhoneBubbleWrapper(m_view.bubbleManager (), this); |
|
94 |
m_noteController = new PhoneNoteController(this); |
|
95 |
m_uiCommandController = new PhoneUiCommandController(view, this); |
|
96 |
||
97 |
TRAPD( error, m_ringingtonecontroller = CPhoneRingingToneController::NewL () ); |
|
98 |
qt_symbian_throwIfError(error); |
|
99 |
m_resourceAdapter = PhoneResourceAdapter::Instance(this); |
|
100 |
||
101 |
// display initial toolbar to make client area size correct |
|
102 |
TPhoneCmdParamInteger intParam; |
|
103 |
intParam.SetInteger(m_resourceAdapter->defaultToolbarResourceId()); |
|
104 |
setToolbarButtons(&intParam); |
|
105 |
||
106 |
m_telephonyService = new TelephonyService (this, this); |
|
107 |
m_indicatorController = new PhoneIndicatorController(this); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
108 |
m_visibilityHandler = new PhoneVisibilityHandler(view, this); |
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
109 |
m_appLauncher = new PhoneAppLauncher(this); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
110 |
m_messageController = new PhoneMessageController(*m_appLauncher, this); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
111 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
112 |
int touchButton(-1); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
113 |
if ( KErrNone == CPhoneCenRepProxy::Instance()->GetInt( |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
114 |
KCRUidTelTouchButtons, |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
115 |
KTelIncallTouchButtons, |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
116 |
touchButton ) ) { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
117 |
if ( touchButton == 2 ) { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
118 |
m_speakerAsDefaultButton = true; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
119 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
120 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
121 |
|
37 | 122 |
} |
123 |
||
124 |
PhoneUIQtViewAdapter::~PhoneUIQtViewAdapter () |
|
125 |
{ |
|
126 |
delete m_ringingtonecontroller; |
|
127 |
} |
|
128 |
||
129 |
void PhoneUIQtViewAdapter::ExecuteCommandL (TPhoneViewCommandId aCmdId) |
|
130 |
{ |
|
131 |
switch (aCmdId) { |
|
132 |
case EPhoneAppShutDown: |
|
133 |
{ |
|
134 |
m_view.shutdownPhoneApp(); |
|
135 |
} |
|
136 |
break; |
|
137 |
||
138 |
case EPhoneViewSetIdleTopApplication: |
|
139 |
{ |
|
140 |
TPhoneCmdParamInteger uidParam; |
|
141 |
uidParam.SetInteger (idleAppUid()); |
|
142 |
setTopApplication (&uidParam); |
|
143 |
} |
|
144 |
break; |
|
145 |
||
146 |
case EPhoneViewMuteRingToneOnAnswer: |
|
147 |
m_ringingtonecontroller->MuteRingingToneOnAnswer(); |
|
148 |
break; |
|
149 |
||
150 |
case EPhoneViewStopRingTone: |
|
151 |
m_ringingtonecontroller->StopPlaying(); |
|
152 |
break; |
|
153 |
||
154 |
case EPhoneViewMuteRingTone: |
|
155 |
m_ringingtonecontroller->MuteRingingTone(); |
|
156 |
break; |
|
157 |
||
158 |
case EPhoneViewHideNaviPaneAudioVolume: |
|
159 |
m_view.removeVolumeSlider (); |
|
160 |
break; |
|
161 |
||
162 |
case EPhoneViewOpenDialer: |
|
163 |
openDialpad(); |
|
164 |
break; |
|
165 |
||
166 |
case EPhoneViewRemoveConferenceBubble: |
|
167 |
removeConferenceBubble(); |
|
168 |
break; |
|
169 |
||
170 |
case EPhoneViewSendToBackground: |
|
171 |
case EPhoneViewBringIdleToForeground: |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
172 |
m_visibilityHandler->sendToBackground(m_homeScreenToForeground); |
37 | 173 |
m_homeScreenToForeground = false; |
174 |
break; |
|
175 |
case EPhoneViewRemoveAllCallHeaders: |
|
176 |
removeAllCallHeaders(); |
|
177 |
break; |
|
178 |
case EPhoneViewRemoveNumberEntry: |
|
179 |
case EPhoneViewClearNumberEntryContent: // Fall through |
|
180 |
removeDialpad(); |
|
181 |
break; |
|
182 |
case EPhoneViewAddToConference: |
|
183 |
addToConference(); |
|
184 |
break; |
|
185 |
case EPhoneViewRemoveDtmfNote: |
|
186 |
m_noteController->removeDtmfNote(); |
|
187 |
break; |
|
188 |
case EPhoneViewRemoveNote: |
|
189 |
m_noteController->removeNote(); |
|
190 |
break; |
|
191 |
case EPhoneViewRemoveQuery: |
|
192 |
m_noteController->removeQuery(); |
|
193 |
break; |
|
194 |
case EPhoneViewRemovePhoneDialogs: |
|
195 |
m_noteController->removeNote(); |
|
196 |
m_noteController->removeQuery(); |
|
197 |
break; |
|
198 |
case EPhoneViewRemoveGlobalNote: |
|
199 |
case EPhoneViewRemoveGlobalWaitNote: |
|
200 |
m_noteController->removeGlobalWaitNote(); |
|
201 |
break; |
|
202 |
case EPhoneViewUpdateFSW: |
|
203 |
setHidden(true); |
|
204 |
break; |
|
205 |
default: |
|
206 |
break; |
|
207 |
} |
|
208 |
CPhoneMediatorFactory::Instance()->Sender()->SendEvent( aCmdId ); |
|
209 |
} |
|
210 |
||
211 |
void PhoneUIQtViewAdapter::ExecuteCommandL (TPhoneViewCommandId aCmdId, TInt aCallId) |
|
212 |
{ |
|
213 |
switch (aCmdId) { |
|
214 |
case EPhoneViewRemoveCallHeader: |
|
215 |
{ |
|
216 |
m_bubbleWrapper->bubbleManager().startChanges(); |
|
217 |
int bubble = m_bubbleWrapper->bubbles().value(aCallId); |
|
218 |
m_view.clearBubbleCommands(bubble); |
|
219 |
m_view.removeExpandAction(bubble); |
|
220 |
m_bubbleWrapper->removeCallHeader (aCallId); |
|
221 |
m_bubbleWrapper->bubbleManager().endChanges(); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
222 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
223 |
if (!m_bubbleWrapper->bubbles().count()) { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
224 |
m_indicatorController->clearActiveCallData(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
225 |
} |
37 | 226 |
} |
227 |
break; |
|
228 |
case EPhoneViewRemoveFromConference: |
|
229 |
removeCallFromConference(aCallId); |
|
230 |
break; |
|
231 |
case EPhoneViewPrivateFromConference: |
|
232 |
setPrivateFromConference(aCallId); |
|
233 |
break; |
|
234 |
default: |
|
235 |
break; |
|
236 |
} |
|
237 |
CPhoneMediatorFactory::Instance()->Sender()->SendEvent( aCmdId, aCallId ); |
|
238 |
} |
|
239 |
||
240 |
void PhoneUIQtViewAdapter::ExecuteCommandL (TPhoneViewCommandId aCmdId, TPhoneCommandParam* aCommandParam) |
|
241 |
{ |
|
242 |
switch (aCmdId) { |
|
243 |
case EPhoneViewSetTopApplication: |
|
244 |
setTopApplication (aCommandParam); |
|
245 |
break; |
|
246 |
case EPhoneViewPlayRingTone: |
|
247 |
m_ringingtonecontroller->PlayRingToneL( aCommandParam ); |
|
248 |
break; |
|
249 |
case EPhoneViewSetTouchPaneButtons: |
|
250 |
setTouchButtons (aCommandParam); |
|
251 |
setExpandActions(); |
|
252 |
break; |
|
253 |
case EPhoneViewUpdateCba: |
|
254 |
setToolbarButtons (aCommandParam); |
|
255 |
break; |
|
256 |
case EPhoneViewSetHoldFlag: |
|
257 |
setCallHoldFlag (aCommandParam); |
|
258 |
break; |
|
259 |
case EPhoneViewGetHoldFlag: |
|
260 |
callHoldFlag (aCommandParam); |
|
261 |
break; |
|
262 |
case EPhoneViewSetNaviPaneAudioVolume: |
|
263 |
setAudioVolumeSliderValue (aCommandParam); |
|
264 |
break; |
|
265 |
case EPhoneViewActivateMuteUIChanges: |
|
266 |
setMuteIndication(aCommandParam); |
|
267 |
break; |
|
268 |
case EPhoneViewGetCountOfActiveCalls: |
|
269 |
activeCallCount(aCommandParam); |
|
270 |
break; |
|
271 |
case EPhoneViewActivateAudioPathUIChanges: |
|
272 |
setAudioPath(aCommandParam); |
|
273 |
break; |
|
274 |
case EPhoneViewGetExpandedBubbleCallId: |
|
275 |
expandedBubbleCallId(aCommandParam); |
|
276 |
break; |
|
277 |
case EPhoneViewGetIsConference: |
|
278 |
isConference(aCommandParam); |
|
279 |
break; |
|
280 |
case EPhoneViewBringAppToForeground: |
|
281 |
bringToForeground(); |
|
282 |
break; |
|
283 |
case EPhoneViewShowGlobalNote: |
|
284 |
showGlobalNote(aCommandParam); |
|
285 |
break; |
|
286 |
case EPhoneViewSetNumberEntryVisible: |
|
287 |
setDialpadVisibility(aCommandParam); |
|
288 |
break; |
|
289 |
case EPhoneViewGetNumberEntryCount: |
|
290 |
getDialpadStringLength(aCommandParam); |
|
291 |
break; |
|
292 |
case EPhoneViewGetNumberFromEntry: |
|
293 |
getNumberFromDialpad(aCommandParam); |
|
294 |
break; |
|
295 |
case EPhoneViewShowNote: |
|
296 |
showNote(aCommandParam); |
|
297 |
break; |
|
298 |
case EPhoneViewShowQuery: |
|
299 |
m_noteController->showQuery(aCommandParam); |
|
300 |
break; |
|
301 |
case EPhoneViewOpenSoftRejectEditor: |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
302 |
m_visibilityHandler->hideDeviceDialogs(false); |
37 | 303 |
m_messageController->openSoftRejectMessageEditor(aCommandParam); |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
304 |
break; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
305 |
case EPhoneViewSetGlobalNotifiersDisabled: |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
306 |
hideDeviceDialogs(aCommandParam); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
307 |
break; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
308 |
case EPhoneViewLaunchLogs: |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
309 |
openLogs(aCommandParam); |
37 | 310 |
break; |
311 |
default: |
|
312 |
break; |
|
313 |
} |
|
314 |
CPhoneMediatorFactory::Instance()->Sender()->SendEvent( aCmdId, *aCommandParam ); |
|
315 |
} |
|
316 |
||
317 |
void PhoneUIQtViewAdapter::ExecuteCommandL (TPhoneViewCommandId aCmdId, TInt aCallId, |
|
318 |
TPhoneCommandParam *aCommandParam) |
|
319 |
{ |
|
320 |
switch (aCmdId) { |
|
321 |
case EPhoneViewCreateCallHeader: |
|
322 |
createCallHeader (aCallId, aCommandParam); |
|
323 |
break; |
|
324 |
case EPhoneViewCreateEmergencyCallHeader: |
|
325 |
createEmergencyCallHeader (aCallId, aCommandParam); |
|
326 |
break; |
|
327 |
case EPhoneViewUpdateBubble: |
|
328 |
updateCallHeaderState (aCallId, aCommandParam); |
|
329 |
setExpandActions(); |
|
330 |
break; |
|
331 |
case EPhoneViewUpdateCallHeaderRemoteInfoData: |
|
332 |
updateCallHeaderRemoteInfo (aCallId, aCommandParam); |
|
333 |
break; |
|
334 |
case EPhoneViewUpdateCallHeaderRemoteInfoDataAndLabel: |
|
335 |
updateCallHeaderRemoteInfoAndLabel(aCallId, aCommandParam); |
|
336 |
break; |
|
337 |
case EPhoneViewCreateConference: |
|
338 |
createConferenceBubble(aCallId, aCommandParam); |
|
339 |
break; |
|
340 |
case EPhoneViewGetCallExistsInConference: |
|
341 |
conferenceCallId(aCallId, aCommandParam); |
|
342 |
break; |
|
343 |
case EPhoneViewUpdateCallHeaderCallDuration: |
|
344 |
{ |
|
345 |
TPhoneCmdParamInteger *time = static_cast<TPhoneCmdParamInteger *>(aCommandParam); |
|
346 |
QString duration = convertDuration(time->Integer()); |
|
347 |
PHONE_DEBUG2("call duration:", duration); |
|
348 |
int bubbleId = m_bubbleWrapper->bubbleId(aCallId); |
|
349 |
||
350 |
if (-1 != bubbleId) { |
|
351 |
m_bubbleWrapper->bubbleManager().updateCallTime(bubbleId, duration); |
|
352 |
} |
|
353 |
break; |
|
354 |
} |
|
355 |
||
356 |
case EPhoneViewCipheringInfoChange: |
|
357 |
{ |
|
358 |
handleCipheringInfoChange(aCallId, aCommandParam); |
|
359 |
break; |
|
360 |
} |
|
361 |
||
362 |
default: |
|
363 |
break; |
|
364 |
} |
|
365 |
CPhoneMediatorFactory::Instance()->Sender()->SendEvent( aCmdId, aCallId, *aCommandParam ); |
|
366 |
} |
|
367 |
||
368 |
void PhoneUIQtViewAdapter::ExecuteCommandL (TPhoneViewCommandId aCmdId, TInt aCallId, |
|
369 |
TDesC &aMessage) |
|
370 |
{ |
|
371 |
switch (aCmdId) { |
|
372 |
||
373 |
default: |
|
374 |
break; |
|
375 |
} |
|
376 |
CPhoneMediatorFactory::Instance()->Sender()->SendEvent( aCmdId, aCallId, &aMessage ); |
|
377 |
} |
|
378 |
||
379 |
TPhoneViewResponseId PhoneUIQtViewAdapter::HandleCommandL (TPhoneViewCommandId aCmdId) |
|
380 |
{ |
|
381 |
TPhoneViewResponseId response = EPhoneViewResponseSuccess; |
|
382 |
||
383 |
switch (aCmdId) { |
|
384 |
case EPhoneIsDTMFDialerVisible: |
|
385 |
case EPhoneViewIsDTMFEditorVisible: //TODO |
|
386 |
case EPhoneIsCustomizedDialerVisible: |
|
387 |
case EPhoneViewGetNeedToSendToBackgroundStatus: |
|
388 |
// TODO: currently not supported |
|
389 |
response = EPhoneViewResponseFailed; |
|
390 |
break; |
|
391 |
case EPhoneViewIsMenuBarVisible: |
|
392 |
{ |
|
393 |
//TODO |
|
394 |
response = EPhoneViewResponseFailed; |
|
395 |
break; |
|
396 |
} |
|
397 |
case EPhoneViewGetNumberEntryIsVisibleStatus: |
|
398 |
case EPhoneViewGetNumberEntryIsUsedStatus: // Fall through |
|
399 |
{ |
|
400 |
response = (m_view.isDialpadVisible() && !m_dialpadAboutToClose) ? |
|
401 |
EPhoneViewResponseSuccess : |
|
402 |
EPhoneViewResponseFailed; |
|
403 |
break; |
|
404 |
} |
|
405 |
default: |
|
406 |
break; |
|
407 |
} |
|
408 |
||
409 |
return response; |
|
410 |
} |
|
411 |
||
412 |
TPhoneViewResponseId PhoneUIQtViewAdapter::HandleCommandL (TPhoneViewCommandId aCmdId, |
|
413 |
TPhoneCommandParam *aCommandParam) |
|
414 |
{ |
|
415 |
TPhoneViewResponseId viewResponse = EPhoneViewResponseSuccess; |
|
416 |
||
417 |
switch (aCmdId) { |
|
418 |
case EPhoneViewGetCallIdByState: |
|
419 |
viewResponse = callIdByState (aCommandParam); |
|
420 |
break; |
|
421 |
case EPhoneViewSelectedConfMember: |
|
422 |
viewResponse = getSelectedConferenceMember (aCommandParam); |
|
423 |
break; |
|
424 |
default: |
|
425 |
break; |
|
426 |
} |
|
427 |
||
428 |
return viewResponse; |
|
429 |
} |
|
430 |
||
431 |
void PhoneUIQtViewAdapter::ExecuteCommand (TPhoneViewCommandId aCmdId) |
|
432 |
{ |
|
433 |
switch (aCmdId) { |
|
434 |
case EPhoneSetConferenceExpanded: |
|
435 |
m_bubbleWrapper->bubbleManager ().startChanges (); |
|
436 |
m_bubbleWrapper->bubbleManager().setExpandedConferenceCallHeader( |
|
437 |
m_bubbleWrapper->conferenceCallList().size()); |
|
438 |
m_bubbleWrapper->bubbleManager ().endChanges (); |
|
439 |
break; |
|
440 |
case EPhoneViewBeginUpdate: |
|
441 |
m_bubbleWrapper->bubbleManager ().startChanges (); |
|
442 |
break; |
|
443 |
case EPhoneViewEndUpdate: |
|
444 |
m_bubbleWrapper->bubbleManager ().endChanges (); |
|
445 |
break; |
|
446 |
case EPhoneViewOpenContacts: |
|
447 |
openContacts(); |
|
448 |
break; |
|
449 |
default: |
|
450 |
break; |
|
451 |
} |
|
452 |
} |
|
453 |
||
454 |
void PhoneUIQtViewAdapter::ExecuteCommand (TPhoneViewCommandId aCmdId, TPhoneCommandParam *aCommandParam) |
|
455 |
{ |
|
456 |
switch (aCmdId) { |
|
457 |
case EPhoneViewGetAudioVolumeLevel: |
|
458 |
writeAudioVolumeLevel (aCommandParam); |
|
459 |
break; |
|
460 |
case EPhoneViewGetNumberFromEntry: |
|
461 |
getNumberFromDialpad(aCommandParam); |
|
462 |
break; |
|
463 |
case EPhoneViewSetDtmfOptionsFlag: |
|
464 |
//TODO |
|
465 |
break; |
|
466 |
case EPhoneViewSetVideoCallDTMFVisibilityFlag: |
|
467 |
//TODO |
|
468 |
break; |
|
469 |
case EPhoneViewBackButtonActive: { |
|
470 |
TPhoneCmdParamBoolean *param = static_cast<TPhoneCmdParamBoolean *>(aCommandParam); |
|
471 |
m_view.setBackButtonVisible(param->Boolean()); |
|
472 |
} |
|
473 |
break; |
|
474 |
case EPhoneViewHsToForegroundAfterCall: { |
|
475 |
TPhoneCmdParamBoolean *param = static_cast<TPhoneCmdParamBoolean *>(aCommandParam); |
|
476 |
m_homeScreenToForeground = param->Boolean(); |
|
477 |
} |
|
478 |
break; |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
479 |
case EPhoneViewSetIhfFlag: { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
480 |
TPhoneCmdParamBoolean *param = static_cast<TPhoneCmdParamBoolean *>(aCommandParam); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
481 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
482 |
PhoneResourceAdapter::Instance()->buttonsController()-> |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
483 |
setButtonFlags(PhoneUIQtButtonsController::Ihf, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
484 |
param->Boolean()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
485 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
486 |
break; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
487 |
case EPhoneViewSetMuteFlag: { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
488 |
TPhoneCmdParamBoolean *param = static_cast<TPhoneCmdParamBoolean *>(aCommandParam); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
489 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
490 |
PhoneResourceAdapter::Instance()->buttonsController()-> |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
491 |
setButtonFlags(PhoneUIQtButtonsController::Mute, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
492 |
param->Boolean()); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
493 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
494 |
break; |
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
495 |
case EPhoneViewSetBlueToothFlag: { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
496 |
TPhoneCmdParamBoolean *param = static_cast<TPhoneCmdParamBoolean *>(aCommandParam); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
497 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
498 |
PhoneResourceAdapter::Instance()->buttonsController()-> |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
499 |
setButtonFlags(PhoneUIQtButtonsController::Btaa, |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
500 |
param->Boolean()); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
501 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
502 |
break; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
503 |
case EPhoneViewSetBluetoothAvailableFlag: { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
504 |
TPhoneCmdParamBoolean *param = static_cast<TPhoneCmdParamBoolean *>(aCommandParam); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
505 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
506 |
PhoneResourceAdapter::Instance()->buttonsController()-> |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
507 |
setButtonFlags(PhoneUIQtButtonsController::BluetoothAvailable, |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
508 |
param->Boolean()); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
509 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
510 |
break; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
511 |
case EPhoneViewStartCapturingKey: { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
512 |
TPhoneCmdParamKeyCapture *captureParam = |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
513 |
static_cast<TPhoneCmdParamKeyCapture *>(aCommandParam); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
514 |
Qt::Key qtKey; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
515 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
516 |
if (convertKey(captureParam->KeyCode(), qtKey)) { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
517 |
m_view.captureKey(qtKey, true); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
518 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
519 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
520 |
break; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
521 |
case EPhoneViewStopCapturingKey: { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
522 |
TPhoneCmdParamKeyCapture *captureParam = |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
523 |
static_cast<TPhoneCmdParamKeyCapture *>(aCommandParam); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
524 |
Qt::Key qtKey; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
525 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
526 |
if (convertKey(captureParam->KeyCode(), qtKey)) { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
527 |
m_view.captureKey(qtKey, false); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
528 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
529 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
530 |
break; |
37 | 531 |
default: |
532 |
break; |
|
533 |
} |
|
534 |
} |
|
535 |
||
536 |
const TDesC& PhoneUIQtViewAdapter::FetchContent () |
|
537 |
{ |
|
538 |
return KNullDesC; |
|
539 |
} |
|
540 |
||
541 |
void PhoneUIQtViewAdapter::dialpadClosed() |
|
542 |
{ |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
543 |
if (m_clearDialpadOnClose) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
544 |
m_view.clearDialpad(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
545 |
} |
37 | 546 |
m_dialpadAboutToClose = true; |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
547 |
m_clearDialpadOnClose = true; |
37 | 548 |
setCallMenu(); |
549 |
} |
|
550 |
||
551 |
PhoneNoteController* PhoneUIQtViewAdapter::noteController() const |
|
552 |
{ |
|
553 |
return m_noteController; |
|
554 |
} |
|
555 |
||
556 |
void PhoneUIQtViewAdapter::keyReleased(QKeyEvent */*event*/) |
|
557 |
{ |
|
558 |
if (m_view.isDialpadVisible() && |
|
559 |
false == m_dialpadAboutToClose ) { |
|
560 |
setDialpadMenu(); |
|
561 |
} |
|
562 |
} |
|
563 |
||
564 |
void PhoneUIQtViewAdapter::handleWindowActivated() |
|
565 |
{ |
|
566 |
m_indicatorController->disableActiveCallIndicator(); |
|
567 |
} |
|
568 |
||
569 |
void PhoneUIQtViewAdapter::handleWindowDeactivated() |
|
570 |
{ |
|
571 |
m_indicatorController->enableActiveCallIndicator(); |
|
572 |
} |
|
573 |
||
574 |
void PhoneUIQtViewAdapter::setTopApplication (TPhoneCommandParam *commandParam) |
|
575 |
{ |
|
576 |
TPhoneCmdParamInteger *integerParam = static_cast<TPhoneCmdParamInteger *> (commandParam); |
|
577 |
CPhonePubSubProxy::Instance()->ChangePropertyValue( |
|
578 |
KPSUidUikon, |
|
579 |
KUikVideoCallTopApp, |
|
580 |
integerParam->Integer() ); |
|
581 |
||
582 |
// Hide the Phone icon if it is not the top application |
|
583 |
// TODO: how to do this? |
|
584 |
} |
|
585 |
||
586 |
int PhoneUIQtViewAdapter::idleAppUid () |
|
587 |
{ |
|
588 |
// <-- QT HS START --> |
|
589 |
/* if ( m_idleUid == -1 ) { |
|
590 |
// Get Idle's UID from PubSub. |
|
591 |
m_idleUid = CPhonePubSubProxy::Instance()->Value (KPSUidAiInformation, |
|
592 |
KActiveIdleUid ); |
|
593 |
}*/ |
|
594 |
m_idleUid=0x20022F35; |
|
595 |
// <-- QT HS END --> |
|
596 |
return m_idleUid; |
|
597 |
} |
|
598 |
||
599 |
void PhoneUIQtViewAdapter::createCallHeader( |
|
600 |
int callId, |
|
601 |
TPhoneCommandParam *commandParam ) |
|
602 |
{ |
|
603 |
PHONE_DEBUG("PhoneUIQtViewAdapter::createCallHeader"); |
|
604 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdCallHeaderData); |
|
605 |
||
606 |
TPhoneCmdParamCallHeaderData &data = |
|
607 |
static_cast<TPhoneCmdParamCallHeaderData &> (*commandParam); |
|
608 |
||
609 |
m_bubbleWrapper->bubbleManager ().startChanges (); |
|
610 |
||
611 |
if (m_bubbleWrapper->bubbleManager().isConferenceExpanded()) |
|
612 |
{ |
|
613 |
m_bubbleWrapper->bubbleManager().setExpandedConferenceCallHeader(false); |
|
614 |
} |
|
615 |
||
616 |
int bubble = m_bubbleWrapper->createCallHeader (callId); |
|
617 |
m_bubbleWrapper->setState (callId, bubble, data.CallState ()); |
|
618 |
m_bubbleWrapper->setCli (bubble, data.CLIText ()); |
|
619 |
m_bubbleWrapper->setServiceId(callId, data.ServiceId()); |
|
620 |
m_bubbleWrapper->setSecondaryCli (bubble, data.CNAPText ()); |
|
621 |
m_bubbleWrapper->setLabel (bubble, data.LabelText ()); |
|
622 |
m_bubbleWrapper->setCallType (bubble, data.CallType ()); |
|
623 |
m_bubbleWrapper->setDivert (bubble, data.Diverted ()); |
|
624 |
m_bubbleWrapper->setCiphering(bubble, data.CipheringIndicatorAllowed(), data.Ciphering()); |
|
625 |
||
626 |
if (data.Picture().Length()) { |
|
627 |
QString imagePath = |
|
628 |
QString::fromUtf16(data.Picture().Ptr(),data.Picture().Length()); |
|
629 |
m_bubbleWrapper->bubbleManager().setCallObjectImage(bubble,imagePath); |
|
630 |
} else { |
|
631 |
m_bubbleWrapper->bubbleManager().setCallObjectFromTheme(bubble); |
|
632 |
} |
|
633 |
m_bubbleWrapper->bubbleManager ().endChanges (); |
|
634 |
||
635 |
if (1 == m_bubbleWrapper->bubbles().keys().count()) { |
|
636 |
setHidden(false); |
|
637 |
} |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
638 |
m_indicatorController->setActiveCallData(); |
37 | 639 |
} |
640 |
||
641 |
void PhoneUIQtViewAdapter::createEmergencyCallHeader( |
|
642 |
int callId, |
|
643 |
TPhoneCommandParam *commandParam) |
|
644 |
{ |
|
645 |
PHONE_DEBUG("PhoneUIQtViewAdapter::createEmergencyCallHeader"); |
|
646 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdEmergencyCallHeaderData); |
|
647 |
||
648 |
TPhoneCmdParamEmergencyCallHeaderData &data = |
|
649 |
static_cast<TPhoneCmdParamEmergencyCallHeaderData &> (*commandParam); |
|
650 |
||
651 |
m_bubbleWrapper->bubbleManager ().startChanges (); |
|
652 |
int bubble = m_bubbleWrapper->createCallHeader (callId); |
|
653 |
m_bubbleWrapper->setLabel (bubble, data.LabelText ()); |
|
654 |
m_bubbleWrapper->setCli (bubble, data.HeaderText ()); |
|
655 |
m_bubbleWrapper->setCiphering(bubble, data.CipheringIndicatorAllowed(), data.Ciphering()); |
|
656 |
m_bubbleWrapper->bubbleManager ().endChanges (); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
657 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
658 |
m_indicatorController->setActiveCallData(); |
37 | 659 |
} |
660 |
||
661 |
void PhoneUIQtViewAdapter::updateCallHeaderState ( |
|
662 |
int callId, |
|
663 |
TPhoneCommandParam *commandParam) |
|
664 |
{ |
|
665 |
PHONE_DEBUG("PhoneUIQtViewAdapter::updateCallHeaderState"); |
|
666 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdCallHeaderData); |
|
667 |
||
668 |
TPhoneCmdParamCallHeaderData &data = |
|
669 |
static_cast<TPhoneCmdParamCallHeaderData &> (*commandParam); |
|
670 |
||
671 |
int bubble = m_bubbleWrapper->bubbleId (callId); |
|
672 |
if ( -1 != bubble ) { |
|
673 |
m_bubbleWrapper->bubbleManager ().startChanges (); |
|
674 |
m_bubbleWrapper->setState (callId, bubble, data.CallState ()); |
|
675 |
m_bubbleWrapper->setLabel (bubble, data.LabelText ()); |
|
676 |
m_bubbleWrapper->setDivert (bubble, data.Diverted ()); |
|
677 |
m_bubbleWrapper->bubbleManager ().endChanges (); |
|
678 |
} |
|
679 |
} |
|
680 |
||
681 |
void PhoneUIQtViewAdapter::updateCallHeaderRemoteInfo (int callId, TPhoneCommandParam *commandParam) |
|
682 |
{ |
|
683 |
PHONE_DEBUG("PhoneUIQtViewAdapter::updateCallHeaderRemoteInfo"); |
|
684 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdCallHeaderData); |
|
685 |
||
686 |
TPhoneCmdParamCallHeaderData &data = |
|
687 |
static_cast<TPhoneCmdParamCallHeaderData &> (*commandParam); |
|
688 |
||
689 |
||
690 |
int bubble = m_bubbleWrapper->bubbleId (callId); |
|
691 |
if ( -1 != bubble ) { |
|
692 |
m_bubbleWrapper->bubbleManager ().startChanges (); |
|
693 |
m_bubbleWrapper->setCli (bubble, data.CLIText ()); |
|
694 |
m_bubbleWrapper->setSecondaryCli (bubble, data.CNAPText ()); |
|
695 |
m_bubbleWrapper->setDivert (bubble, data.Diverted ()); |
|
696 |
m_bubbleWrapper->bubbleManager ().endChanges (); |
|
697 |
} |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
698 |
m_indicatorController->setActiveCallData(); |
37 | 699 |
|
700 |
} |
|
701 |
||
702 |
void PhoneUIQtViewAdapter::updateCallHeaderRemoteInfoAndLabel (int callId, TPhoneCommandParam *commandParam) |
|
703 |
{ |
|
704 |
PHONE_DEBUG("PhoneUIQtViewAdapter::updateCallHeaderRemoteInfoAndLabel"); |
|
705 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdCallHeaderData); |
|
706 |
||
707 |
TPhoneCmdParamCallHeaderData &data = |
|
708 |
static_cast<TPhoneCmdParamCallHeaderData &> (*commandParam); |
|
709 |
||
710 |
int bubble = m_bubbleWrapper->bubbleId (callId); |
|
711 |
if ( -1 != bubble ) { |
|
712 |
m_bubbleWrapper->bubbleManager ().startChanges (); |
|
713 |
m_bubbleWrapper->setCli (bubble, data.CLIText ()); |
|
714 |
m_bubbleWrapper->setSecondaryCli (bubble, data.CNAPText ()); |
|
715 |
m_bubbleWrapper->setLabel (bubble, data.LabelText ()); |
|
716 |
m_bubbleWrapper->setDivert (bubble, data.Diverted ()); |
|
717 |
m_bubbleWrapper->bubbleManager ().endChanges (); |
|
718 |
} |
|
719 |
} |
|
720 |
||
721 |
void PhoneUIQtViewAdapter::handleCipheringInfoChange(int callId, TPhoneCommandParam *commandParam) |
|
722 |
{ |
|
723 |
TPhoneCmdParamCallHeaderData *param = |
|
724 |
static_cast<TPhoneCmdParamCallHeaderData*>(commandParam); |
|
725 |
||
726 |
int bubble = m_bubbleWrapper->bubbleId(callId); |
|
727 |
if ( -1 != bubble ) { |
|
728 |
m_bubbleWrapper->bubbleManager().startChanges(); |
|
729 |
m_bubbleWrapper->setCiphering(m_bubbleWrapper->bubbleId(callId), |
|
730 |
param->CipheringIndicatorAllowed(), |
|
731 |
param->Ciphering()); |
|
732 |
m_bubbleWrapper->bubbleManager().endChanges(); |
|
733 |
} |
|
734 |
} |
|
735 |
||
736 |
TPhoneViewResponseId PhoneUIQtViewAdapter::callIdByState (TPhoneCommandParam *commandParam) |
|
737 |
{ |
|
738 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdCallStateData); |
|
739 |
||
740 |
TPhoneCmdParamCallStateData &stateParam = |
|
741 |
static_cast<TPhoneCmdParamCallStateData &>(*commandParam); |
|
742 |
||
743 |
stateParam.SetCallId (m_bubbleWrapper->callId (stateParam.CallState ())); |
|
744 |
return EPhoneViewResponseSuccess; |
|
745 |
} |
|
746 |
||
747 |
void PhoneUIQtViewAdapter::setTouchButtons (TPhoneCommandParam *commandParam) |
|
748 |
{ |
|
749 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdBoolean); |
|
750 |
||
751 |
TPhoneCmdParamBoolean ¶m = |
|
752 |
static_cast<TPhoneCmdParamBoolean &>(*commandParam); |
|
753 |
bool emergencyCall = param.Boolean(); |
|
754 |
||
755 |
m_bubbleWrapper->bubbleManager ().startChanges (); |
|
756 |
||
757 |
QList<int> bubbles = m_bubbleWrapper->bubbles().keys(); |
|
758 |
||
759 |
m_resourceAdapter->buttonsController()->setButtonFlags( |
|
760 |
PhoneUIQtButtonsController::DisableJoin, |
|
761 |
(5 <= m_bubbleWrapper->conferenceCallList().count())); |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
762 |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
763 |
setCommonButtonFlags(); |
37 | 764 |
|
765 |
for (int j = 0; j < bubbles.size(); ++j){ |
|
766 |
int callId = bubbles.at(j); |
|
767 |
// Clear bubble |
|
768 |
m_view.clearBubbleCommands(m_bubbleWrapper->bubbles().value(callId)); |
|
769 |
||
770 |
// Get bubble actions by call type |
|
771 |
QMap<PhoneAction::ActionType, PhoneAction *> actions = |
|
772 |
m_uiCommandController->pushButtonActionsForCall( |
|
773 |
m_bubbleWrapper->callStates().value(callId), |
|
774 |
emergencyCall, |
|
775 |
m_bubbleWrapper->callStates(), |
|
776 |
m_bubbleWrapper->serviceIds(), |
|
777 |
m_bubbleWrapper->serviceIdByCallId(callId), |
|
778 |
callId); |
|
779 |
||
780 |
QList<PhoneAction *> values = actions.values(); |
|
781 |
for (int i = 0; i < values.size (); ++i) { |
|
782 |
PhoneAction *action = values.at (i); |
|
783 |
m_view.addBubbleCommand(m_bubbleWrapper->bubbles().value(callId), |
|
784 |
*action); |
|
785 |
delete action; |
|
786 |
} |
|
787 |
} |
|
788 |
||
789 |
setExpandedConferenceCallHeader(); |
|
790 |
setBubbleSelectionFlag(); |
|
791 |
setMenu(); |
|
792 |
||
793 |
m_bubbleWrapper->bubbleManager ().endChanges (); |
|
794 |
} |
|
795 |
||
796 |
void PhoneUIQtViewAdapter::setToolbarButtons (TPhoneCommandParam *commandParam) |
|
797 |
{ |
|
798 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdInteger); |
|
799 |
||
800 |
TPhoneCmdParamInteger &intParam = |
|
801 |
static_cast<TPhoneCmdParamInteger &>(*commandParam); |
|
802 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
803 |
setCommonButtonFlags(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
804 |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
805 |
int callId(-1); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
806 |
int serviceId(-1); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
807 |
if ( 0<m_bubbleWrapper->callStates().keys().size() ) { |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
808 |
int bubbleId = m_bubbleWrapper->bubbleManager().expandedBubble(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
809 |
callId = m_bubbleWrapper->callIdByBubbleId(bubbleId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
810 |
serviceId = m_bubbleWrapper->serviceIdByCallId(callId); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
811 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
812 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
813 |
QList<PhoneAction*> actions = m_uiCommandController->toolBarActions( |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
814 |
intParam.Integer(), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
815 |
m_bubbleWrapper->callStates(), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
816 |
m_bubbleWrapper->serviceIds(), |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
817 |
serviceId, |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
818 |
callId ); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
819 |
|
37 | 820 |
if (actions.count()) { |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
821 |
m_view.setToolbarActions(actions); |
37 | 822 |
} |
823 |
||
824 |
qDeleteAll(actions); |
|
825 |
} |
|
826 |
||
827 |
void PhoneUIQtViewAdapter::setCallHoldFlag (TPhoneCommandParam *commandParam) |
|
828 |
{ |
|
829 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdBoolean); |
|
830 |
||
831 |
TPhoneCmdParamBoolean &boolParam = |
|
832 |
static_cast<TPhoneCmdParamBoolean &>(*commandParam); |
|
833 |
||
834 |
m_resourceAdapter->buttonsController()->setButtonFlags(PhoneUIQtButtonsController::Hold, |
|
835 |
boolParam.Boolean ()); |
|
836 |
} |
|
837 |
||
838 |
void PhoneUIQtViewAdapter::callHoldFlag (TPhoneCommandParam *commandParam) |
|
839 |
{ |
|
840 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdBoolean); |
|
841 |
||
842 |
TPhoneCmdParamBoolean &boolParam = |
|
843 |
static_cast<TPhoneCmdParamBoolean &>(*commandParam); |
|
844 |
boolParam.SetBoolean (m_resourceAdapter->buttonsController()->getButtonFlags(PhoneUIQtButtonsController::Hold)); |
|
845 |
} |
|
846 |
||
847 |
void PhoneUIQtViewAdapter::writeAudioVolumeLevel (TPhoneCommandParam *commandParam) |
|
848 |
{ |
|
849 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdInteger); |
|
850 |
||
851 |
TPhoneCmdParamInteger &intParam = |
|
852 |
static_cast<TPhoneCmdParamInteger &>(*commandParam); |
|
853 |
intParam.SetInteger (m_view.volumeSliderValue ()); |
|
854 |
} |
|
855 |
||
856 |
void PhoneUIQtViewAdapter::setAudioVolumeSliderValue (TPhoneCommandParam *commandParam) |
|
857 |
{ |
|
858 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdInteger); |
|
859 |
||
860 |
TPhoneCmdParamInteger &intParam = |
|
861 |
static_cast<TPhoneCmdParamInteger &>(*commandParam); |
|
862 |
||
863 |
m_view.setVolumeSliderValue(intParam.Integer(), |
|
864 |
EPhoneInCallCmdSetVolumeLevel, |
|
865 |
KPhoneVolumeMaxValue, |
|
866 |
KPhoneVolumeMinValue ); |
|
867 |
} |
|
868 |
||
869 |
void PhoneUIQtViewAdapter::setMuteIndication (TPhoneCommandParam *commandParam) |
|
870 |
{ |
|
871 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdBoolean); |
|
872 |
TPhoneCmdParamBoolean &boolParam = |
|
873 |
static_cast<TPhoneCmdParamBoolean &>(*commandParam); |
|
874 |
m_bubbleWrapper->bubbleManager().setPhoneMuted(boolParam.Boolean()); |
|
875 |
} |
|
876 |
||
877 |
void PhoneUIQtViewAdapter::activeCallCount (TPhoneCommandParam *commandParam) |
|
878 |
{ |
|
879 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdInteger); |
|
880 |
||
881 |
TPhoneCmdParamInteger &integerParam = |
|
882 |
static_cast<TPhoneCmdParamInteger&>(*commandParam); |
|
883 |
integerParam.SetInteger (m_bubbleWrapper->activeCallCount()); |
|
884 |
} |
|
885 |
||
886 |
void PhoneUIQtViewAdapter::setAudioPath (TPhoneCommandParam *commandParam) |
|
887 |
{ |
|
888 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdAudioOutput); |
|
889 |
||
890 |
TPhoneCmdParamAudioOutput &outputParam = |
|
891 |
static_cast<TPhoneCmdParamAudioOutput &>(*commandParam); |
|
892 |
||
893 |
m_resourceAdapter->buttonsController()->setButtonFlags(PhoneUIQtButtonsController::Ihf, |
|
894 |
outputParam.AudioOutput() == EPELoudspeaker); |
|
895 |
m_resourceAdapter->buttonsController()->setButtonFlags(PhoneUIQtButtonsController::Wired, |
|
896 |
outputParam.AudioOutput() == EPEWiredAudioAccessory); |
|
897 |
m_resourceAdapter->buttonsController()->setButtonFlags(PhoneUIQtButtonsController::Btaa, |
|
898 |
outputParam.AudioOutput() == EPEBTAudioAccessory); |
|
899 |
} |
|
900 |
||
901 |
void PhoneUIQtViewAdapter::expandedBubbleCallId(TPhoneCommandParam *commandParam) |
|
902 |
{ |
|
903 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdInteger); |
|
904 |
||
905 |
TPhoneCmdParamInteger &outputParam = |
|
906 |
static_cast<TPhoneCmdParamInteger &>(*commandParam); |
|
907 |
int callId = PHONE_CALL_NOT_FOUND; |
|
908 |
||
909 |
if ( 0<m_bubbleWrapper->callStates().keys().size() ) { |
|
910 |
int bubbleId = m_bubbleWrapper->bubbleManager().expandedBubble(); |
|
911 |
callId = m_bubbleWrapper->callIdByBubbleId(bubbleId); |
|
912 |
} |
|
913 |
||
914 |
outputParam.SetInteger( callId ); |
|
915 |
} |
|
916 |
||
917 |
void PhoneUIQtViewAdapter::openDialpad() |
|
918 |
{ |
|
919 |
m_dialpadAboutToClose = false; |
|
920 |
m_view.showDialpad(); |
|
921 |
setDialpadMenu(); |
|
922 |
} |
|
923 |
||
924 |
void PhoneUIQtViewAdapter::createConferenceBubble(int callId, TPhoneCommandParam *commandParam) |
|
925 |
{ |
|
926 |
PHONE_DEBUG("PhoneUIQtViewAdapter::createConferenceBubble"); |
|
927 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdCallHeaderData); |
|
928 |
||
929 |
TPhoneCmdParamCallHeaderData &data = |
|
930 |
static_cast<TPhoneCmdParamCallHeaderData &> (*commandParam); |
|
931 |
||
932 |
int bubble = m_bubbleWrapper->createConferenceBubble( |
|
933 |
callId, data.CallState(), data.LabelText(), data.CLIText()); |
|
934 |
||
935 |
m_bubbleWrapper->setServiceId(callId,data.ServiceId()); |
|
936 |
m_bubbleWrapper->setCiphering(bubble, data.CipheringIndicatorAllowed(), data.Ciphering()); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
937 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
938 |
setParticipantListActions(); |
37 | 939 |
} |
940 |
||
941 |
void PhoneUIQtViewAdapter::conferenceCallId(int callId, TPhoneCommandParam *commandParam) |
|
942 |
{ |
|
943 |
PHONE_DEBUG("PhoneUIQtViewAdapter::conferenceCallId"); |
|
944 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdBoolean); |
|
945 |
||
946 |
TPhoneCmdParamBoolean* conferenceDataValue = |
|
947 |
static_cast<TPhoneCmdParamBoolean*>( |
|
948 |
commandParam ); |
|
949 |
||
950 |
conferenceDataValue->SetBoolean(m_bubbleWrapper->conferenceCallId(callId)); |
|
951 |
} |
|
952 |
||
953 |
void PhoneUIQtViewAdapter::removeConferenceBubble() |
|
954 |
{ |
|
955 |
m_bubbleWrapper->bubbleManager().startChanges(); |
|
956 |
m_view.removeExpandAction(m_bubbleWrapper->bubbleId(KConferenceCallId)); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
957 |
m_view.clearParticipantListActions(); |
37 | 958 |
m_bubbleWrapper->removeConferenceBubble(); |
959 |
m_bubbleWrapper->bubbleManager().endChanges(); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
960 |
if (!m_bubbleWrapper->bubbles().count()) { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
961 |
m_indicatorController->clearActiveCallData(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
962 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
963 |
|
37 | 964 |
} |
965 |
||
966 |
void PhoneUIQtViewAdapter::isConference(TPhoneCommandParam *commandParam) |
|
967 |
{ |
|
968 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdBoolean); |
|
969 |
||
970 |
TPhoneCmdParamBoolean* conferenceDataValue = |
|
971 |
static_cast<TPhoneCmdParamBoolean*>( |
|
972 |
commandParam ); |
|
973 |
||
974 |
conferenceDataValue->SetBoolean(0<m_bubbleWrapper->conferenceCallList().size()); |
|
975 |
} |
|
976 |
||
977 |
void PhoneUIQtViewAdapter::removeCallFromConference(int callId) |
|
978 |
{ |
|
979 |
m_bubbleWrapper->bubbleManager().startChanges(); |
|
980 |
m_bubbleWrapper->removeCallFromConference(callId); |
|
981 |
int bubbleId = m_bubbleWrapper->bubbles().value(callId); |
|
982 |
m_view.clearBubbleCommands(bubbleId); |
|
983 |
m_view.removeExpandAction(bubbleId); |
|
984 |
m_bubbleWrapper->removeCallHeader(callId); |
|
985 |
m_bubbleWrapper->bubbleManager().endChanges(); |
|
986 |
} |
|
987 |
||
988 |
TPhoneViewResponseId PhoneUIQtViewAdapter::getSelectedConferenceMember( |
|
989 |
TPhoneCommandParam *commandParam) |
|
990 |
{ |
|
991 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdInteger); |
|
992 |
TPhoneViewResponseId ret = EPhoneViewResponseSuccess; |
|
993 |
TPhoneCmdParamInteger* integerValue = |
|
994 |
static_cast<TPhoneCmdParamInteger*>( |
|
995 |
commandParam ); |
|
996 |
||
997 |
int bubbleId = m_bubbleWrapper->bubbleManager().selectionIdInConference(); |
|
998 |
int callId = m_bubbleWrapper->callIdByBubbleId(bubbleId); |
|
999 |
||
1000 |
if (callId == -1) { |
|
1001 |
ret = EPhoneViewResponseFailed; |
|
1002 |
} else { |
|
1003 |
integerValue->SetInteger(callId); |
|
1004 |
} |
|
1005 |
||
1006 |
return ret; |
|
1007 |
} |
|
1008 |
||
1009 |
void PhoneUIQtViewAdapter::setPrivateFromConference(int callId) |
|
1010 |
{ |
|
1011 |
m_bubbleWrapper->bubbleManager().startChanges(); |
|
1012 |
m_bubbleWrapper->bubbleManager().setExpandedConferenceCallHeader(false); |
|
1013 |
m_bubbleWrapper->removeCallFromConference(callId); |
|
1014 |
m_view.clearBubbleCommands(m_bubbleWrapper->bubbles().value(callId)); |
|
1015 |
m_bubbleWrapper->bubbleManager().endChanges(); |
|
1016 |
} |
|
1017 |
||
1018 |
void PhoneUIQtViewAdapter::setExpandActions() |
|
1019 |
{ |
|
1020 |
/* If there is 2 or more calls ongoing then we should |
|
1021 |
* enable expancion swap*/ |
|
1022 |
int heldBubble = -1; |
|
1023 |
||
1024 |
if ( 2 <= m_bubbleWrapper->callStates().values().size() ) { |
|
1025 |
if (callsExists(EPEStateConnected,EPEStateHeld)) { |
|
1026 |
heldBubble = |
|
1027 |
m_bubbleWrapper->bubbleId(m_bubbleWrapper->callId(EPEStateHeld)); |
|
1028 |
m_view.setExpandAction(heldBubble, EPhoneInCallCmdSwap); |
|
1029 |
} else if (callsExists(EPEStateConnected,EPEStateHeldConference)) { |
|
1030 |
heldBubble = |
|
1031 |
m_bubbleWrapper->bubbleId(m_bubbleWrapper->callId(EPEStateHeldConference)); |
|
1032 |
m_view.setExpandAction(heldBubble, EPhoneInCallCmdSwap); |
|
1033 |
} else if (callsExists(EPEStateRinging,EPEStateHeld)) { |
|
1034 |
heldBubble = |
|
1035 |
m_bubbleWrapper->bubbleId(m_bubbleWrapper->callId(EPEStateHeld)); |
|
1036 |
m_view.setExpandAction(heldBubble, EPhoneInCallCmdUnhold); |
|
1037 |
} |
|
1038 |
||
1039 |
QList<int> calls = m_bubbleWrapper->bubbles().keys(); |
|
1040 |
foreach (int call, calls) { |
|
1041 |
int bubbleId = m_bubbleWrapper->bubbleId(call); |
|
1042 |
if ( bubbleId != heldBubble ) { |
|
1043 |
m_view.setExpandAction(bubbleId, EPhoneCmdUpdateUiControls); |
|
1044 |
} |
|
1045 |
} |
|
1046 |
} |
|
1047 |
} |
|
1048 |
||
1049 |
bool PhoneUIQtViewAdapter::callsExists(int call1State, int call2State) |
|
1050 |
{ |
|
1051 |
bool callsExist(false); |
|
1052 |
if ( m_bubbleWrapper->callStates().values().contains(call1State) && |
|
1053 |
m_bubbleWrapper->callStates().values().contains(call2State) ) { |
|
1054 |
callsExist = true; |
|
1055 |
} |
|
1056 |
return callsExist; |
|
1057 |
} |
|
1058 |
||
1059 |
void PhoneUIQtViewAdapter::setParticipantListActions() |
|
1060 |
{ |
|
1061 |
if ( 0<m_bubbleWrapper->conferenceCallList().size() ) { |
|
1062 |
m_view.addParticipantListAction( |
|
1063 |
EPhoneInCallCmdPrivate, |
|
1064 |
hbTrId("txt_phone_button_private"), |
|
1065 |
HbIcon("qtg_mono_private_call")); |
|
1066 |
m_view.addParticipantListAction( |
|
1067 |
EPhoneInCallCmdDrop, |
|
1068 |
hbTrId("txt_phone_button_drop"), |
|
1069 |
HbIcon("qtg_mono_drop_call")); |
|
1070 |
} |
|
1071 |
} |
|
1072 |
||
1073 |
void PhoneUIQtViewAdapter::setExpandedConferenceCallHeader() |
|
1074 |
{ |
|
1075 |
int callId = PHONE_CALL_NOT_FOUND; |
|
1076 |
||
1077 |
if ( 1==m_bubbleWrapper->bubbles().keys().size() |
|
1078 |
|| (1<m_bubbleWrapper->bubbles().keys().size() |
|
1079 |
&& false == m_bubbleWrapper->callStates().values().contains(EPEStateRinging) |
|
1080 |
&& false == m_bubbleWrapper->callStates().values().contains(EPEStateDialing) |
|
1081 |
&& false == m_bubbleWrapper->callStates().values().contains(EPEStateConnecting) |
|
1082 |
&& false == m_bubbleWrapper->callStates().values().contains(EPEStateHeldConference))) { |
|
1083 |
||
1084 |
int bubbleId = m_bubbleWrapper->bubbleManager().expandedBubble(); |
|
1085 |
callId = m_bubbleWrapper->callIdByBubbleId(bubbleId); |
|
1086 |
} |
|
1087 |
||
1088 |
m_bubbleWrapper->bubbleManager().setExpandedConferenceCallHeader( |
|
1089 |
(KConferenceCallId == callId)); |
|
1090 |
} |
|
1091 |
||
1092 |
void PhoneUIQtViewAdapter::bringToForeground() |
|
1093 |
{ |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1094 |
m_visibilityHandler->bringToForeground(); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1095 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1096 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1097 |
void PhoneUIQtViewAdapter::hideDeviceDialogs(TPhoneCommandParam *commandParam) |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1098 |
{ |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1099 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdBoolean); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1100 |
TPhoneCmdParamBoolean* booleanParam = |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1101 |
static_cast<TPhoneCmdParamBoolean*>(commandParam); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1102 |
m_visibilityHandler->hideDeviceDialogs(booleanParam->Boolean()); |
37 | 1103 |
} |
1104 |
||
1105 |
void PhoneUIQtViewAdapter::showGlobalNote( |
|
1106 |
TPhoneCommandParam *commandParam) |
|
1107 |
{ |
|
1108 |
m_noteController->showGlobalNote(commandParam); |
|
1109 |
} |
|
1110 |
||
1111 |
void PhoneUIQtViewAdapter::setDialpadVisibility( |
|
1112 |
TPhoneCommandParam *commandParam) |
|
1113 |
{ |
|
1114 |
Q_ASSERT (commandParam->ParamId () == TPhoneCommandParam::EPhoneParamIdBoolean); |
|
1115 |
TPhoneCmdParamBoolean* booleanParam = |
|
1116 |
static_cast<TPhoneCmdParamBoolean*>(commandParam); |
|
1117 |
||
1118 |
if (booleanParam->Boolean()) { |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1119 |
m_dialpadAboutToClose = false; |
37 | 1120 |
m_view.showDialpad(); |
1121 |
} else { |
|
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1122 |
m_clearDialpadOnClose = false; |
37 | 1123 |
m_view.hideDialpad(); |
1124 |
} |
|
1125 |
} |
|
1126 |
||
1127 |
void PhoneUIQtViewAdapter::removeAllCallHeaders() |
|
1128 |
{ |
|
1129 |
if (m_bubbleWrapper->conferenceCallList().size()) { |
|
1130 |
removeConferenceBubble(); |
|
1131 |
} |
|
1132 |
||
1133 |
QList<int> callIds = m_bubbleWrapper->bubbles().keys(); |
|
1134 |
||
1135 |
for (int i=0; i<callIds.size(); ++i) { |
|
1136 |
int callId = callIds.at(i); |
|
1137 |
if (KEmergencyCallId != callId) { |
|
1138 |
m_bubbleWrapper->bubbleManager().startChanges(); |
|
1139 |
int bubble = m_bubbleWrapper->bubbles().value(callId); |
|
1140 |
m_view.clearBubbleCommands(bubble); |
|
1141 |
m_view.removeExpandAction(bubble); |
|
1142 |
m_bubbleWrapper->removeCallHeader (callId); |
|
1143 |
m_bubbleWrapper->bubbleManager().endChanges(); |
|
1144 |
} |
|
1145 |
} |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1146 |
if (!m_bubbleWrapper->bubbles().count()) { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1147 |
m_indicatorController->clearActiveCallData(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1148 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1149 |
|
37 | 1150 |
} |
1151 |
||
1152 |
void PhoneUIQtViewAdapter::getNumberFromDialpad( |
|
1153 |
TPhoneCommandParam *commandParam) |
|
1154 |
{ |
|
1155 |
||
1156 |
TPhoneCmdParamString* entryContent = |
|
1157 |
static_cast<TPhoneCmdParamString*>(commandParam); |
|
1158 |
||
1159 |
QString westernNumber = |
|
1160 |
HbStringUtil::convertDigitsTo(m_view.dialpadText(), WesternDigit); |
|
1161 |
||
1162 |
(*entryContent->String()).Copy(westernNumber.utf16()); |
|
1163 |
} |
|
1164 |
||
1165 |
void PhoneUIQtViewAdapter::getDialpadStringLength( |
|
1166 |
TPhoneCommandParam *commandParam) |
|
1167 |
{ |
|
1168 |
||
1169 |
TPhoneCmdParamInteger* integerParam = |
|
1170 |
static_cast<TPhoneCmdParamInteger*>(commandParam); |
|
1171 |
||
1172 |
integerParam->SetInteger(m_view.dialpadText().length()); |
|
1173 |
} |
|
1174 |
||
1175 |
void PhoneUIQtViewAdapter::removeDialpad() |
|
1176 |
{ |
|
1177 |
m_view.clearAndHideDialpad(); |
|
1178 |
} |
|
1179 |
||
1180 |
void PhoneUIQtViewAdapter::addToConference() |
|
1181 |
{ |
|
1182 |
m_bubbleWrapper->addToConferenceBubble(); |
|
1183 |
} |
|
1184 |
||
1185 |
void PhoneUIQtViewAdapter::setMenu() |
|
1186 |
{ |
|
1187 |
if (m_view.isDialpadVisible() && false == m_dialpadAboutToClose) { |
|
1188 |
setDialpadMenu(); |
|
1189 |
} else { |
|
1190 |
setCallMenu(); |
|
1191 |
} |
|
1192 |
} |
|
1193 |
||
1194 |
void PhoneUIQtViewAdapter::setCallMenu() |
|
1195 |
{ |
|
1196 |
if ( 0<m_bubbleWrapper->callStates().keys().size() ) { |
|
1197 |
int bubbleId = m_bubbleWrapper->bubbleManager().expandedBubble(); |
|
1198 |
int callId = m_bubbleWrapper->callIdByBubbleId(bubbleId); |
|
1199 |
m_uiCommandController->setCallMenuActions( |
|
1200 |
m_bubbleWrapper->callStates(), |
|
1201 |
m_bubbleWrapper->serviceIds(), |
|
1202 |
m_bubbleWrapper->serviceIdByCallId(callId), |
|
1203 |
callId ); |
|
1204 |
} |
|
1205 |
||
1206 |
} |
|
1207 |
||
1208 |
void PhoneUIQtViewAdapter::setDialpadMenu() |
|
1209 |
{ |
|
1210 |
m_uiCommandController->setDialpadMenuActions(); |
|
1211 |
} |
|
1212 |
||
1213 |
void PhoneUIQtViewAdapter::showNote(TPhoneCommandParam *commandParam) |
|
1214 |
{ |
|
1215 |
m_noteController->showNote(commandParam); |
|
1216 |
} |
|
1217 |
||
1218 |
QString PhoneUIQtViewAdapter::convertDuration(TInt secs) |
|
1219 |
{ |
|
1220 |
QTime init(0,0,0); |
|
1221 |
QTime duration = init.addSecs(secs); |
|
1222 |
HbExtendedLocale locale = HbExtendedLocale::system(); |
|
1223 |
QString durationString = locale.format(duration, QString(r_qtn_time_durat_long)); |
|
1224 |
return HbStringUtil::convertDigits(durationString); |
|
1225 |
} |
|
1226 |
||
1227 |
void PhoneUIQtViewAdapter::setBubbleSelectionFlag() |
|
1228 |
{ |
|
1229 |
bool selectionFlag = ((m_bubbleWrapper->callStates(). |
|
1230 |
values().contains(EPEStateRinging) && |
|
1231 |
m_bubbleWrapper->conferenceCallList().count())|| |
|
1232 |
m_bubbleWrapper->callStates(). |
|
1233 |
values().contains(EPEStateDialing) || |
|
1234 |
m_bubbleWrapper->callStates(). |
|
1235 |
values().contains(EPEStateConnecting)); |
|
1236 |
||
1237 |
m_bubbleWrapper->bubbleManager().setBubbleSelectionDisabled(selectionFlag); |
|
1238 |
} |
|
1239 |
||
1240 |
void PhoneUIQtViewAdapter::setHidden(bool hidden) |
|
1241 |
{ |
|
1242 |
TRAP_IGNORE(SetHiddenL(hidden)); |
|
1243 |
} |
|
1244 |
||
1245 |
void PhoneUIQtViewAdapter::SetHiddenL(bool hidden) |
|
1246 |
{ |
|
1247 |
CEikonEnv* env = CEikonEnv::Static(); |
|
1248 |
||
1249 |
if (env) { |
|
1250 |
CApaWindowGroupName* windowGroupName = |
|
1251 |
CApaWindowGroupName::NewLC( |
|
1252 |
env->WsSession(), |
|
1253 |
env->RootWin().Identifier() ); |
|
1254 |
||
1255 |
windowGroupName->SetHidden( hidden ); |
|
1256 |
User::LeaveIfError( |
|
1257 |
windowGroupName->SetWindowGroupName( |
|
1258 |
env->RootWin() ) ); |
|
1259 |
||
1260 |
CleanupStack::PopAndDestroy( windowGroupName ); |
|
1261 |
||
1262 |
CAknSgcClient::AknSrv()->UpdateTaskList(); |
|
1263 |
} |
|
1264 |
} |
|
1265 |
void PhoneUIQtViewAdapter::openContacts() |
|
1266 |
{ |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1267 |
m_appLauncher->launchContacts(); |
37 | 1268 |
} |
1269 |
||
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1270 |
void PhoneUIQtViewAdapter::openLogs(TPhoneCommandParam *commandParam) |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1271 |
{ |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1272 |
TPhoneCmdParamString* entryContent = |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1273 |
static_cast<TPhoneCmdParamString*>(commandParam); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1274 |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1275 |
bool phoneVisible = m_visibilityHandler->phoneVisible(); |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1276 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1277 |
m_homeScreenToForeground = false; |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1278 |
m_visibilityHandler->sendToBackground(m_homeScreenToForeground); |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1279 |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1280 |
if (phoneVisible) { |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1281 |
// Activate logs dialer only if telephone is on the top. |
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1282 |
m_appLauncher->launchLogs( |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1283 |
LogsServices::ViewAll, |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1284 |
true, |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1285 |
QString::fromUtf16( |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1286 |
entryContent->String()->Ptr(), |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1287 |
entryContent->String()->Length())); |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1288 |
} |
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1289 |
} |
37 | 1290 |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1291 |
void PhoneUIQtViewAdapter::setCommonButtonFlags() |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1292 |
{ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1293 |
m_resourceAdapter->buttonsController()->setButtonFlags( |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1294 |
PhoneUIQtButtonsController::FullConference, |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1295 |
(5 <= m_bubbleWrapper->conferenceCallList().count())); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1296 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1297 |
m_resourceAdapter->buttonsController()->setButtonFlags( |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1298 |
PhoneUIQtButtonsController::IhfAsPushButton, |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1299 |
m_speakerAsDefaultButton); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1300 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1301 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1302 |
bool PhoneUIQtViewAdapter::convertKey( |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1303 |
TKeyCode symbianKey, Qt::Key &qtKey) |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1304 |
{ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1305 |
bool ret = false; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1306 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1307 |
switch(symbianKey) { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1308 |
case EKeyNo: { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1309 |
qtKey = Qt::Key_No; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1310 |
ret = true; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1311 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1312 |
break; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1313 |
default: |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1314 |
break; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1315 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1316 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1317 |
return ret; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
45
diff
changeset
|
1318 |
} |
45
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1319 |
|
6b911d05207e
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1320 |