mediasettings/mediasettingsapp/src/MPSettingsAdvancedBwView.cpp
changeset 0 96612d01cf9f
child 1 6711b85517b7
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     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: 4 %
       
    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(CMPSettingsModelForROP* aModel, TBool iConstructAsGsPlugin) 
       
    45     : iModel( aModel), iGsPlugin(iConstructAsGsPlugin)
       
    46     {
       
    47     MPX_FUNC("#MS# CMPSettingsAdvancedBwView::CMPSettingsAdvancedBwView()");
       
    48     }
       
    49 
       
    50 // ---------------------------------------------------------
       
    51 // CMPSettingsAdvancedBwView::ConstructL
       
    52 // Symbian OS two-phased constructor
       
    53 // ---------------------------------------------------------
       
    54 //
       
    55 void CMPSettingsAdvancedBwView::ConstructL()
       
    56     {
       
    57     MPX_FUNC("#MS# CMPSettingsAdvancedBwView::ConstructL()");
       
    58     BaseConstructL(R_MPSETT_ADVANCED_BW_VIEW);
       
    59     }
       
    60 
       
    61 // -----------------------------------------------------------------------------
       
    62 // CMPSettingsAdvancedBwView::NewLC
       
    63 // Two-phased constructor.
       
    64 // -----------------------------------------------------------------------------
       
    65 //
       
    66 CMPSettingsAdvancedBwView* CMPSettingsAdvancedBwView::NewLC(CMPSettingsModelForROP* aModel, TBool iConstructAsGsPlugin)
       
    67     {
       
    68     MPX_DEBUG2(_L("#MS# CMPSettingsAdvancedBwView::NewLC(%d)"),iConstructAsGsPlugin);
       
    69     CMPSettingsAdvancedBwView* self = new(ELeave) CMPSettingsAdvancedBwView(aModel,iConstructAsGsPlugin);
       
    70     
       
    71     CleanupStack::PushL(self);
       
    72     self->ConstructL();
       
    73 
       
    74     return self;
       
    75     }
       
    76 
       
    77 // ---------------------------------------------------------
       
    78 // CMPSettingsAdvancedBwView::~CMPSettingsAdvancedBwView()
       
    79 // Destructor
       
    80 // ---------------------------------------------------------
       
    81 //
       
    82 CMPSettingsAdvancedBwView::~CMPSettingsAdvancedBwView()
       
    83     {
       
    84     MPX_FUNC("#MS# CMPSettingsAdvancedBwView::~CMPSettingsAdvancedBwView()");
       
    85     }
       
    86 
       
    87 // ---------------------------------------------------------
       
    88 // TUid CMPSettingsAdvancedBwView::Id
       
    89 // ---------------------------------------------------------
       
    90 //
       
    91 TUid CMPSettingsAdvancedBwView::Id() const
       
    92     {
       
    93     MPX_FUNC("#MS# CMPSettingsAdvancedBwView::Id()");
       
    94     return KMPSettAdvancedBwViewId;
       
    95     }
       
    96 
       
    97 // ---------------------------------------------------------
       
    98 // CMPSettingsAdvancedBwView::HandleCommandL
       
    99 // ---------------------------------------------------------
       
   100 //
       
   101 void CMPSettingsAdvancedBwView::HandleCommandL(TInt aCommand)
       
   102     {   
       
   103     MPX_DEBUG2(_L("#MS# CMPSettingsAdvancedBwView::HandleCommandL(%d)"),aCommand);
       
   104     switch (aCommand)
       
   105         {
       
   106         case EMPSettCmdChange:
       
   107             static_cast<CMPSettingsAdvancedBwContainer*>(iContainer)->EditCurrentItemFromMenuL();
       
   108             break;
       
   109         case EAknSoftkeyBack:
       
   110             AppUi()->ActivateLocalViewL(KMPSettNetworkViewId);
       
   111             break;
       
   112         case EMPSettCmdHelp:
       
   113             if( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
       
   114             {
       
   115                 HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), AppUi()->AppHelpContextL() );
       
   116             }
       
   117             break;
       
   118         default:
       
   119             AppUi()->HandleCommandL(aCommand);
       
   120             break;
       
   121         }
       
   122     }
       
   123 
       
   124 // ---------------------------------------------------------------------------
       
   125 // CMPSettingsAdvancedBwView::NewContainerL
       
   126 // ---------------------------------------------------------------------------
       
   127 //
       
   128 CMPSettingsBaseContainer* CMPSettingsAdvancedBwView::NewContainerL()
       
   129     {
       
   130     MPX_FUNC("#MS# CMPSettingsAdvancedBwView::NewContainerL()");
       
   131     return new(ELeave) CMPSettingsAdvancedBwContainer(iModel);
       
   132     }  
       
   133 
       
   134 // ---------------------------------------------------------------------------
       
   135 // CMPSettingsAdvancedBwView::SetNaviPaneL
       
   136 // Sets Navipane texts.
       
   137 // ---------------------------------------------------------------------------
       
   138 //
       
   139 void CMPSettingsAdvancedBwView::SetNaviPaneL()
       
   140     {
       
   141     MPX_FUNC("#MS# CMPSettingsAdvancedBwView::SetNaviPaneL()");
       
   142         if (!iGsPlugin)
       
   143         {
       
   144             iNaviPaneContext = NULL;
       
   145             CMPSettingsBaseView::SetNaviPaneL();
       
   146         }
       
   147     CMPSettingsBaseView::SetMiddleSoftKeyLabelL(R_MEDIASETTING_MSK_CHANGE,EMPSettCmdChange);
       
   148     }
       
   149 // End of File
       
   150