|
57
|
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 Advanced bandwidth setting list view.*
|
|
|
15 |
*/
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
// Version : %version: 8 %
|
|
|
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 "MPSettingsAdvancedBwContainer.h"
|
|
|
30 |
#include "MPSettingsAdvancedBwSettingItemList.h"
|
|
|
31 |
#include "MPSettingsConstants.h"
|
|
|
32 |
#include "mpxlog.h"
|
|
|
33 |
|
|
|
34 |
class CMPSettingsModelForROP;
|
|
|
35 |
// ================= MEMBER FUNCTIONS =======================
|
|
|
36 |
|
|
|
37 |
// -----------------------------------------------------------------------------
|
|
|
38 |
// CMPSettingsAdvancedBwContainer::CMPSettingsAdvancedBwContainer
|
|
|
39 |
// C++ default constructor can NOT contain any code, that
|
|
|
40 |
// might leave.
|
|
|
41 |
// -----------------------------------------------------------------------------
|
|
|
42 |
//
|
|
|
43 |
CMPSettingsAdvancedBwContainer::CMPSettingsAdvancedBwContainer(CMPSettingsModelForROP* aModel)
|
|
|
44 |
: iModel( aModel)
|
|
|
45 |
{
|
|
|
46 |
MPX_FUNC("#MS# CMPSettingsAdvancedBwContainer::CMPSettingsAdvancedBwContainer()");
|
|
|
47 |
}
|
|
|
48 |
|
|
|
49 |
// ---------------------------------------------------------
|
|
|
50 |
// CMPSettingsAdvancedBwContainer::~CMPSettingsAdvancedBwContainer
|
|
|
51 |
// Destructor
|
|
|
52 |
// ---------------------------------------------------------
|
|
|
53 |
//
|
|
|
54 |
CMPSettingsAdvancedBwContainer::~CMPSettingsAdvancedBwContainer()
|
|
|
55 |
{
|
|
|
56 |
MPX_FUNC("#MS# CMPSettingsAdvancedBwContainer::~CMPSettingsAdvancedBwContainer()");
|
|
|
57 |
if (iSettingList)
|
|
|
58 |
{
|
|
|
59 |
delete iSettingList;
|
|
|
60 |
}
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
// ---------------------------------------------------------
|
|
|
64 |
// CMPSettingsAdvancedBwContainer::EditCurrentItemFromMenuL
|
|
|
65 |
// ---------------------------------------------------------
|
|
|
66 |
//
|
|
|
67 |
void CMPSettingsAdvancedBwContainer::EditCurrentItemFromMenuL()
|
|
|
68 |
{
|
|
|
69 |
MPX_FUNC("#MS# CMPSettingsAdvancedBwContainer::EditCurrentItemFromMenuL()");
|
|
|
70 |
TInt index = iListBox->CurrentItemIndex();
|
|
|
71 |
iSettingList->EditItemL(index, ETrue);
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
// ---------------------------------------------------------
|
|
|
75 |
// CMPSettingsAdvancedBwContainer::ConstructComponentControlsL
|
|
|
76 |
// ---------------------------------------------------------
|
|
|
77 |
//
|
|
|
78 |
void CMPSettingsAdvancedBwContainer::ConstructComponentControlsL()
|
|
|
79 |
{
|
|
|
80 |
MPX_FUNC("#MS# CMPSettingsAdvancedBwContainer::ConstructComponentControlsL()");
|
|
|
81 |
iSettingList = new(ELeave) CMPSettingsAdvancedBwSettingItemList(iModel);
|
|
|
82 |
|
|
|
83 |
iSettingList->SetContainerWindowL(*this);
|
|
|
84 |
|
|
|
85 |
iSettingList->ConstructFromResourceL(R_MPSETT_BEARER_BW_SETTING_ITEM_LIST);
|
|
|
86 |
|
|
|
87 |
iComponentControl = iSettingList;
|
|
|
88 |
iListBox = iSettingList->ListBox();
|
|
|
89 |
}
|
|
|
90 |
|
|
|
91 |
// ---------------------------------------------------------
|
|
|
92 |
// CMPSettingsAdvancedBwContainer::TitleResourceId
|
|
|
93 |
// ---------------------------------------------------------
|
|
|
94 |
//
|
|
|
95 |
TInt CMPSettingsAdvancedBwContainer::TitleResourceId()
|
|
|
96 |
{
|
|
|
97 |
return R_MPSETT_STREAMING_VIEW_TITLE;
|
|
|
98 |
}
|
|
|
99 |
|
|
|
100 |
// ---------------------------------------------------------
|
|
|
101 |
// CMPSettingsAdvancedBwContainer::GetHelpContext
|
|
|
102 |
// ---------------------------------------------------------
|
|
|
103 |
//
|
|
|
104 |
void CMPSettingsAdvancedBwContainer::GetHelpContext(TCoeHelpContext& aContext) const
|
|
|
105 |
{
|
|
|
106 |
MPX_FUNC("#MS# CMPSettingsAdvancedBwContainer::GetHelpContext()");
|
|
|
107 |
aContext.iMajor = KIptvHelpContextUid;
|
|
|
108 |
aContext.iContext = KIPTV_HLP_SETTINGS;
|
|
|
109 |
}
|
|
|
110 |
|
|
|
111 |
// ---------------------------------------------------------
|
|
|
112 |
// CMPSettingsAdvancedBwContainer::FocusChanged
|
|
|
113 |
// ---------------------------------------------------------
|
|
|
114 |
//
|
|
|
115 |
void CMPSettingsAdvancedBwContainer::FocusChanged(TDrawNow /*aDrawNow*/)
|
|
|
116 |
{
|
|
|
117 |
if( iListBox)
|
|
|
118 |
{
|
|
|
119 |
iListBox->SetFocus( IsFocused() );
|
|
|
120 |
}
|
|
|
121 |
|
|
|
122 |
if( iComponentControl)
|
|
|
123 |
{
|
|
|
124 |
iComponentControl->SetFocus( IsFocused() );
|
|
|
125 |
}
|
|
|
126 |
}
|
|
|
127 |
|
|
|
128 |
// ---------------------------------------------------------------------------
|
|
|
129 |
// CMPSettingsAdvancedBwContainer::SizeChanged()
|
|
|
130 |
// Called by framwork when the view size is changed
|
|
|
131 |
// ---------------------------------------------------------------------------
|
|
|
132 |
//
|
|
|
133 |
void CMPSettingsAdvancedBwContainer::SizeChanged()
|
|
|
134 |
{
|
|
|
135 |
if (iListBox)
|
|
|
136 |
{
|
|
|
137 |
iListBox->SetRect(Rect());
|
|
|
138 |
}
|
|
|
139 |
|
|
|
140 |
if (iComponentControl)
|
|
|
141 |
{
|
|
|
142 |
iComponentControl->SetRect(Rect());
|
|
|
143 |
}
|
|
|
144 |
}
|
|
|
145 |
|
|
|
146 |
// ---------------------------------------------------------
|
|
|
147 |
// CMPSettingsAdvancedBwContainer::HandleResourceChange
|
|
|
148 |
// Handles a resource relative event
|
|
|
149 |
// ---------------------------------------------------------
|
|
|
150 |
//
|
|
|
151 |
void CMPSettingsAdvancedBwContainer::HandleResourceChange( TInt aType )
|
|
|
152 |
{
|
|
|
153 |
MPX_DEBUG2(_L("#MS# CMPSettingsAdvancedBwContainer::HandleResourceChange(0x%X)"),aType);
|
|
|
154 |
if ( aType == KEikDynamicLayoutVariantSwitch ) //Handle change in layout orientation
|
|
|
155 |
{
|
|
|
156 |
TRect mainPaneRect;
|
|
|
157 |
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
|
|
|
158 |
SetRect( mainPaneRect );
|
|
|
159 |
DrawNow();
|
|
|
160 |
}
|
|
|
161 |
CCoeControl::HandleResourceChange( aType );
|
|
|
162 |
}
|
|
|
163 |
// End of File
|