systemsettings/GSAccessoryPlugin/inc/gsaccbasecontainer.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Declaration of CGSAccBaseContainer class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef GSACCBASECONTAINER_H
       
    20 #define GSACCBASECONTAINER_H
       
    21 
       
    22 #include <gsbasecontainer.h>
       
    23 
       
    24 class CGSAccessoryPluginModel;
       
    25 class CGSListBoxItemTextArray;
       
    26 
       
    27 /**
       
    28 *  CGSAccBaseContainer container class.
       
    29 *  Base class for different containers in GSAccessoryPlugin.
       
    30 */
       
    31 class CGSAccBaseContainer : public CGSBaseContainer
       
    32     {
       
    33 
       
    34 public:
       
    35 
       
    36     /**
       
    37     * Destructor.
       
    38     */
       
    39     virtual ~CGSAccBaseContainer();
       
    40 
       
    41 public:
       
    42 
       
    43     /**
       
    44     * Retrieves the currently selected listbox feature id.
       
    45     *
       
    46     * @return feature id.
       
    47     */
       
    48     TInt CurrentFeatureId() const;
       
    49 
       
    50     /**
       
    51     * Updates the listbox item identified by the parameter.
       
    52     *
       
    53     * @param aFeatureId Selected listbox item id.
       
    54     */
       
    55     virtual void UpdateListBoxL( TInt aFeatureId ) = 0;
       
    56 
       
    57 protected: // from CGSBaseContainer
       
    58 
       
    59     /**
       
    60     * @see class CGSBaseContainer.
       
    61     */
       
    62     void ConstructListBoxL( TInt aResLbxId );
       
    63 
       
    64 protected:
       
    65 
       
    66     /**
       
    67     * First phase constructor.
       
    68     *
       
    69     * @param aModel Data model for reading and writing settings.
       
    70     */
       
    71     CGSAccBaseContainer( CGSAccessoryPluginModel& aModel );
       
    72 
       
    73     /**
       
    74     * Constructs listbox object.
       
    75     */
       
    76     void CreateListBoxL();
       
    77 
       
    78     /**
       
    79     * Sets listbox item text.
       
    80     *
       
    81     * @param aItemId Identifies the item.
       
    82     * @param aText Text to set to the item.
       
    83     */
       
    84     void SetItemTextL( TInt aItemId, const TDesC& aText );
       
    85 
       
    86     /**
       
    87     * Makes a listbox item visible.
       
    88     *
       
    89     * @param aItemId Identifies the item to make visible.
       
    90     */
       
    91     void MakeItemVisibleL( TInt aItemId );
       
    92 
       
    93 protected: // data
       
    94 
       
    95     /** Data model. */
       
    96     CGSAccessoryPluginModel& iModel;
       
    97 
       
    98     /** GS listbox model. Own. */
       
    99     CGSListBoxItemTextArray* iListboxItemArray;
       
   100 
       
   101     };
       
   102 
       
   103 #endif // GSACCBASECONTAINER_H