|
1 /* |
|
2 * Copyright (c) 2007-2008 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 the License "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: Container class for Setting view.* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <eikenv.h> |
|
22 #include <eikapp.h> |
|
23 #include <aknlists.h> |
|
24 #include <barsread.h> |
|
25 #include <AknIconArray.h> |
|
26 #include <eikclbd.h> |
|
27 #include <akntitle.h> |
|
28 #include <aknmessagequerydialog.h> |
|
29 #include <aknViewAppUi.h> |
|
30 #include <aknsettingitemlist.h> |
|
31 |
|
32 #include "IptvDebug.h" |
|
33 #include <vcxnssettingsview.rsg> |
|
34 #include "vcxnsservicesettings.h" |
|
35 |
|
36 #include "videoplayersettingsengine.h" |
|
37 #include "CIptvUtil.h" |
|
38 #include <csxhelp/iptv.hlp.hrh> |
|
39 #include "feedsettingsview.hrh" |
|
40 #include "feedsettingsview.h" |
|
41 #include "feedsettingsviewcontainer.h" |
|
42 #include "feedsettingsviewaddservicelistbox.h" |
|
43 #include "feedsettingsviewserviceselection.h" |
|
44 #include "feedsettingsviewaddoreditservice.h" |
|
45 #include "MPSettingsConstants.h" |
|
46 |
|
47 const TInt KIptvMskPosition = 3; |
|
48 |
|
49 |
|
50 // ================= MEMBER FUNCTIONS ======================= |
|
51 |
|
52 // --------------------------------------------------------- |
|
53 // CVcSettingsViewContainer::CVcSettingsViewContainer() |
|
54 // --------------------------------------------------------- |
|
55 // |
|
56 CVcxNsSettingsViewContainer::CVcxNsSettingsViewContainer( CAknViewAppUi& aAppUi, |
|
57 CVcxNsSettingsEngine& aAppSettings, |
|
58 CVcxNsServiceSettings& aServiceSettings, |
|
59 CVcxNsSettingsView* aParentView, |
|
60 RFs& aFs) |
|
61 : iAppUi(aAppUi), |
|
62 iAppSettings(aAppSettings), |
|
63 iServiceSettings(aServiceSettings), |
|
64 iParentView(aParentView), |
|
65 iFs(aFs), |
|
66 iActiveList((TSettingsViewActiveList)0) |
|
67 { |
|
68 __ASSERT_DEBUG(iParentView, User::Panic(KNullDesC, KErrBadHandle)); |
|
69 } |
|
70 |
|
71 // --------------------------------------------------------- |
|
72 // CVcSettingsViewContainer::ConstructL() |
|
73 // --------------------------------------------------------- |
|
74 // |
|
75 void CVcxNsSettingsViewContainer::ConstructL(const TRect& aRect) |
|
76 { |
|
77 CreateWindowL(); |
|
78 |
|
79 // Service selection list |
|
80 iServiceSelection = CVcxNsSettingsViewServiceSelection::NewL(this, iServiceSettings ); |
|
81 |
|
82 // Add service list |
|
83 iAddOrEditService = CVcxNsSettingsViewAddOrEditService::NewL(this, iServiceSettings ); |
|
84 |
|
85 SetRect(aRect); |
|
86 |
|
87 SwitchToServiceSelectionListL(); |
|
88 ActivateL(); |
|
89 } |
|
90 |
|
91 |
|
92 // --------------------------------------------------------- |
|
93 // CVcSettingsViewContainer::SetTitleL() |
|
94 // --------------------------------------------------------- |
|
95 // |
|
96 void CVcxNsSettingsViewContainer::SetTitleL( TInt aResourceId ) |
|
97 { |
|
98 CEikStatusPane* sp = static_cast<CAknAppUi*>(iCoeEnv->AppUi())->StatusPane(); |
|
99 |
|
100 CAknTitlePane* title = |
|
101 static_cast<CAknTitlePane*>(sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle))); |
|
102 |
|
103 TResourceReader rReader; |
|
104 iCoeEnv->CreateResourceReaderLC(rReader, aResourceId ); |
|
105 title->SetFromResourceL(rReader); |
|
106 CleanupStack::PopAndDestroy(); //rReader |
|
107 } |
|
108 |
|
109 // ---------------------------------------------------- |
|
110 // CVcSettingsViewContainer::~CVcSettingsViewContainer() |
|
111 // ---------------------------------------------------- |
|
112 // |
|
113 CVcxNsSettingsViewContainer::~CVcxNsSettingsViewContainer() |
|
114 { |
|
115 delete iServiceSelection; |
|
116 delete iAddOrEditService; |
|
117 } |
|
118 |
|
119 // --------------------------------------------------------- |
|
120 // CVcSettingsViewContainer::AppUi() |
|
121 // --------------------------------------------------------- |
|
122 // |
|
123 CAknViewAppUi* CVcxNsSettingsViewContainer::AppUi() |
|
124 { |
|
125 return &iAppUi; |
|
126 } |
|
127 |
|
128 // --------------------------------------------------------- |
|
129 // CVcSettingsViewContainer::SettingsView() |
|
130 // --------------------------------------------------------- |
|
131 // |
|
132 CVcxNsSettingsView* CVcxNsSettingsViewContainer::SettingsView() |
|
133 { |
|
134 return iParentView; |
|
135 } |
|
136 |
|
137 // --------------------------------------------------------- |
|
138 // CVcSettingsViewContainer::SettingsView() |
|
139 // --------------------------------------------------------- |
|
140 // |
|
141 CVcxNsSettingsViewServiceSelection* CVcxNsSettingsViewContainer::ServiceSelection() |
|
142 { |
|
143 return iServiceSelection; |
|
144 } |
|
145 |
|
146 // --------------------------------------------------------- |
|
147 // CVcSettingsViewContainer::SwitchToServiceSelectionListL() |
|
148 // --------------------------------------------------------- |
|
149 // |
|
150 void CVcxNsSettingsViewContainer::SwitchToServiceSelectionListL() |
|
151 { |
|
152 iAddOrEditService->Deactivate(); |
|
153 |
|
154 iServiceSelection->LoadL(); |
|
155 iServiceSelection->ActivateL(); |
|
156 |
|
157 iActiveList = EServiceSelection; |
|
158 DrawNow(); |
|
159 } |
|
160 |
|
161 // --------------------------------------------------------- |
|
162 // CVcSettingsViewContainer::SwitchToServiceSelectionListL() |
|
163 // Special handler for direct activation of service subscriptions. |
|
164 // --------------------------------------------------------- |
|
165 // |
|
166 void CVcxNsSettingsViewContainer::SwitchToServiceSelectionListL( |
|
167 CIptvService::TServiceType aServiceType ) |
|
168 { |
|
169 iAddOrEditService->Deactivate(); |
|
170 |
|
171 iServiceSelection->SetServiceType( aServiceType ); |
|
172 iServiceSelection->LoadL(); |
|
173 iServiceSelection->ActivateL(); |
|
174 iServiceSelection->CheckMsk( ); |
|
175 |
|
176 iActiveList = EServiceSelection; |
|
177 DrawNow(); |
|
178 } |
|
179 |
|
180 // --------------------------------------------------------- |
|
181 // CVcSettingsViewContainer::FinishServiceSelectionList() |
|
182 // Special handler for closing service subscriptions. |
|
183 // --------------------------------------------------------- |
|
184 // |
|
185 void CVcxNsSettingsViewContainer::FinishServiceSelectionList() |
|
186 { |
|
187 iServiceSelection->Deactivate(); |
|
188 } |
|
189 |
|
190 // --------------------------------------------------------- |
|
191 // CVcSettingsViewContainer::SwitchToAddOrEditServiceListL() |
|
192 // --------------------------------------------------------- |
|
193 // |
|
194 void CVcxNsSettingsViewContainer::SwitchToAddOrEditServiceListL() |
|
195 { |
|
196 iServiceSelection->Deactivate(); |
|
197 iAddOrEditService->ActivateL(); |
|
198 |
|
199 iActiveList = EAddService; |
|
200 DrawNow(); |
|
201 } |
|
202 |
|
203 // --------------------------------------------------------- |
|
204 // CVcSettingsViewContainer::EditCurrentSettingItemListItemL() |
|
205 // --------------------------------------------------------- |
|
206 // |
|
207 void CVcxNsSettingsViewContainer::EditCurrentSettingItemListItemL( |
|
208 TBool aCalledFromMenu ) |
|
209 { |
|
210 if (iActiveList == EAddService) |
|
211 { |
|
212 iAddOrEditService->ListBox()->EditCurrentItemL(); |
|
213 } |
|
214 |
|
215 if ( !aCalledFromMenu ) |
|
216 { |
|
217 // Fixes not updating toggled setting items |
|
218 ComponentControl( 0 )->DrawDeferred(); |
|
219 } |
|
220 } |
|
221 |
|
222 // --------------------------------------------------------- |
|
223 // CVcSettingsViewContainer::ShowVideoServiceDetailsL() |
|
224 // --------------------------------------------------------- |
|
225 // |
|
226 void CVcxNsSettingsViewContainer::ShowVideoServiceDetailsL() |
|
227 { |
|
228 if ( iActiveList == EServiceSelection ) |
|
229 { |
|
230 CIptvService* iptvService = iServiceSelection->GetCurrentServiceL(); |
|
231 |
|
232 if ( iptvService ) |
|
233 { |
|
234 CleanupStack::PushL(iptvService); |
|
235 CAknMessageQueryDialog* dlg = new (ELeave) CAknMessageQueryDialog(); |
|
236 TDes16& desc = iptvService->GetDesc(); |
|
237 dlg->SetMessageText(desc); |
|
238 CleanupStack::PopAndDestroy(iptvService); |
|
239 |
|
240 dlg->ExecuteLD(R_VCSETTINGSVIEW_SERVICEDETAILS_QUERY); |
|
241 } |
|
242 } |
|
243 } |
|
244 |
|
245 // --------------------------------------------------------- |
|
246 // CVcSettingsViewContainer::GetServiceSelectionServiceType() |
|
247 // --------------------------------------------------------- |
|
248 // |
|
249 CIptvService::TServiceType CVcxNsSettingsViewContainer::GetServiceSelectionServiceType() |
|
250 { |
|
251 return iServiceSelection->GetServiceType(); |
|
252 } |
|
253 |
|
254 // --------------------------------------------------------- |
|
255 // CVcSettingsViewContainer::LoadAddServiceInformationL() |
|
256 // iAppSettings -> UI |
|
257 // --------------------------------------------------------- |
|
258 // |
|
259 void CVcxNsSettingsViewContainer::LoadAddServiceInformationL(TBool aAdding) |
|
260 { |
|
261 iAddOrEditService->LoadL(aAdding, iServiceSelection->GetServiceType()); |
|
262 } |
|
263 |
|
264 // --------------------------------------------------------- |
|
265 // CVcSettingsViewContainer::SaveServiceSelectionInformationL() |
|
266 // UI -> iAppSettings |
|
267 // --------------------------------------------------------- |
|
268 // |
|
269 void CVcxNsSettingsViewContainer::SaveServiceSelectionInformationL() |
|
270 { |
|
271 iServiceSelection->SaveL(); |
|
272 } |
|
273 |
|
274 // --------------------------------------------------------- |
|
275 // CVcSettingsViewContainer::SaveAddServiceInformationL() |
|
276 // UI -> iAppSettings |
|
277 // --------------------------------------------------------- |
|
278 // |
|
279 void CVcxNsSettingsViewContainer::SaveAddServiceInformationL() |
|
280 { |
|
281 iAddOrEditService->SaveL(); |
|
282 } |
|
283 |
|
284 // --------------------------------------------------------- |
|
285 // CVcSettingsViewContainer::HandleMarkCommandL() |
|
286 // --------------------------------------------------------- |
|
287 // |
|
288 void CVcxNsSettingsViewContainer::HandleMarkCommandL( TInt aCommand ) |
|
289 { |
|
290 switch ( aCommand ) |
|
291 { |
|
292 case EVcSettingsServiceCmdMark: |
|
293 { |
|
294 AknSelectionService::HandleMarkableListProcessCommandL( |
|
295 EAknCmdMark, |
|
296 iServiceSelection->ListBox() ); |
|
297 } |
|
298 break; |
|
299 |
|
300 case EVcSettingsServiceCmdUnmark: |
|
301 { |
|
302 AknSelectionService::HandleMarkableListProcessCommandL( |
|
303 EAknCmdUnmark, |
|
304 iServiceSelection->ListBox() ); |
|
305 } |
|
306 break; |
|
307 |
|
308 default: |
|
309 break; |
|
310 } |
|
311 } |
|
312 |
|
313 |
|
314 |
|
315 // --------------------------------------------------------- |
|
316 // CVcSettingsViewContainer::DeleteVideoServiceL() |
|
317 // --------------------------------------------------------- |
|
318 // |
|
319 void CVcxNsSettingsViewContainer::DeleteVideoServiceL() |
|
320 { |
|
321 if (iActiveList == EServiceSelection) |
|
322 { |
|
323 iServiceSelection->DeleteCurrentServiceL(); |
|
324 } |
|
325 } |
|
326 |
|
327 // --------------------------------------------------------- |
|
328 // CVcSettingsViewContainer::ShowMarkForCurrentListItemL() |
|
329 // --------------------------------------------------------- |
|
330 // |
|
331 TBool CVcxNsSettingsViewContainer::ShowMarkForCurrentListItemL() |
|
332 { |
|
333 return ((!IsCurrentListItemMarked()) && ShowMenuItemForCurrentListItemL(EConst)); |
|
334 } |
|
335 |
|
336 // --------------------------------------------------------- |
|
337 // CVcSettingsViewContainer::ShowUnmarkForCurrentListItemL() |
|
338 // --------------------------------------------------------- |
|
339 // |
|
340 TBool CVcxNsSettingsViewContainer::ShowUnmarkForCurrentListItemL() |
|
341 { |
|
342 return (IsCurrentListItemMarked() && ShowMenuItemForCurrentListItemL(EConst)); |
|
343 } |
|
344 |
|
345 // --------------------------------------------------------- |
|
346 // CVcSettingsViewContainer::IsCurrentListItemMarked() |
|
347 // --------------------------------------------------------- |
|
348 // |
|
349 TBool CVcxNsSettingsViewContainer::IsCurrentListItemMarked() |
|
350 { |
|
351 const CListBoxView::CSelectionIndexArray* indices = NULL; |
|
352 TInt index = KErrNotFound; |
|
353 |
|
354 if (iActiveList == EServiceSelection) |
|
355 { |
|
356 indices = iServiceSelection->ListBox()->SelectionIndexes(); |
|
357 index = iServiceSelection->ListBox()->CurrentItemIndex(); |
|
358 |
|
359 for (TInt i = 0; i < indices->Count(); i++) |
|
360 { |
|
361 if (((*indices)[i]) == index) |
|
362 { |
|
363 return ETrue; |
|
364 } |
|
365 } |
|
366 } |
|
367 |
|
368 return EFalse; |
|
369 } |
|
370 |
|
371 // --------------------------------------------------------- |
|
372 // CVcSettingsViewContainer::ShowMenuItemForCurrentListItemL() |
|
373 // TMenuItemType: EGeneral, EConst, EConstAndInfo, EEditable |
|
374 // --------------------------------------------------------- |
|
375 // |
|
376 TBool CVcxNsSettingsViewContainer::ShowMenuItemForCurrentListItemL( |
|
377 TMenuItemType aMenuItemType) |
|
378 { |
|
379 if (iActiveList == EServiceSelection) |
|
380 { |
|
381 if (iServiceSelection->ListBox()->CurrentItemIndex() >= 0) |
|
382 { |
|
383 switch (aMenuItemType) |
|
384 { |
|
385 case EGeneral: |
|
386 case EConst: |
|
387 default: |
|
388 // No special checks. |
|
389 break; |
|
390 |
|
391 case EConstAndInfo: |
|
392 // For const items where info is needed, |
|
393 // we check that info is available. |
|
394 { |
|
395 CIptvService* iptvService = |
|
396 iServiceSelection->GetCurrentServiceL(); |
|
397 |
|
398 if (iptvService) |
|
399 { |
|
400 CleanupStack::PushL(iptvService); |
|
401 TInt descLength = iptvService->GetDesc().Length(); |
|
402 CleanupStack::PopAndDestroy(iptvService); |
|
403 |
|
404 return descLength > 0; |
|
405 } |
|
406 } |
|
407 break; |
|
408 |
|
409 case EEditable: |
|
410 // For editable items, we need to check |
|
411 // that service is not read only. |
|
412 { |
|
413 if (iServiceSelection->IsCurrentServiceReadOnlyL()) |
|
414 { |
|
415 return EFalse; |
|
416 } |
|
417 } |
|
418 break; |
|
419 } |
|
420 |
|
421 return ETrue; |
|
422 } |
|
423 } |
|
424 |
|
425 return EFalse; |
|
426 } |
|
427 |
|
428 // --------------------------------------------------------- |
|
429 // CVcSettingsViewContainer::SizeChanged() |
|
430 // --------------------------------------------------------- |
|
431 // |
|
432 void CVcxNsSettingsViewContainer::SizeChanged() |
|
433 { |
|
434 if (/*iSettingItem && iServiceType && */ iServiceSelection && iAddOrEditService ) |
|
435 { |
|
436 iServiceSelection->ListBox()->SetRect(Rect()); |
|
437 iAddOrEditService->ListBox()->SetRect(Rect()); |
|
438 } |
|
439 } |
|
440 |
|
441 // --------------------------------------------------------- |
|
442 // CVcSettingsViewContainer::CountComponentControls() |
|
443 // --------------------------------------------------------- |
|
444 // |
|
445 TInt CVcxNsSettingsViewContainer::CountComponentControls() const |
|
446 { |
|
447 // iSettingItemList, iServiceType, iServiceSelection, |
|
448 // iAddOrEditService or iChangePriorityList. |
|
449 return 1; |
|
450 } |
|
451 |
|
452 // --------------------------------------------------------- |
|
453 // CVcSettingsViewContainer::ComponentControl() |
|
454 // --------------------------------------------------------- |
|
455 // |
|
456 CCoeControl* CVcxNsSettingsViewContainer::ComponentControl(TInt aIndex) const |
|
457 { |
|
458 switch (aIndex) |
|
459 { |
|
460 case 0: |
|
461 { |
|
462 if (iActiveList == EServiceSelection) |
|
463 { |
|
464 return iServiceSelection->ListBox(); |
|
465 } |
|
466 else if (iActiveList == EAddService) |
|
467 { |
|
468 return iAddOrEditService->ListBox(); |
|
469 } |
|
470 else |
|
471 { |
|
472 return NULL; |
|
473 } |
|
474 } |
|
475 default: |
|
476 { |
|
477 return NULL; |
|
478 } |
|
479 } |
|
480 } |
|
481 |
|
482 // --------------------------------------------------------- |
|
483 // CVcSettingsViewContainer::Draw() |
|
484 // --------------------------------------------------------- |
|
485 // |
|
486 void CVcxNsSettingsViewContainer::Draw(const TRect& /*aRect*/) const |
|
487 { |
|
488 } |
|
489 |
|
490 // --------------------------------------------------------- |
|
491 // CVcSettingsViewContainer::HandleResourceChange() |
|
492 // --------------------------------------------------------- |
|
493 // |
|
494 void CVcxNsSettingsViewContainer::HandleResourceChange( TInt aType ) |
|
495 { |
|
496 CCoeControl::HandleResourceChange(aType); |
|
497 |
|
498 iServiceSelection->ListBox()->HandleResourceChange( aType ); |
|
499 iAddOrEditService->ListBox()->HandleResourceChange( aType ); |
|
500 |
|
501 if( aType == KEikDynamicLayoutVariantSwitch ) |
|
502 { |
|
503 TRect rect; |
|
504 |
|
505 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect); |
|
506 SetRect(rect); |
|
507 } |
|
508 } |
|
509 |
|
510 // --------------------------------------------------------- |
|
511 // CVcSettingsViewContainer::OfferKeyEventL() |
|
512 // --------------------------------------------------------- |
|
513 // |
|
514 TKeyResponse CVcxNsSettingsViewContainer::OfferKeyEventL( |
|
515 const TKeyEvent& aKeyEvent, |
|
516 TEventCode aType ) |
|
517 { |
|
518 |
|
519 if ( aKeyEvent.iCode == EKeyLeftArrow || |
|
520 aKeyEvent.iCode == EKeyRightArrow) |
|
521 { |
|
522 return EKeyWasNotConsumed; |
|
523 } |
|
524 |
|
525 if ( iActiveList == EServiceSelection && |
|
526 aType == EEventKey && |
|
527 aKeyEvent.iCode == EKeyOK && |
|
528 iServiceSelection ) |
|
529 { |
|
530 SaveServiceSelectionInformationL(); |
|
531 return iServiceSelection->ListBox()->OfferKeyEventL( aKeyEvent, aType ); |
|
532 } |
|
533 |
|
534 if ( aType == EEventKeyUp ) |
|
535 { |
|
536 CheckMsk(); |
|
537 } |
|
538 |
|
539 if ( iActiveList == EServiceSelection && iServiceSelection ) |
|
540 { |
|
541 if ( aKeyEvent.iScanCode == EStdKeyBackspace && aType == EEventKeyDown ) |
|
542 { |
|
543 if ( ! iServiceSelection->IsCurrentServiceReadOnlyL() ) |
|
544 DeleteVideoServiceL(); |
|
545 return EKeyWasConsumed; |
|
546 } |
|
547 |
|
548 return iServiceSelection->ListBox()->OfferKeyEventL( aKeyEvent, aType ); |
|
549 } |
|
550 else if ( iActiveList == EAddService && iAddOrEditService ) |
|
551 { |
|
552 return iAddOrEditService->ListBox()->OfferKeyEventL( aKeyEvent, aType ); |
|
553 } |
|
554 |
|
555 return EKeyWasNotConsumed; |
|
556 } |
|
557 |
|
558 // --------------------------------------------------------- |
|
559 // CVcSettingsViewContainer::GetHelpContext() |
|
560 // --------------------------------------------------------- |
|
561 // |
|
562 void CVcxNsSettingsViewContainer::GetHelpContext( TCoeHelpContext& aContext ) const |
|
563 { |
|
564 aContext.iMajor = KIptvHelpContextUid; |
|
565 |
|
566 switch ( iActiveList ) |
|
567 { |
|
568 case EServiceSelection: |
|
569 { |
|
570 if ( iServiceSelection->GetServiceType() == CIptvService::EVodCast ) |
|
571 { |
|
572 IPTVLOGSTRING_LOW_LEVEL( |
|
573 "Settings view ## CVcSettingsViewContainer::GetHelpContext()\ |
|
574 KIPTV_HLP_SERVICE_SEL_VODCAST"); |
|
575 aContext.iContext = KIPTV_HLP_SERVICE_SEL_VODCAST; |
|
576 } |
|
577 else if ( iServiceSelection->GetServiceType() == CIptvService::EVod ) |
|
578 { |
|
579 IPTVLOGSTRING_LOW_LEVEL( |
|
580 "Settings view ## CVcSettingsViewContainer::GetHelpContext()\ |
|
581 KIPTV_HLP_SERVICE_SEL_VODCAST"); |
|
582 aContext.iContext = KIPTV_HLP_SERVICE_SEL_VODCAST; |
|
583 } |
|
584 else if ( iServiceSelection->GetServiceType() == CIptvService::EBrowser ) |
|
585 { |
|
586 IPTVLOGSTRING_LOW_LEVEL( |
|
587 "Settings view ## CVcSettingsViewContainer::GetHelpContext()\ |
|
588 KIPTV_HLP_SERVICE_SELECTION_WEB"); |
|
589 aContext.iContext = KIPTV_HLP_SERVICE_SELECTION_WEB; |
|
590 } |
|
591 } |
|
592 break; |
|
593 |
|
594 case EAddService: |
|
595 { |
|
596 IPTVLOGSTRING_LOW_LEVEL( |
|
597 "Settings view ## CVcSettingsViewContainer::GetHelpContext()\ |
|
598 KIPTV_HLP_ADD_SERVICE"); |
|
599 aContext.iContext = KIPTV_HLP_ADD_SERVICE; |
|
600 } |
|
601 break; |
|
602 |
|
603 default: |
|
604 { |
|
605 IPTVLOGSTRING_LOW_LEVEL( |
|
606 "Settings view ## CVcSettingsViewContainer::GetHelpContext()\ |
|
607 KIPTV_HLP_SETTINGS(3)"); |
|
608 aContext.iContext = KIPTV_HLP_SETTINGS; |
|
609 } |
|
610 break; |
|
611 } |
|
612 } |
|
613 |
|
614 // --------------------------------------------------------- |
|
615 // CVcSettingsViewContainer::LoadAddVodCastFeedL() |
|
616 // --------------------------------------------------------- |
|
617 // |
|
618 void CVcxNsSettingsViewContainer::LoadAddVodCastFeedL() |
|
619 { |
|
620 TBool adding( ETrue ); |
|
621 iAddOrEditService->LoadL( adding, CIptvService::EVodCast ); |
|
622 } |
|
623 |
|
624 // --------------------------------------------------------- |
|
625 // CVcxNsSettingsViewContainer::HandleListBoxEventL |
|
626 // --------------------------------------------------------- |
|
627 // |
|
628 void CVcxNsSettingsViewContainer::HandleListBoxEventL( |
|
629 CEikListBox* /*aListBox*/, TListBoxEvent aEventType ) |
|
630 { |
|
631 if ( aEventType == EEventEnterKeyPressed || |
|
632 aEventType == EEventItemSingleClicked || |
|
633 aEventType == EEventItemDoubleClicked ) |
|
634 { |
|
635 switch ( iActiveList ) |
|
636 { |
|
637 case EServiceSelection: |
|
638 // decide wether to handle select, mark or unmark cmd |
|
639 if( IsCurrentListItemMarked() ) |
|
640 { |
|
641 // item already marked, unmark |
|
642 HandleMarkCommandL( EVcSettingsServiceCmdUnmark ); |
|
643 break; |
|
644 } |
|
645 else |
|
646 { |
|
647 // item unmarked, mark it |
|
648 HandleMarkCommandL( EVcSettingsServiceCmdMark ); |
|
649 break; |
|
650 } |
|
651 default: |
|
652 break; |
|
653 } |
|
654 } |
|
655 } |
|
656 |
|
657 // --------------------------------------------------------- |
|
658 // CVcSettingsViewContainer::ClearMsk() |
|
659 // --------------------------------------------------------- |
|
660 // |
|
661 void CVcxNsSettingsViewContainer::ClearMsk() |
|
662 { |
|
663 iCurrentMskResource = 0; |
|
664 } |
|
665 |
|
666 // --------------------------------------------------------- |
|
667 // CVcSettingsViewContainer::CheckMsk() |
|
668 // --------------------------------------------------------- |
|
669 // |
|
670 void CVcxNsSettingsViewContainer::CheckMsk() |
|
671 { |
|
672 if ( iActiveList == EAddService ) |
|
673 { |
|
674 TInt resourceId( 0 ); |
|
675 |
|
676 if ( ! iParentView || |
|
677 ! iParentView->GetButtonGroupContainer() ) |
|
678 { |
|
679 return; |
|
680 } |
|
681 |
|
682 resourceId = R_VCSETTINGSVIEW_MSK_BUTTON_CHANGE; |
|
683 |
|
684 if ( resourceId != iCurrentMskResource ) |
|
685 { |
|
686 iCurrentMskResource = resourceId; |
|
687 |
|
688 CEikButtonGroupContainer* cba = iParentView->GetButtonGroupContainer(); |
|
689 |
|
690 TRAPD( err, cba->SetCommandL( KIptvMskPosition, iCurrentMskResource ) ); |
|
691 if ( err == KErrNone ) |
|
692 { |
|
693 cba->DrawDeferred(); |
|
694 } |
|
695 } |
|
696 } |
|
697 else if ( iActiveList == EServiceSelection && iServiceSelection) |
|
698 { |
|
699 iServiceSelection->CheckMsk(); |
|
700 } |
|
701 } |
|
702 |
|
703 // --------------------------------------------------------- |
|
704 // CVcxNsSettingsViewContainer::TitleResourceId |
|
705 // --------------------------------------------------------- |
|
706 // |
|
707 TInt CVcxNsSettingsViewContainer::TitleResourceId() |
|
708 { |
|
709 return R_MPSETT_FEEDS_VIEW_TITLE; |
|
710 } |
|
711 |