utilityapps/loadgen/ui/avkon/inc/loadgen_editors.h
changeset 55 2d9cac8919d3
parent 17 4f2773374eff
equal deleted inserted replaced
53:819e59dfc032 55:2d9cac8919d3
       
     1 /*
       
     2 * Copyright (c) 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef LOADGEN_EDITORS_H
       
    20 #define LOADGEN_EDITORS_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <AknForm.h> 
       
    26 
       
    27 #include "loadgen_loadattributes.h"
       
    28 
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CAknQueryValueText;
       
    32 class CAknQueryValueTextArray;
       
    33 
       
    34 // CLASS DECLARATIONS
       
    35 
       
    36 class CLoadGenLoadTypeEditorBase : public CAknForm
       
    37     {
       
    38 protected: // Constructors
       
    39     CLoadGenLoadTypeEditorBase(TBool aEditingExisting);
       
    40     void ConstructL(const TDesC& aTitleText);        
       
    41 
       
    42 protected:  // From CEikDialog
       
    43     TBool OkToExitL(TInt aButtonId);    
       
    44     void PreLayoutDynInitL();
       
    45     void HandleControlStateChangeL(TInt aControlId);
       
    46 
       
    47 protected:  // New methods
       
    48     virtual TBool DoRunQueryLD(TInt aResource);
       
    49     
       
    50 public:  // New methods
       
    51     virtual TBool RunQueryLD();
       
    52 
       
    53 protected:  // New methods
       
    54     void InsertFieldAfterL(TInt aResourceId, TInt aControlId, TInt aPrevControlId);
       
    55     void UpdateFormL();
       
    56 
       
    57 protected: // Data
       
    58     TBool iEditingExisting;
       
    59     };
       
    60 
       
    61 
       
    62 
       
    63 
       
    64 class CLoadGenCPULoadEditor : public CLoadGenLoadTypeEditorBase
       
    65     {
       
    66 public:
       
    67     static CLoadGenCPULoadEditor* NewL(TCPULoadAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
    68     virtual ~CLoadGenCPULoadEditor();
       
    69 
       
    70 private: // Constructors
       
    71     CLoadGenCPULoadEditor(TCPULoadAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
    72     void ConstructL();        
       
    73 
       
    74 protected:  // From CEikDialog
       
    75     TBool OkToExitL(TInt aButtonId);    
       
    76     void PreLayoutDynInitL();
       
    77     void HandleControlStateChangeL(TInt aControlId);
       
    78         
       
    79 public:  // New methods
       
    80     virtual TBool RunQueryLD();
       
    81 
       
    82 private:  // New methods
       
    83     void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
       
    84     void LoadCPUsL();
       
    85     
       
    86 private: // Data
       
    87     TCPULoadAttributes&         iAttributes;
       
    88     CAknQueryValueText*         iCpuQueryValText;
       
    89     CAknQueryValueTextArray*    iCpuTextArray;
       
    90     CDesCArray*                 iCPUsArray;
       
    91     };
       
    92 
       
    93 
       
    94 
       
    95 
       
    96 class CLoadGenMemoryEatEditor : public CLoadGenLoadTypeEditorBase
       
    97     {
       
    98 public:
       
    99     static CLoadGenMemoryEatEditor* NewL(TMemoryEatAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   100     virtual ~CLoadGenMemoryEatEditor();
       
   101 
       
   102 private: // Constructors
       
   103     CLoadGenMemoryEatEditor(TMemoryEatAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   104     void ConstructL();        
       
   105 
       
   106 protected:  // From CEikDialog
       
   107     TBool OkToExitL(TInt aButtonId);    
       
   108     void PreLayoutDynInitL();
       
   109     void HandleControlStateChangeL(TInt aControlId);
       
   110         
       
   111 public:  // New methods
       
   112     virtual TBool RunQueryLD();
       
   113 
       
   114 private:  // New methods
       
   115     void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
       
   116     void UpdateAvailableMemoryL();
       
   117 
       
   118 private: // Data
       
   119     TMemoryEatAttributes&              iAttributes;
       
   120     }; 
       
   121 
       
   122 
       
   123 
       
   124 class CLoadGenPhoneCallEditor : public CLoadGenLoadTypeEditorBase
       
   125     {
       
   126 public:
       
   127     static CLoadGenPhoneCallEditor* NewL(TPhoneCallAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   128     virtual ~CLoadGenPhoneCallEditor();
       
   129 
       
   130 private: // Constructors
       
   131     CLoadGenPhoneCallEditor(TPhoneCallAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   132     void ConstructL();        
       
   133 
       
   134 protected:  // From CEikDialog
       
   135     TBool OkToExitL(TInt aButtonId);    
       
   136     void PreLayoutDynInitL();
       
   137     void HandleControlStateChangeL(TInt aControlId);
       
   138         
       
   139 public:  // New methods
       
   140     virtual TBool RunQueryLD();
       
   141 
       
   142 private:  // New methods
       
   143     void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
       
   144     
       
   145 private: // Data
       
   146     TPhoneCallAttributes&              iAttributes;
       
   147     };
       
   148 
       
   149 
       
   150 
       
   151 class CLoadGenNetConnEditor : public CLoadGenLoadTypeEditorBase
       
   152     {
       
   153 public:
       
   154     static CLoadGenNetConnEditor* NewL(TNetConnAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   155     virtual ~CLoadGenNetConnEditor();
       
   156 
       
   157 private: // Constructors
       
   158     CLoadGenNetConnEditor(TNetConnAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   159     void ConstructL();        
       
   160 
       
   161 protected:  // From CEikDialog
       
   162     TBool OkToExitL(TInt aButtonId);    
       
   163     void PreLayoutDynInitL();
       
   164     void HandleControlStateChangeL(TInt aControlId);
       
   165         
       
   166 public:  // New methods
       
   167     virtual TBool RunQueryLD();
       
   168 
       
   169 private:  // New methods
       
   170     void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
       
   171     
       
   172 private: // Data
       
   173     TNetConnAttributes&              iAttributes;
       
   174     };
       
   175     
       
   176  
       
   177  
       
   178 
       
   179 class CLoadGenKeyPressEditor : public CLoadGenLoadTypeEditorBase
       
   180     {
       
   181 public:
       
   182     static CLoadGenKeyPressEditor* NewL(TKeyPressAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   183     virtual ~CLoadGenKeyPressEditor();
       
   184 
       
   185 private: // Constructors
       
   186     CLoadGenKeyPressEditor(TKeyPressAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   187     void ConstructL();        
       
   188 
       
   189 protected:  // From CEikDialog
       
   190     TBool OkToExitL(TInt aButtonId);    
       
   191     void PreLayoutDynInitL();
       
   192     void HandleControlStateChangeL(TInt aControlId);
       
   193         
       
   194 public:  // New methods
       
   195     virtual TBool RunQueryLD();
       
   196 
       
   197 private:  // New methods
       
   198     void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
       
   199     
       
   200 private: // Data
       
   201     TKeyPressAttributes&              iAttributes;
       
   202     };
       
   203 
       
   204 class CLoadGenPointerEventEditor : public CLoadGenLoadTypeEditorBase
       
   205     {
       
   206 public:
       
   207     static CLoadGenPointerEventEditor* NewL(TPointerEventAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   208     virtual ~CLoadGenPointerEventEditor();
       
   209 
       
   210 private: // Constructors
       
   211     CLoadGenPointerEventEditor(TPointerEventAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   212     void ConstructL();        
       
   213 
       
   214 protected:  // From CEikDialog
       
   215     TBool OkToExitL(TInt aButtonId);    
       
   216     void PreLayoutDynInitL();
       
   217     void HandleControlStateChangeL(TInt aControlId);
       
   218         
       
   219 public:  // New methods
       
   220     virtual TBool RunQueryLD();
       
   221 
       
   222 private:  // New methods
       
   223     void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
       
   224     
       
   225 private: // Data
       
   226     TPointerEventAttributes&              iAttributes;
       
   227     };
       
   228 
       
   229 
       
   230 
       
   231 class CLoadGenMessagesEditor : public CLoadGenLoadTypeEditorBase
       
   232     {
       
   233 public:
       
   234     static CLoadGenMessagesEditor* NewL( TMessageAttributes& aAttributes, 
       
   235                                          TBool aEditingExisting = EFalse );
       
   236     virtual ~CLoadGenMessagesEditor();
       
   237 
       
   238 private: // Constructors
       
   239     CLoadGenMessagesEditor( TMessageAttributes& aAttributes, 
       
   240                             TBool aEditingExisting = EFalse );
       
   241     void ConstructL();        
       
   242 
       
   243 protected:  // From CEikDialog
       
   244     TBool OkToExitL( TInt aButtonId );    
       
   245     void PreLayoutDynInitL();
       
   246     void HandleControlStateChangeL( TInt aControlId );
       
   247         
       
   248 public:  // New methods
       
   249     virtual TBool RunQueryLD();
       
   250 
       
   251 private:  // New methods
       
   252     void UpdateVisibilitiesOfFieldsL( TBool aFormInit = EFalse );
       
   253     
       
   254 private: // Data
       
   255     TMessageAttributes&              iAttributes;
       
   256     };
       
   257 
       
   258 class CLoadGenApplicationsEditor : public CLoadGenLoadTypeEditorBase
       
   259     {
       
   260 public:
       
   261     static CLoadGenApplicationsEditor* NewL( TApplicationsAttributes& aAttributes, 
       
   262                                          TBool aEditingExisting = EFalse );
       
   263     virtual ~CLoadGenApplicationsEditor();
       
   264 
       
   265 private: // Constructors
       
   266     CLoadGenApplicationsEditor( TApplicationsAttributes& aAttributes, 
       
   267                             TBool aEditingExisting = EFalse );
       
   268     void ConstructL();        
       
   269 
       
   270 protected:  // From CEikDialog
       
   271     TBool OkToExitL( TInt aButtonId );    
       
   272     void PreLayoutDynInitL();
       
   273     void HandleControlStateChangeL( TInt aControlId );
       
   274         
       
   275 public:  // New methods
       
   276     virtual TBool RunQueryLD();
       
   277 
       
   278 private:  // New methods
       
   279     void UpdateVisibilitiesOfFieldsL( TBool aFormInit = EFalse );
       
   280     
       
   281 private: // Data
       
   282     TApplicationsAttributes&              iAttributes;
       
   283     };
       
   284 
       
   285 class CLoadGenPhotoCaptureEditor : public CLoadGenLoadTypeEditorBase
       
   286     {
       
   287 public:
       
   288     static CLoadGenPhotoCaptureEditor* NewL(TPhotoCaptureAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   289     virtual ~CLoadGenPhotoCaptureEditor();
       
   290 
       
   291 private: // Constructors
       
   292     CLoadGenPhotoCaptureEditor(TPhotoCaptureAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   293     void ConstructL();        
       
   294 
       
   295 protected:  // From CEikDialog
       
   296     TBool OkToExitL(TInt aButtonId);    
       
   297     void PreLayoutDynInitL();
       
   298     void HandleControlStateChangeL(TInt aControlId);
       
   299         
       
   300 public:  // New methods
       
   301     virtual TBool RunQueryLD();
       
   302 
       
   303 private:  // New methods
       
   304     void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
       
   305     void LoadCamerasL();
       
   306     
       
   307 private: // Data
       
   308     TPhotoCaptureAttributes&    iAttributes;
       
   309     CAknQueryValueText*         iCameraQueryValText;
       
   310     CAknQueryValueTextArray*    iCameraTextArray;
       
   311     CDesCArray*                 iCamerasArray;
       
   312     };
       
   313 
       
   314 class CLoadGenBluetoothEditor : public CLoadGenLoadTypeEditorBase
       
   315     {
       
   316 public:
       
   317     static CLoadGenBluetoothEditor* NewL(TBluetoothAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   318     virtual ~CLoadGenBluetoothEditor();
       
   319 
       
   320 private: // Constructors
       
   321     CLoadGenBluetoothEditor(TBluetoothAttributes& aAttributes, TBool aEditingExisting=EFalse);
       
   322     void ConstructL();        
       
   323 
       
   324 protected:  // From CEikDialog
       
   325     TBool OkToExitL(TInt aButtonId);    
       
   326     void PreLayoutDynInitL();
       
   327     void HandleControlStateChangeL(TInt aControlId);
       
   328         
       
   329 public:  // New methods
       
   330     virtual TBool RunQueryLD();
       
   331 
       
   332 private:  // New methods
       
   333     void UpdateVisibilitiesOfFieldsL(TBool aFormInit=EFalse);
       
   334     
       
   335 private: // Data
       
   336     TBluetoothAttributes&              iAttributes;
       
   337     };
       
   338 
       
   339 #endif