mediasettings/mediasettingsapp/src/MPSettingsStreamingContainer.cpp
branchRCL_3
changeset 8 ce5ada96ab30
parent 1 6711b85517b7
equal deleted inserted replaced
6:7d91903f795f 8:ce5ada96ab30
    13 *
    13 *
    14 * Description:   Container class for Streaming settings list view.*
    14 * Description:   Container class for Streaming settings list view.*
    15 */
    15 */
    16 
    16 
    17 
    17 
    18 // Version : %version: 7 %
    18 // Version : %version: 8 %
    19 
    19 
    20 
    20 
    21 
    21 
    22 // INCLUDE FILES
    22 // INCLUDE FILES
    23 #include    <aknlists.h>
    23 #include    <aknlists.h>
    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