sysanadatacapture/piprofiler/piprofilerui/gui/inc/profiler_gui_samplersettingsviewdlg.h
author Matti Laitinen <matti.t.laitinen@nokia.com>
Thu, 11 Feb 2010 15:52:57 +0200
changeset 1 3ff3fecb12fe
permissions -rw-r--r--
Add initial version of PI Profiler under EPL
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     1
/*
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     8
*
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    11
*
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    12
* Contributors:
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    13
*
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    14
* Description:   
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    15
*
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    16
*/
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    17
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    18
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    19
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    20
#ifndef PROFILER_GUI_SAMPLERSETTINGSVIEWDLG_H
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    21
#define PROFILER_GUI_SAMPLERSETTINGSVIEWDLG_H
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    22
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    23
//  INCLUDES
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    24
#include <akndialog.h>
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    25
#include <eiklbo.h>
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    26
#include <akntabobserver.h> 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    27
#include <akntabgrp.h>
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    28
#include <aknsettingitemlist.h> 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    29
#include <akncheckboxsettingpage.h> 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    30
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    31
#include "profiler_gui_model.h"
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    32
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    33
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    34
//  FORWARD DECLARATIONS
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    35
class CAknSettingItemArray;
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    36
class CAknSettingStyleListBox;
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    37
class CAknNavigationControlContainer;
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    38
class CAknNavigationDecorator;
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    39
class CAknTabGroup; 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    40
class TProfilerSamplerSettings;
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    41
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    42
// CONSTANTS
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    43
const TUint KMaxItemCount = 7;
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    44
const TInt KMaxSettingUITextLength = 64;
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    45
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    46
//  CLASS DEFINITIONS
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    47
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    48
class CProfilerSamplerSettingsViewDlg : public CAknDialog, public MEikListBoxObserver, public MAknTabObserver
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    49
    {
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    50
public:
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    51
    static CProfilerSamplerSettingsViewDlg* NewL(TSamplerAttributes& aSettings);
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    52
    virtual ~CProfilerSamplerSettingsViewDlg();
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    53
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    54
public: // From MEikListBoxObserver
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    55
    void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    56
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    57
public: // From MAknTabObserver
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    58
    void TabChangedL(TInt aIndex); 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    59
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    60
public: // From CAknDialog
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    61
    void ProcessCommandL(TInt aCommandId);
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    62
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    63
protected: // From CEikDialog
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    64
    TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    65
    void PreLayoutDynInitL();
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    66
    TBool OkToExitL(TInt aButtonId);    
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    67
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    68
private: // New methods
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    69
    void ShowSettingPageL(TBool aCalledFromMenu);
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    70
    void SetVisibilitiesOfSettingItemsL();
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    71
    void UpdateListBoxL();
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    72
    void AddSettingItemL(TInt aId, TInt aTitleResource, TInt aSettingPageResource, TInt aAssociatedResource, TInt aOrdinal);
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    73
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    74
private: // Constructors
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    75
    CProfilerSamplerSettingsViewDlg(TSamplerAttributes& aSettings);
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    76
    void ConstructL();        
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    77
    CAknSettingItem* GetSettingItemL(TSettingItem& aItem, TInt aIndex, TInt& aSettingPageResource);
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    78
private: // Data
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    79
    CAknSettingItemArray*               iSettingItemArray;
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    80
    CAknSettingStyleListBox*            iListBox;
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    81
    CAknNavigationControlContainer*     iNaviContainer;
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    82
    TSamplerAttributes&                 iSettings;
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    83
    TInt 								iItemCount;
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    84
    
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    85
    // item bufs for textual settings data 
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    86
    TInt                                iItemBuf[KMaxItemCount];
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    87
    };
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    88
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    89
#endif
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    90
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    91
// End of File
3ff3fecb12fe Add initial version of PI Profiler under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff changeset
    92