|
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 Streaming settings 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 "MPSettingsStreamingContainer.h"
|
|
|
30 |
#include "MPSettingsStreamingSettingItemList.h"
|
|
|
31 |
#include "MPSettingsConstants.h"
|
|
|
32 |
#include "mpxlog.h"
|
|
|
33 |
|
|
|
34 |
class CMPSettingsModelForROP;
|
|
|
35 |
// ================= MEMBER FUNCTIONS =======================
|
|
|
36 |
|
|
|
37 |
// -----------------------------------------------------------------------------
|
|
|
38 |
// CMPSettingsStreamingContainer::CMPSettingsStreamingContainer
|
|
|
39 |
// C++ default constructor can NOT contain any code, that
|
|
|
40 |
// might leave.
|
|
|
41 |
// -----------------------------------------------------------------------------
|
|
|
42 |
//
|
|
|
43 |
CMPSettingsStreamingContainer::CMPSettingsStreamingContainer(CMPSettingsModelForROP* aModel) : iModel( aModel)
|
|
|
44 |
{
|
|
|
45 |
MPX_DEBUG1(_L("#MS# CMPSettingsStreamingContainer::CMPSettingsStreamingContainer()"));
|
|
|
46 |
}
|
|
|
47 |
|
|
|
48 |
// ---------------------------------------------------------
|
|
|
49 |
// CMPSettingsStreamingContainer::~CMPSettingsStreamingContainer
|
|
|
50 |
// Destructor
|
|
|
51 |
// ---------------------------------------------------------
|
|
|
52 |
//
|
|
|
53 |
CMPSettingsStreamingContainer::~CMPSettingsStreamingContainer()
|
|
|
54 |
{
|
|
|
55 |
MPX_DEBUG1(_L("#MS# CMPSettingsStreamingContainer::~CMPSettingsStreamingContainer()"));
|
|
|
56 |
|
|
|
57 |
delete iSettingList;
|
|
|
58 |
}
|
|
|
59 |
|
|
|
60 |
// ---------------------------------------------------------
|
|
|
61 |
// CMPSettingsStreamingContainer::ConstructComponentControlsL
|
|
|
62 |
// ---------------------------------------------------------
|
|
|
63 |
//
|
|
|
64 |
void CMPSettingsStreamingContainer::ConstructComponentControlsL()
|
|
|
65 |
{
|
|
|
66 |
MPX_FUNC("#MS# CMPSettingsStreamingContainer::ConstructComponentControlsL()");
|
|
|
67 |
|
|
|
68 |
iSettingList = new(ELeave) CMPSettingsStreamingSettingItemList( iModel );
|
|
|
69 |
iSettingList->SetContainerWindowL( *this );
|
|
|
70 |
iSettingList->ConstructFromResourceL( R_MPSETT_STREAMING_SETTING_ITEM_LIST );
|
|
|
71 |
|
|
|
72 |
iComponentControl = iSettingList;
|
|
|
73 |
iListBox = iSettingList->ListBox();
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
// ---------------------------------------------------------
|
|
|
77 |
// CMPSettingsStreamingContainer::TitleResourceId
|
|
|
78 |
// ---------------------------------------------------------
|
|
|
79 |
//
|
|
|
80 |
TInt CMPSettingsStreamingContainer::TitleResourceId()
|
|
|
81 |
{
|
|
|
82 |
return R_MPSETT_STREAMING_VIEW_TITLE;
|
|
|
83 |
}
|
|
|
84 |
|
|
|
85 |
// ---------------------------------------------------------
|
|
|
86 |
// CMPSettingsStreamingContainer::GetHelpContext
|
|
|
87 |
// ---------------------------------------------------------
|
|
|
88 |
//
|
|
|
89 |
void CMPSettingsStreamingContainer::GetHelpContext(TCoeHelpContext& aContext) const
|
|
|
90 |
{
|
|
|
91 |
MPX_FUNC("#MS# CMPSettingsStreamingContainer::GetHelpContext()");
|
|
|
92 |
aContext.iMajor = KIptvHelpContextUid;
|
|
|
93 |
aContext.iContext = KIPTV_HLP_SETTINGS;
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
// ---------------------------------------------------------
|
|
|
97 |
// CMPSettingsStreamingContainer::FocusChanged
|
|
|
98 |
// ---------------------------------------------------------
|
|
|
99 |
//
|
|
|
100 |
void CMPSettingsStreamingContainer::FocusChanged(TDrawNow /*aDrawNow*/)
|
|
|
101 |
{
|
|
|
102 |
if( iListBox)
|
|
|
103 |
{
|
|
|
104 |
iListBox->SetFocus( IsFocused() );
|
|
|
105 |
}
|
|
|
106 |
|
|
|
107 |
if( iComponentControl)
|
|
|
108 |
{
|
|
|
109 |
iComponentControl->SetFocus( IsFocused() );
|
|
|
110 |
}
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
// ---------------------------------------------------------
|
|
|
114 |
// CMPSettingsStreamingContainer::EditCurrentItemFromMenuL
|
|
|
115 |
// ---------------------------------------------------------
|
|
|
116 |
//
|
|
|
117 |
void CMPSettingsStreamingContainer::EditCurrentItemFromMenuL(TBool iMenuOption)
|
|
|
118 |
{
|
|
|
119 |
MPX_DEBUG2(_L("#MS# CMPSettingsProxyContainer::EditCurrentItemFromMenuL(%d)"),iMenuOption);
|
|
|
120 |
TInt index = iListBox->CurrentItemIndex();
|
|
|
121 |
iSettingList->EditItemL(index, iMenuOption);
|
|
|
122 |
}
|
|
|
123 |
// End of File
|