commsconfig/cscsettingsui/inc/cscsettingsuimainview.h
branchRCL_3
changeset 22 d38647835c2e
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2007-2010 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:  Declatirion of CSCSettingsUiMainView
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CSCSETTINGSUIMAINVIEW_H
       
    20 #define C_CSCSETTINGSUIMAINVIEW_H
       
    21 
       
    22 class CCSCSettingsUiModel;
       
    23 class CAknRadioButtonSettingPage;
       
    24 
       
    25 class CAknNavigationControlContainer;
       
    26 class CAknNavigationDecorator;
       
    27 #include "cscsettingsuimaincontainer.h"
       
    28 
       
    29 /**
       
    30  *  CCSCSettingsUiMainView class
       
    31  *  Declarition of CCSCSettingsUiMainView.
       
    32  *
       
    33  *  @lib CSCSettingsUi.lib
       
    34  *  @since S60 v3.2
       
    35  */
       
    36 NONSHARABLE_CLASS( CCSCSettingsUiMainView ) : public CAknView,
       
    37                                               public MEikListBoxObserver
       
    38     {
       
    39 public: 
       
    40 
       
    41     /**
       
    42      * Two-phased constructor.
       
    43      *
       
    44      * @param aModel for reference to the model
       
    45      */
       
    46     static CCSCSettingsUiMainView* NewL( 
       
    47         CCSCSettingsUiModel& aModel );
       
    48 
       
    49     /**
       
    50      * Two-phased constructor.
       
    51      *
       
    52      * @param aModel for reference to the model
       
    53      */
       
    54     static CCSCSettingsUiMainView* NewLC( 
       
    55         CCSCSettingsUiModel& aModel );
       
    56 
       
    57     /**
       
    58      * Destructor.
       
    59      */
       
    60     virtual ~CCSCSettingsUiMainView();
       
    61 
       
    62     /**
       
    63      * Processes situation when softkeys need to be changed.
       
    64      *
       
    65      * @since S60 v3.2
       
    66      */
       
    67     void UpdateSoftkeysL();
       
    68 
       
    69     /**
       
    70      * Resets service settings when switching services.
       
    71      * 
       
    72      * @since S60 v5.2
       
    73      */
       
    74     void ResetViewL();
       
    75 
       
    76 // from base class CAknView
       
    77 
       
    78     /**
       
    79      * From CAknView.
       
    80      */
       
    81     TUid Id() const;
       
    82 
       
    83 private:
       
    84 
       
    85     CCSCSettingsUiMainView(
       
    86         CCSCSettingsUiModel& aModel );
       
    87     void ConstructL();
       
    88 
       
    89     /**
       
    90      * Changes given service name to title pane.
       
    91      *
       
    92      * @since S60 v3.2
       
    93      */   
       
    94     void SetTitleTextL();
       
    95 
       
    96     /**
       
    97      * For checking if editing of preferred service setting is allowed
       
    98      *
       
    99      * @since S60 v3.2
       
   100      * @return ETrue if editing allowed
       
   101      */
       
   102     TBool IsEditPreferredServiceSettingAllowedL();
       
   103 
       
   104     /**
       
   105      * Shows preferred service setting page.
       
   106      *
       
   107      * @since S60 v5.0
       
   108      */ 
       
   109     void ShowUsernameSettingPageL();
       
   110 
       
   111     /**
       
   112      * Shows preferred service setting page.
       
   113      *
       
   114      * @since S60 v3.2
       
   115      */ 
       
   116     void ShowPasswordSettingPageL();        
       
   117 
       
   118     /**
       
   119      * Shows preferred service setting page.
       
   120      *
       
   121      * @since S60 v3.2
       
   122      */ 
       
   123     void ShowPrefServiceSettingPageL();
       
   124 
       
   125     /**
       
   126      * Shows preferred service setting page when VCC is supported.
       
   127      *
       
   128      * @since S60 v5.0
       
   129      */ 
       
   130     void ShowVccPrefServiceSettingPageL();
       
   131 
       
   132     /**
       
   133      * Shows IM tone selection list.
       
   134      *
       
   135      * @since S60 v5.0
       
   136      */ 
       
   137     void ShowImToneSelectionListL();
       
   138 
       
   139     /**
       
   140      * Handles 'change' middle softkey selection.
       
   141      * 
       
   142      * @param aListBoxItem listbox item
       
   143      * @since S60 v5.0
       
   144      */ 
       
   145     void HandleMskChangeSelectionL( TMainListBoxItem aListBoxItem );
       
   146 
       
   147     /**
       
   148      * Changes preferred telephony setting value.
       
   149      * From VoIP(PS) to CS or vice versa.
       
   150      * @since S60 v3.2
       
   151      */ 
       
   152     void ChangePrefTelephonyValueL();
       
   153 
       
   154     /**
       
   155      * Changes handover notify tone value (on/off).
       
   156      * @since S60 v5.0
       
   157      */ 
       
   158     void ChangeHandoverNotifToneValueL();
       
   159 
       
   160     /**
       
   161      * Appends resource texts to the des array.
       
   162      *
       
   163      * @since S60 v3.2
       
   164      * @param aList Text array.
       
   165      * @param aItem Text resource id.
       
   166      */ 
       
   167     void AppendItemL(CDesCArrayFlat& aList, TInt aItem);
       
   168 
       
   169     /**
       
   170      * Launches Connection Method Settings Ui for editing destinations.
       
   171      *
       
   172      * @since S60 v5.0
       
   173      */   
       
   174     void LaunchCMSettingsUiL();
       
   175 
       
   176     /**
       
   177      * Handles returning to previous view where settingsui was launced.
       
   178      *
       
   179      * @since S60 v5.0
       
   180      */
       
   181     void HandleReturnToPreviousViewL( TBool aViewBack = ETrue );
       
   182 
       
   183     /**
       
   184      * Handles exist from settingsui.
       
   185      *
       
   186      * @since S60 v5.0
       
   187      */
       
   188     void HandleSettingsUiExitL();
       
   189 
       
   190 // from base class CEikAppUi
       
   191 
       
   192     /**
       
   193      * From CEikAppUi.
       
   194      */
       
   195     void HandleCommandL( TInt aCommand );
       
   196 
       
   197 // from base class CAknView
       
   198 
       
   199     /**
       
   200      * From CAknView.
       
   201      */
       
   202     void DoActivateL( 
       
   203         const TVwsViewId& aPrevViewId, 
       
   204         TUid aCustomMessageId, 
       
   205         const TDesC8& aCustomMessage );
       
   206 
       
   207     /**
       
   208      * From CAknView.
       
   209      */
       
   210     void DoDeactivate();
       
   211 
       
   212 // from base class MEikListBoxObserver
       
   213 
       
   214     /**
       
   215      * From MEikListBoxObserver.
       
   216      */
       
   217     void HandleListBoxEventL( 
       
   218         CEikListBox* aListBox, 
       
   219         TListBoxEvent aEventType );
       
   220 
       
   221     /**
       
   222      * From MEikListBoxObserver.
       
   223      */
       
   224     void HandleListBoxSelectionL();
       
   225 
       
   226     /**
       
   227      * From MEikListBoxObserver.
       
   228      */
       
   229     void DynInitMenuPaneL(
       
   230         TInt aResourceId, 
       
   231         CEikMenuPane* aMenuPane );
       
   232 
       
   233 private: // data  
       
   234 
       
   235     /**
       
   236      * Handle to model class for settings handling.
       
   237      */
       
   238     CCSCSettingsUiModel& iModel;
       
   239 
       
   240     /**
       
   241      * Handle to title pane.
       
   242      * Not own.
       
   243      */
       
   244     CAknTitlePane* iTitlePane;
       
   245 
       
   246     /**
       
   247      * Container class for main view.
       
   248      * Own.
       
   249      */
       
   250     CCSCSettingsUiMainContainer* iContainer;
       
   251 
       
   252     /**
       
   253      * Navigation pane.
       
   254      * Not own.
       
   255      */
       
   256     CAknNavigationControlContainer* iNaviPane;
       
   257 
       
   258     /**
       
   259      * Navigation decorator.
       
   260      * Own.
       
   261      */
       
   262     CAknNavigationDecorator* iNaviDecorator;
       
   263 
       
   264     /**
       
   265      * Flag for telling if IM tone selection list is open.
       
   266      */
       
   267     TBool iImToneSelectionListOpen;
       
   268 
       
   269     /**
       
   270      * Flag for telling if service is deleted.
       
   271      */
       
   272     TBool iDeleted;
       
   273 
       
   274     /**
       
   275      * Flag for telling if SNAP list is open.
       
   276      */
       
   277     TBool iSnapListOpen;
       
   278 
       
   279 #ifdef _DEBUG
       
   280     friend class UT_cscsettingsui;
       
   281 #endif
       
   282 
       
   283     };
       
   284 
       
   285 #endif  // C_CSCSETTINGSUIMAINVIEW_H
       
   286