systemsettings/gssensorplugin/inc/gssensensorscontainer.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Sensors activation status view container
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef GSSENSENSORSCONTAINER_H
       
    21 #define GSSENSENSORSCONTAINER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <msvstd.h>
       
    25 #include <gsbasecontainer.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CGSListBoxItemTextArray;
       
    29 class CGSSensorPluginModel;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  *  CGSSenSensorsContainer container class
       
    35  *
       
    36  *  container class for Sensors activation status view
       
    37  *
       
    38  *  @lib gssensorplugin.lib
       
    39  *  @since S60 5.0
       
    40  */
       
    41 class CGSSenSensorsContainer : public CGSBaseContainer
       
    42     {
       
    43     public:
       
    44         
       
    45         /**
       
    46          * Symbian OS default constructor.
       
    47          */
       
    48         void ConstructL( const TRect& aRect );
       
    49 
       
    50         /**
       
    51          * Destructor.
       
    52          */
       
    53         virtual ~CGSSenSensorsContainer();
       
    54 
       
    55         /**
       
    56          * Default constructor
       
    57          */
       
    58         CGSSenSensorsContainer( CGSSensorPluginModel* aModel );
       
    59         
       
    60         /**
       
    61          * Updates the listbox items
       
    62          *
       
    63          * @param aFeatureId selected listbox item ID
       
    64          */
       
    65         void UpdateListBoxL( TInt aFeatureId );
       
    66 
       
    67         /**
       
    68          * Retrieves the currently selected listbox feature id
       
    69          *
       
    70          * @return TInt Feature id.
       
    71          */
       
    72         TInt CurrentFeatureId() const;
       
    73 
       
    74     protected:
       
    75 
       
    76         /**
       
    77          * Constructs listbox and initializes its sub-folders
       
    78          *
       
    79          * @param aResLbxId resource ID of the listbox item array
       
    80          */
       
    81         void ConstructListBoxL( TInt aResLbxId );
       
    82 
       
    83     private:
       
    84 
       
    85         /**
       
    86          * Creates list box items
       
    87          */
       
    88         void CreateListBoxItemsL();
       
    89 
       
    90         /**
       
    91          * Makes sensors active selection box
       
    92          */
       
    93         void MakeSensorsSelectionItemL();
       
    94 
       
    95         /**
       
    96          * Required for help.
       
    97          *
       
    98          * @param aContext Context to where to add help
       
    99          */
       
   100         void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   101  
       
   102     private: // Data
       
   103 
       
   104         /**
       
   105          * Sensors active status items
       
   106          */
       
   107         CDesCArrayFlat* iSensorStatusItems;
       
   108         
       
   109         /**
       
   110          * GS listbox model
       
   111          */
       
   112         CGSListBoxItemTextArray* iListboxItemArray;
       
   113         
       
   114         /**
       
   115          * Plugin model, does not own, so do not delete this
       
   116          */
       
   117         CGSSensorPluginModel* iModel;
       
   118 
       
   119     };
       
   120 
       
   121 #endif // GSSENSENSORSCONTAINER_H