25 #include <MediaSettings.rsg> |
25 #include <MediaSettings.rsg> |
26 #include <csxhelp/iptv.hlp.hrh> |
26 #include <csxhelp/iptv.hlp.hrh> |
27 |
27 |
28 #include "MPSettingsApp.h" |
28 #include "MPSettingsApp.h" |
29 #include "MPSettingsStreamingContainer.h" |
29 #include "MPSettingsStreamingContainer.h" |
|
30 #include "MPSettingsStreamingSettingItemList.h" |
30 #include "MPSettingsConstants.h" |
31 #include "MPSettingsConstants.h" |
31 #include "mpxlog.h" |
32 #include "mpxlog.h" |
32 |
33 |
33 class CMPSettingsModelForROP; |
34 class CMPSettingsModelForROP; |
34 // ================= MEMBER FUNCTIONS ======================= |
35 // ================= MEMBER FUNCTIONS ======================= |
50 // --------------------------------------------------------- |
51 // --------------------------------------------------------- |
51 // |
52 // |
52 CMPSettingsStreamingContainer::~CMPSettingsStreamingContainer() |
53 CMPSettingsStreamingContainer::~CMPSettingsStreamingContainer() |
53 { |
54 { |
54 MPX_DEBUG1(_L("#MS# CMPSettingsStreamingContainer::~CMPSettingsStreamingContainer()")); |
55 MPX_DEBUG1(_L("#MS# CMPSettingsStreamingContainer::~CMPSettingsStreamingContainer()")); |
55 if (iListBox) |
56 |
56 { |
57 delete iSettingList; |
57 delete iListBox; |
|
58 } |
|
59 } |
58 } |
60 |
59 |
61 // --------------------------------------------------------- |
60 // --------------------------------------------------------- |
62 // CMPSettingsStreamingContainer::ConstructComponentControlsL |
61 // CMPSettingsStreamingContainer::ConstructComponentControlsL |
63 // --------------------------------------------------------- |
62 // --------------------------------------------------------- |
64 // |
63 // |
65 void CMPSettingsStreamingContainer::ConstructComponentControlsL() |
64 void CMPSettingsStreamingContainer::ConstructComponentControlsL() |
66 { |
65 { |
67 MPX_FUNC("#MS# CMPSettingsStreamingContainer::ConstructComponentControlsL()"); |
66 MPX_FUNC("#MS# CMPSettingsStreamingContainer::ConstructComponentControlsL()"); |
68 iListBox = new(ELeave) CAknSettingStyleListBox; |
67 |
69 |
68 iSettingList = new(ELeave) CMPSettingsStreamingSettingItemList( iModel ); |
70 iListBox->SetContainerWindowL(*this); // set's iListBox to be contained in this container |
69 iSettingList->SetContainerWindowL( *this ); |
|
70 iSettingList->ConstructFromResourceL( R_MPSETT_STREAMING_SETTING_ITEM_LIST ); |
71 |
71 |
72 TResourceReader rReader; |
72 iComponentControl = iSettingList; |
73 iCoeEnv->Static()->CreateResourceReaderLC(rReader, R_MPSETT_STREAMING_LBX_RESOURCE); |
73 iListBox = iSettingList->ListBox(); |
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 } |
74 } |
82 |
75 |
83 // --------------------------------------------------------- |
76 // --------------------------------------------------------- |
84 // CMPSettingsStreamingContainer::TitleResourceId |
77 // CMPSettingsStreamingContainer::TitleResourceId |
85 // --------------------------------------------------------- |
78 // --------------------------------------------------------- |
103 // --------------------------------------------------------- |
96 // --------------------------------------------------------- |
104 // CMPSettingsStreamingContainer::FocusChanged |
97 // CMPSettingsStreamingContainer::FocusChanged |
105 // --------------------------------------------------------- |
98 // --------------------------------------------------------- |
106 // |
99 // |
107 void CMPSettingsStreamingContainer::FocusChanged(TDrawNow /*aDrawNow*/) |
100 void CMPSettingsStreamingContainer::FocusChanged(TDrawNow /*aDrawNow*/) |
108 { |
101 { |
109 if( iListBox) |
102 if( iListBox) |
110 { |
103 { |
111 iListBox->SetFocus( IsFocused() ); |
104 iListBox->SetFocus( IsFocused() ); |
112 } |
105 } |
113 |
106 |
114 if( iComponentControl) |
107 if( iComponentControl) |
115 { |
108 { |
116 iComponentControl->SetFocus( IsFocused() ); |
109 iComponentControl->SetFocus( IsFocused() ); |
117 } |
110 } |
118 } |
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 } |
119 // End of File |
123 // End of File |