menufw/hierarchynavigator/hnmetadatamodel/inc/hnmdtoolbar.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2007-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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef HNMDTOOLBAR_H_
       
    20 #define HNMDTOOLBAR_H_
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <xmlengelement.h>
       
    24 
       
    25 class CLiwGenericParamList;
       
    26 class CHnMdButton;
       
    27 struct THnMdCommonPointers;
       
    28 class TXmlEngElement;
       
    29 class CHnToolbarModel;
       
    30 
       
    31 /**
       
    32  * Toolbar item.
       
    33  * 
       
    34  * This is the class which represents the toolbar item.
       
    35  *
       
    36  * @lib hnmetadatamodel
       
    37  * @since S60 5.0
       
    38  * @ingroup group_hnmetadatamodel
       
    39  */
       
    40 
       
    41 NONSHARABLE_CLASS( CHnMdToolbar ) : public CBase
       
    42     {
       
    43 public:
       
    44     
       
    45     /**
       
    46      * Two-phase constructor.
       
    47      *
       
    48      * @since S60 5.0
       
    49      * @param aElement Xml element.
       
    50      * @param aCmnPtrs Common pointers.
       
    51      * @return Constructed object.
       
    52      */
       
    53     static CHnMdToolbar* NewLC( TXmlEngElement aElement,
       
    54        THnMdCommonPointers* aCmnPtrs );
       
    55     
       
    56     /**
       
    57      * Two-phase constructor.
       
    58      *
       
    59      * @since S60 5.0
       
    60      * @param aElement Xml element.
       
    61      * @param aCmnPtrs Common pointers.
       
    62      * @return Constructed object.
       
    63      */
       
    64      static CHnMdToolbar* NewL( TXmlEngElement aElement,
       
    65            THnMdCommonPointers* aCmnPtrs );
       
    66 
       
    67 
       
    68     /**
       
    69      * Standard C++ virtual destructor.
       
    70      *    
       
    71      * @since S60 5.0
       
    72      */
       
    73     ~CHnMdToolbar( );
       
    74     
       
    75     /**
       
    76      * Standard C++ virtual destructor.
       
    77      *    
       
    78      * @since S60 5.0
       
    79      * @param aToolbar Fills toolbar model with buttons.
       
    80      * @param aQueryResults CLiwGenericParamList object.
       
    81      * @param aPos Position of the record in the params list.
       
    82      */
       
    83     void EvaluateL( CHnToolbarModel* aToolbar, 
       
    84                     const CLiwGenericParamList& aQueryResults, 
       
    85                     TInt aPos = 0 );
       
    86     
       
    87 private:
       
    88 
       
    89     /**
       
    90      * Standard C++ constructor.
       
    91      *
       
    92      * @since S60 5.0
       
    93      */
       
    94     CHnMdToolbar();
       
    95 
       
    96     /**
       
    97      * Standard symbian 2nd pahse constructor.
       
    98      *
       
    99      * @since S60 5.0
       
   100      * @param aElement Xml element.
       
   101      * @param aCmnPtrs Common pointers.
       
   102      */
       
   103     void ConstructL( TXmlEngElement aElement,
       
   104             THnMdCommonPointers* aCmnPtrs );
       
   105     
       
   106     /**
       
   107      * Creates buttons for toolbar.
       
   108      *
       
   109      * @since S60 5.0
       
   110      * @param aElement Xml element.
       
   111      * @param aCmnPtrs Common pointers.
       
   112      */
       
   113     void CreateButtonsL( TXmlEngElement aElement,
       
   114             THnMdCommonPointers* aCmnPtrs );
       
   115         
       
   116 private: // data
       
   117 
       
   118     /**
       
   119      * Buttons for toolbar created from xml configuration.
       
   120      * Own.
       
   121      */
       
   122     RPointerArray< CHnMdButton > iButtons;
       
   123     };
       
   124 
       
   125 #endif /*HNMDTOOLBAR_H_*/
       
   126