|
1 /* |
|
2 * Copyright (c) 2002 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 Streaming settings list view.* |
|
15 */ |
|
16 |
|
17 |
|
18 // Version : %version: 5 % |
|
19 |
|
20 |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <aknlists.h> |
|
24 #include <barsread.h> |
|
25 #include <MediaSettings.rsg> |
|
26 #include <csxhelp/iptv.hlp.hrh> |
|
27 |
|
28 #include "MPSettingsApp.h" |
|
29 #include "MPSettingsStreamingContainer.h" |
|
30 #include "MPSettingsConstants.h" |
|
31 #include "mpxlog.h" |
|
32 |
|
33 class CMPSettingsModelForROP; |
|
34 // ================= MEMBER FUNCTIONS ======================= |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CMPSettingsStreamingContainer::CMPSettingsStreamingContainer |
|
38 // C++ default constructor can NOT contain any code, that |
|
39 // might leave. |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 CMPSettingsStreamingContainer::CMPSettingsStreamingContainer(CMPSettingsModelForROP* aModel) : iModel( aModel) |
|
43 { |
|
44 MPX_DEBUG1(_L("#MS# CMPSettingsStreamingContainer::CMPSettingsStreamingContainer()")); |
|
45 } |
|
46 |
|
47 // --------------------------------------------------------- |
|
48 // CMPSettingsStreamingContainer::~CMPSettingsStreamingContainer |
|
49 // Destructor |
|
50 // --------------------------------------------------------- |
|
51 // |
|
52 CMPSettingsStreamingContainer::~CMPSettingsStreamingContainer() |
|
53 { |
|
54 MPX_DEBUG1(_L("#MS# CMPSettingsStreamingContainer::~CMPSettingsStreamingContainer()")); |
|
55 if (iListBox) |
|
56 { |
|
57 delete iListBox; |
|
58 } |
|
59 } |
|
60 |
|
61 // --------------------------------------------------------- |
|
62 // CMPSettingsStreamingContainer::ConstructComponentControlsL |
|
63 // --------------------------------------------------------- |
|
64 // |
|
65 void CMPSettingsStreamingContainer::ConstructComponentControlsL() |
|
66 { |
|
67 MPX_FUNC("#MS# CMPSettingsStreamingContainer::ConstructComponentControlsL()"); |
|
68 iListBox = new(ELeave) CAknSettingStyleListBox; |
|
69 |
|
70 iListBox->SetContainerWindowL(*this); // set's iListBox to be contained in this container |
|
71 |
|
72 TResourceReader rReader; |
|
73 iCoeEnv->Static()->CreateResourceReaderLC(rReader, R_MPSETT_STREAMING_LBX_RESOURCE); |
|
74 iListBox->ConstructFromResourceL(rReader); // construct's iListBox from resource file |
|
75 CleanupStack::PopAndDestroy(); // rReader |
|
76 |
|
77 iListBox->CreateScrollBarFrameL(ETrue); |
|
78 iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto); |
|
79 |
|
80 iComponentControl = iListBox; |
|
81 } |
|
82 |
|
83 // --------------------------------------------------------- |
|
84 // CMPSettingsStreamingContainer::TitleResourceId |
|
85 // --------------------------------------------------------- |
|
86 // |
|
87 TInt CMPSettingsStreamingContainer::TitleResourceId() |
|
88 { |
|
89 return R_MPSETT_STREAMING_VIEW_TITLE; |
|
90 } |
|
91 |
|
92 // --------------------------------------------------------- |
|
93 // CMPSettingsStreamingContainer::GetHelpContext |
|
94 // --------------------------------------------------------- |
|
95 // |
|
96 void CMPSettingsStreamingContainer::GetHelpContext(TCoeHelpContext& aContext) const |
|
97 { |
|
98 MPX_FUNC("#MS# CMPSettingsStreamingContainer::GetHelpContext()"); |
|
99 aContext.iMajor = KIptvHelpContextUid; |
|
100 aContext.iContext = KIPTV_HLP_SETTINGS; |
|
101 } |
|
102 |
|
103 // --------------------------------------------------------- |
|
104 // CMPSettingsStreamingContainer::FocusChanged |
|
105 // --------------------------------------------------------- |
|
106 // |
|
107 void CMPSettingsStreamingContainer::FocusChanged(TDrawNow /*aDrawNow*/) |
|
108 { |
|
109 if( iListBox) |
|
110 { |
|
111 iListBox->SetFocus( IsFocused() ); |
|
112 } |
|
113 |
|
114 if( iComponentControl) |
|
115 { |
|
116 iComponentControl->SetFocus( IsFocused() ); |
|
117 } |
|
118 } |
|
119 // End of File |