mediasettings/mediasettingsapp/inc/MPSettingsAppUi.h
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:   Declares UI class for application.*
       
    15 */
       
    16 
       
    17 
       
    18 // Version : %version: 3 %
       
    19 
       
    20 
       
    21 
       
    22 #ifndef MPSETTINGSAPPUI_H
       
    23 #define MPSETTINGSAPPUI_H
       
    24 
       
    25 // INCLUDES
       
    26 #include    <eikapp.h>
       
    27 #include    <eikdoc.h>
       
    28 #include    <e32std.h>
       
    29 #include    <coeccntx.h>
       
    30 #include    <aknViewAppUi.h>
       
    31 #include    <akntabgrp.h>
       
    32 #include    <aknnavide.h>
       
    33 #include    <AknTabObserver.h>
       
    34 
       
    35 
       
    36 #include    "MPSettingsNaviPaneController.h"
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 class CAknNavigationDecorator;
       
    40 class CMPSettingsMainView;
       
    41 
       
    42 // CLASS DECLARATION
       
    43 class CMPSettingsModel;
       
    44 class CMPMediaPlayerSettings;
       
    45 class CMPSettingsModelForROP;
       
    46 
       
    47 /**
       
    48 * Application UI class.
       
    49 * Provides support for the following features:
       
    50 * - EIKON control architecture
       
    51 * - view architecture
       
    52 * - status pane
       
    53 * 
       
    54 *  @lib MediaSettings.app
       
    55 *  @since 2.0
       
    56 */
       
    57 class CMPSettingsAppUi : public CAknViewAppUi,
       
    58                          public MAknTabObserver,
       
    59                          public MMPSettingsNaviPaneController
       
    60     {
       
    61     public: // // Constructors and destructor
       
    62 
       
    63         /*
       
    64         * C++ constructor.
       
    65         */
       
    66         CMPSettingsAppUi();
       
    67 
       
    68         /**
       
    69         * Symbian OS 2nd phase constructor.
       
    70         */      
       
    71         void ConstructL();
       
    72 
       
    73         /**
       
    74         * Destructor.
       
    75         */      
       
    76         virtual ~CMPSettingsAppUi();
       
    77         
       
    78     public: // Functions from base classes
       
    79 
       
    80         /**
       
    81         * From CEikAppUi, takes care of command handling.
       
    82         * @param aCommand command to be handled
       
    83         */
       
    84         void HandleCommandL(TInt aCommand);
       
    85 
       
    86         /**
       
    87         * From CEikAppUi, takes care of resource handling.
       
    88         * @param aType resource to be handled
       
    89         */
       
    90         void HandleResourceChangeL( TInt aType );
       
    91 
       
    92         /**
       
    93         * From MAknTabObserver, takes care of tab handling.
       
    94         * @param aIndex tab to be handled
       
    95         */
       
    96         void TabChangedL(TInt aIndex); 
       
    97 
       
    98         /**
       
    99         * From MMPSettingsNaviPaneController, returns pointer
       
   100         * to MP's Navi pane object.
       
   101         * @return CAknNavigationControlContainer.
       
   102         */
       
   103         CAknNavigationControlContainer* NaviContainer() const;
       
   104     
       
   105         /**
       
   106         * From MMPSettingsNaviPaneController, returns pointer
       
   107         * to MP's tab group object.
       
   108         * @return CAknNavigationDecorator.
       
   109         */
       
   110         CAknNavigationDecorator* MPTabGroup() const;
       
   111 
       
   112         /**
       
   113         * From MMPSettingsNaviPaneController, updates tab group
       
   114         * according to active view.
       
   115         */
       
   116         void UpdateTabIndex();
       
   117 
       
   118 
       
   119     private:
       
   120 
       
   121         /**
       
   122         * From MEikMenuObserver, dynamically initialises menu pane.
       
   123         * @param aResourceId Resource ID identifying the menu pane
       
   124         *   to initialise.
       
   125         * @param aMenuPane Pointer to the menu pane.
       
   126         */
       
   127         void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
   128 
       
   129             /**
       
   130         * From CEikAppUi, handles key events.
       
   131         * @param aKeyEvent Event to handled.
       
   132         * @param aType Type of the key event. 
       
   133         * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
       
   134         */
       
   135         TKeyResponse HandleKeyEventL(
       
   136             const TKeyEvent& aKeyEvent,TEventCode aType);
       
   137 
       
   138     private: // new functions
       
   139 
       
   140         /**
       
   141         * Create tab to tabgroup with possibly skinned icon (with mask)
       
   142         * @param aID       Skin ID for the icon
       
   143         * @param aMbmFile  Full path to MBM file which contains the default icon
       
   144         * @param aBitmapId Id for the default icon in the MBM file
       
   145         * @param aMaskId   Id for the default icon mask in the MBM file
       
   146         * @param aTabId    Id for tab
       
   147         */
       
   148         void AddTabSettingsL(
       
   149             const TAknsItemID& aID,
       
   150             const TDesC& aMbmFile,
       
   151             TInt aBitmapId,
       
   152             TInt aMaskId,
       
   153             TInt aTabId );
       
   154 
       
   155         /**
       
   156         * Create navigation pane tabgroup 
       
   157         */
       
   158         void AddTabSettingsGroupL();
       
   159 
       
   160     private: //Data
       
   161         CAknNavigationControlContainer* iNaviPane;
       
   162         CAknTabGroup*                   iTabGroup; 
       
   163         CAknNavigationDecorator*        iDecoratedTabGroup; // owned
       
   164 
       
   165         CArrayFix<TUid>*                iViewIds;
       
   166         CMPSettingsMainView*            iMainView;
       
   167         RImplInfoPtrArray               iImplInfoArray;
       
   168 
       
   169         CMPSettingsModel* iModel;
       
   170         CMPSettingsModelForROP* iRopModel;
       
   171         
       
   172 		TBool	iConstructAsGsPlugin;
       
   173     };
       
   174 
       
   175 #endif
       
   176 
       
   177 // End of File