cbs/cbsui/UiInc/CCbsUiSettingsView.h
branchRCL_3
changeset 20 987c9837762f
parent 0 ff3b6d0fd310
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
       
     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 "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:  Header file for the CCbsSettingsView class.
       
    15 *
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CBSSETTINGSVIEW_H
       
    21 #define __CBSSETTINGSVIEW_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <aknsettingpage.h>  // MAknSettingPageObserver
       
    25 #include <CbsCommon.h>
       
    26 #include <aknview.h>
       
    27 #include "MCbsUiSettingsObserver.h"
       
    28 
       
    29 
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CCbsUiSettingsViewContainer;
       
    33 class CLanguageViewContainer;
       
    34 class CAknSettingPage;
       
    35 class MCbs;
       
    36 class CCbsUiLanguageSettingPage;
       
    37 class CAknNavigationDecorator;
       
    38 class CCbsUiSettingsMonitor;
       
    39 
       
    40 
       
    41 // CLASS DECLARATION
       
    42 
       
    43 /**
       
    44 *  This class is used from messenge center. 
       
    45 *  With settings view cbs-settings 
       
    46 */
       
    47 class CCbsUiSettingsView : public CAknView, 
       
    48                            public MCbsUiSettingsObserver
       
    49 	{
       
    50     public: // Constructors and destructor
       
    51 
       
    52         /**
       
    53         * C++ constructor.
       
    54         *
       
    55         * @param aServer cbs server
       
    56         */
       
    57         CCbsUiSettingsView( MCbs& aServer );    
       
    58 
       
    59         /**
       
    60         * Two-phased constructor.
       
    61         *
       
    62         * @param aServer cbs server
       
    63         */
       
    64         static CCbsUiSettingsView* NewL( MCbs& aServer );
       
    65 
       
    66         /**
       
    67         * Destructor.
       
    68         */
       
    69         ~CCbsUiSettingsView();
       
    70 
       
    71     public: // From CAknView
       
    72 
       
    73         /**
       
    74         * Returns the ID of this view.
       
    75         * 
       
    76         * @return ID
       
    77         */
       
    78         TUid Id() const;
       
    79 
       
    80         /**
       
    81         * Handles commands from options menu
       
    82         *
       
    83         * @param aCommand Command user has selected from options menu
       
    84         */
       
    85         void HandleCommandL( TInt aCommand );
       
    86         
       
    87         /**
       
    88         * WindowServer calls when the wiev is activated
       
    89         *
       
    90         * @param aPrevViewId Previous view id.
       
    91         * @param aCustomMessageId message id
       
    92         * @param aCustomMessage message content
       
    93         */
       
    94 	    void DoActivateL( const TVwsViewId& aPrevViewId, 
       
    95                           TUid aCustomMessageId, 
       
    96                           const TDesC8& aCustomMessage );
       
    97 
       
    98         /**
       
    99         * WindowServer calls when the wiev is deactivated
       
   100         */
       
   101         void DoDeactivate();
       
   102 
       
   103     public: // New functions
       
   104 
       
   105         /**
       
   106         * Called when navigation pane needs be updated
       
   107         */
       
   108         void UpdateNaviPaneL();
       
   109 
       
   110         /**
       
   111         * If there has come any changes to settings, then 
       
   112         * this function will be called.
       
   113         */ 
       
   114         void UpdateSettingsL();     
       
   115 
       
   116         /**
       
   117         * Sets the context pane icon. State can reception on or
       
   118         * off.
       
   119         */
       
   120         void UpdateContextPaneL();
       
   121 
       
   122         /**
       
   123         * Sets title pane text. 
       
   124         */        
       
   125         void UpdateTitlePaneL() const;
       
   126 
       
   127     public: // From MCbsUiSettingsObserver
       
   128 
       
   129         /**
       
   130         * Settings monitor calls this function when settings has been
       
   131         * changed.
       
   132         *
       
   133         * @param aEvent What kind of event caused the settings change
       
   134         */        
       
   135         void SettingsChangedL( TCbsSettingsEvent aEvent );
       
   136 
       
   137         /**
       
   138         * Handle changes in container when rect changes.
       
   139         */
       
   140         void HandleRectChangeInContainer();
       
   141 
       
   142 	private: // MEikMenuObserver 
       
   143 
       
   144         /**
       
   145         * Delete help menu item if help is not in use
       
   146         *
       
   147         * @param aResourceId resource id of the menu
       
   148         * @param aMenuPane used to modify menu dynamically
       
   149         */
       
   150         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); 
       
   151 
       
   152     private: // New functions
       
   153 
       
   154         /**
       
   155         * Activates topic list view.
       
   156         */
       
   157         void ActivateTopicListViewL() const;
       
   158 
       
   159     private:
       
   160 
       
   161         /**
       
   162         * By default Symbian OS constructor is private.
       
   163         */
       
   164         void ConstructL();
       
   165 
       
   166     private: // Data
       
   167         
       
   168         // Pointer to the container class        
       
   169         CCbsUiSettingsViewContainer* iContainer;
       
   170 
       
   171         // NaviPane        
       
   172         CAknNavigationDecorator* iDecoratedLabel;
       
   173 
       
   174         // Reference to the server session. It's owned by uiappappui        
       
   175         MCbs& iServer;
       
   176 
       
   177         // Previous application and view which has louch this view
       
   178         TVwsViewId iPrevViewId;
       
   179 
       
   180         // True if launched from the other application.
       
   181         TBool iFromOtherApplication;
       
   182 
       
   183         // Own: Where the images are located.
       
   184         HBufC* iImageLibrary;
       
   185 
       
   186         // Settings Monitor
       
   187         CCbsUiSettingsMonitor* iSettingsMonitor;
       
   188 
       
   189 	};
       
   190 
       
   191 #endif // __CBSSETTINGSVIEW_H
       
   192 
       
   193 
       
   194 // End of file