perfmon/ui/avkon/inc/perfmon_model.h
branchRCL_3
changeset 21 b3cee849fa46
equal deleted inserted replaced
20:48060abbbeaf 21:b3cee849fa46
       
     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 #ifndef PERFMON_MODEL_H
       
    20 #define PERFMON_MODEL_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <apgcli.h>
       
    26 #include <gdi.h>
       
    27 
       
    28 #include "perfmon_engine.h"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CPerfMonValuesContainer;
       
    32 class CPerfMonGraphsContainer;
       
    33 class CPerfMonDataPopupContainer;
       
    34 
       
    35 class CPerfMonModel : public CPerfMonEngine
       
    36 	{
       
    37 private:
       
    38     enum TContainerDrawState
       
    39     	{
       
    40     	EDrawStateInvalid = -1,
       
    41     	EDrawStateValues,
       
    42     	EDrawStateGraphs
       
    43     	};
       
    44 
       
    45 public:
       
    46 	static CPerfMonModel* NewL();
       
    47 	void ActivateModelL();
       
    48 	void DeActivateModelL();
       
    49 
       
    50 private:
       
    51 	void ConstructL();
       
    52 	void SendDrawEventToContainersL();
       
    53 	void HandleSettingsChangeL();
       
    54     
       
    55 public:
       
    56     void SetValuesContainer(CPerfMonValuesContainer* aValuesContainer);
       
    57     void SetGraphsContainer(CPerfMonGraphsContainer* aGraphsContainer);
       
    58     TInt LaunchSettingsDialogL();
       
    59 
       
    60     inline CPerfMonValuesContainer*     ValuesContainer()       { return iValuesContainer; }
       
    61     inline CPerfMonGraphsContainer*     GraphsContainer()       { return iGraphsContainer; }
       
    62     inline CPerfMonDataPopupContainer*  DataPopupContainer()    { return iDataPopupContainer; } 
       
    63 
       
    64 private:
       
    65     CPerfMonValuesContainer*        iValuesContainer;
       
    66     CPerfMonGraphsContainer*        iGraphsContainer;
       
    67     CPerfMonDataPopupContainer*     iDataPopupContainer;
       
    68     TInt                            iDrawState;
       
    69     };
       
    70  
       
    71 
       
    72 #endif