perfapps/piprofilerui/ui/avkon/inc/profiler_gui_samplersettingsviewdlg.h
changeset 51 b048e15729d6
parent 26 41ebde60981f
equal deleted inserted replaced
44:5db69f4c3d06 51:b048e15729d6
       
     1 /*
       
     2 * Copyright (c) 2009 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:   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef PROFILER_GUI_SAMPLERSETTINGSVIEWDLG_H
       
    21 #define PROFILER_GUI_SAMPLERSETTINGSVIEWDLG_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <AknDialog.h>
       
    25 #include <eiklbo.h>
       
    26 #include <AknTabObserver.h> 
       
    27 #include <akntabgrp.h>
       
    28 #include <aknsettingitemlist.h> 
       
    29 #include <akncheckboxsettingpage.h> 
       
    30 
       
    31 #include "profiler_gui_model.h"
       
    32 
       
    33 
       
    34 //  FORWARD DECLARATIONS
       
    35 class CAknSettingItemArray;
       
    36 class CAknSettingStyleListBox;
       
    37 class CAknNavigationControlContainer;
       
    38 class CAknNavigationDecorator;
       
    39 class CAknTabGroup; 
       
    40 class TProfilerSamplerSettings;
       
    41 
       
    42 // CONSTANTS
       
    43 const TUint KMaxItemCount = 7;
       
    44 const TInt KMaxSettingUITextLength = 64;
       
    45 
       
    46 //  CLASS DEFINITIONS
       
    47 
       
    48 class CProfilerSamplerSettingsViewDlg : public CAknDialog, public MEikListBoxObserver, public MAknTabObserver
       
    49     {
       
    50 public:
       
    51     static CProfilerSamplerSettingsViewDlg* NewL(TSamplerAttributes& aSettings);
       
    52     virtual ~CProfilerSamplerSettingsViewDlg();
       
    53 
       
    54 public: // From MEikListBoxObserver
       
    55     void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
       
    56 
       
    57 public: // From MAknTabObserver
       
    58     void TabChangedL(TInt aIndex); 
       
    59 
       
    60 public: // From CAknDialog
       
    61     void ProcessCommandL(TInt aCommandId);
       
    62 
       
    63 protected: // From CEikDialog
       
    64     TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
       
    65     void PreLayoutDynInitL();
       
    66     TBool OkToExitL(TInt aButtonId);    
       
    67 
       
    68 private: // New methods
       
    69     void ShowSettingPageL(TBool aCalledFromMenu);
       
    70     void SetVisibilitiesOfSettingItemsL();
       
    71     void UpdateListBoxL();
       
    72     void AddSettingItemL(TInt aId, TInt aTitleResource, TInt aSettingPageResource, TInt aAssociatedResource, TInt aOrdinal);
       
    73 
       
    74 private: // Constructors
       
    75     CProfilerSamplerSettingsViewDlg(TSamplerAttributes& aSettings);
       
    76     void ConstructL();        
       
    77     CAknSettingItem* GetSettingItemL(TSettingItem& aItem, TInt aIndex, TInt& aSettingPageResource);
       
    78 private: // Data
       
    79     CAknSettingItemArray*               iSettingItemArray;
       
    80     CAknSettingStyleListBox*            iListBox;
       
    81     CAknNavigationControlContainer*     iNaviContainer;
       
    82     TSamplerAttributes&                 iSettings;
       
    83     TInt 								iItemCount;
       
    84     
       
    85     // item bufs for textual settings data 
       
    86     TInt                                iItemBuf[KMaxItemCount];
       
    87     };
       
    88 
       
    89 #endif
       
    90 
       
    91 // End of File
       
    92