|
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: View class for Advanced bandwidth settings list view.* |
|
15 */ |
|
16 |
|
17 |
|
18 // Version : %version: 8 % |
|
19 |
|
20 |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <aknViewAppUi.h> |
|
24 #include <hlplch.h> // For HlpLauncher |
|
25 #include <featmgr.h> |
|
26 #include <MediaSettings.rsg> |
|
27 |
|
28 #include "mediasettings.hrh" |
|
29 #include "MPSettingsNaviPaneController.h" |
|
30 #include "MPSettingsAdvancedBwView.h" |
|
31 #include "MPSettingsAdvancedBwContainer.h" |
|
32 #include "MPSettingsConstants.h" |
|
33 #include "mpxlog.h" |
|
34 |
|
35 class CMPSettingsModelForROP; |
|
36 // ================= MEMBER FUNCTIONS ======================= |
|
37 |
|
38 // ----------------------------------------------------------------------------- |
|
39 // CMPSettingsAdvancedBwView::CMPSettingsAdvancedBwView |
|
40 // C++ default constructor can NOT contain any code, that |
|
41 // might leave. |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 CMPSettingsAdvancedBwView::CMPSettingsAdvancedBwView( |
|
45 CMPSettingsModelForROP* aModel, |
|
46 TBool iConstructAsGsPlugin ) |
|
47 : iModel( aModel), |
|
48 iGsPlugin(iConstructAsGsPlugin) |
|
49 { |
|
50 MPX_FUNC("#MS# CMPSettingsAdvancedBwView::CMPSettingsAdvancedBwView()"); |
|
51 } |
|
52 |
|
53 // --------------------------------------------------------- |
|
54 // CMPSettingsAdvancedBwView::ConstructL |
|
55 // Symbian OS two-phased constructor |
|
56 // --------------------------------------------------------- |
|
57 // |
|
58 void CMPSettingsAdvancedBwView::ConstructL() |
|
59 { |
|
60 MPX_FUNC("#MS# CMPSettingsAdvancedBwView::ConstructL()"); |
|
61 BaseConstructL(R_MPSETT_ADVANCED_BW_VIEW); |
|
62 } |
|
63 |
|
64 // ----------------------------------------------------------------------------- |
|
65 // CMPSettingsAdvancedBwView::NewLC |
|
66 // Two-phased constructor. |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 CMPSettingsAdvancedBwView* CMPSettingsAdvancedBwView::NewLC( |
|
70 CMPSettingsModelForROP* aModel, |
|
71 TBool iConstructAsGsPlugin ) |
|
72 { |
|
73 MPX_DEBUG2(_L("#MS# CMPSettingsAdvancedBwView::NewLC(%d)"),iConstructAsGsPlugin); |
|
74 CMPSettingsAdvancedBwView* self = new(ELeave) CMPSettingsAdvancedBwView(aModel,iConstructAsGsPlugin); |
|
75 |
|
76 CleanupStack::PushL(self); |
|
77 self->ConstructL(); |
|
78 |
|
79 return self; |
|
80 } |
|
81 |
|
82 // --------------------------------------------------------- |
|
83 // CMPSettingsAdvancedBwView::~CMPSettingsAdvancedBwView() |
|
84 // Destructor |
|
85 // --------------------------------------------------------- |
|
86 // |
|
87 CMPSettingsAdvancedBwView::~CMPSettingsAdvancedBwView() |
|
88 { |
|
89 MPX_FUNC("#MS# CMPSettingsAdvancedBwView::~CMPSettingsAdvancedBwView()"); |
|
90 } |
|
91 |
|
92 // --------------------------------------------------------- |
|
93 // TUid CMPSettingsAdvancedBwView::Id |
|
94 // --------------------------------------------------------- |
|
95 // |
|
96 TUid CMPSettingsAdvancedBwView::Id() const |
|
97 { |
|
98 MPX_FUNC("#MS# CMPSettingsAdvancedBwView::Id()"); |
|
99 return KMPSettAdvancedBwViewId; |
|
100 } |
|
101 |
|
102 // --------------------------------------------------------- |
|
103 // CMPSettingsAdvancedBwView::HandleCommandL |
|
104 // --------------------------------------------------------- |
|
105 // |
|
106 void CMPSettingsAdvancedBwView::HandleCommandL(TInt aCommand) |
|
107 { |
|
108 MPX_DEBUG2(_L("#MS# CMPSettingsAdvancedBwView::HandleCommandL(%d)"),aCommand); |
|
109 switch (aCommand) |
|
110 { |
|
111 case EMPSettCmdChange: |
|
112 static_cast<CMPSettingsAdvancedBwContainer*>(iContainer)->EditCurrentItemFromMenuL(); |
|
113 break; |
|
114 case EAknSoftkeyBack: |
|
115 AppUi()->ActivateLocalViewL( KMPSettStreamingViewId ); |
|
116 break; |
|
117 case EMPSettCmdHelp: |
|
118 if( FeatureManager::FeatureSupported( KFeatureIdHelp ) ) |
|
119 { |
|
120 HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), AppUi()->AppHelpContextL() ); |
|
121 } |
|
122 break; |
|
123 default: |
|
124 AppUi()->HandleCommandL(aCommand); |
|
125 break; |
|
126 } |
|
127 } |
|
128 |
|
129 // --------------------------------------------------------------------------- |
|
130 // CMPSettingsAdvancedBwView::NewContainerL |
|
131 // --------------------------------------------------------------------------- |
|
132 // |
|
133 CMPSettingsBaseContainer* CMPSettingsAdvancedBwView::NewContainerL() |
|
134 { |
|
135 MPX_FUNC("#MS# CMPSettingsAdvancedBwView::NewContainerL()"); |
|
136 return new(ELeave) CMPSettingsAdvancedBwContainer(iModel); |
|
137 } |
|
138 |
|
139 // --------------------------------------------------------------------------- |
|
140 // CMPSettingsAdvancedBwView::SetNaviPaneL |
|
141 // Sets Navipane texts. |
|
142 // --------------------------------------------------------------------------- |
|
143 // |
|
144 void CMPSettingsAdvancedBwView::SetNaviPaneL() |
|
145 { |
|
146 MPX_FUNC("#MS# CMPSettingsAdvancedBwView::SetNaviPaneL()"); |
|
147 if (!iGsPlugin) |
|
148 { |
|
149 iNaviPaneContext = NULL; |
|
150 CMPSettingsBaseView::SetNaviPaneL(); |
|
151 } |
|
152 CMPSettingsBaseView::SetMiddleSoftKeyLabelL(R_MEDIASETTING_MSK_CHANGE,EMPSettCmdChange); |
|
153 } |
|
154 // End of File |
|
155 |