menufw/hierarchynavigator/hnpresentationmodel/inc/hnattributetext.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:   text attribute model
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_HNATTRIBUTETEXT_H
       
    20 #define C_HNATTRIBUTETEXT_H
       
    21 
       
    22 #include "hnattributebase.h"
       
    23 
       
    24 /**
       
    25  *  Image attribute.
       
    26  * 
       
    27  *  Class defining behaviour of the CHnAttributeBase interface
       
    28  *  to support text. The model is responsible for creation 
       
    29  *  of the text, appropriately, depending on the definition in the
       
    30  *  xml.
       
    31  * 
       
    32  *  @lib hnpresentationmodel
       
    33  *  @since S60 5.0
       
    34  *  @ingroup group_hnpresentationmodel
       
    35  */
       
    36 NONSHARABLE_CLASS( CHnAttributeText ) : public CHnAttributeBase
       
    37     {
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Two-phase constructor.
       
    42      *
       
    43      * @since S60 5.0
       
    44      * @return Fully constructed object.
       
    45      */
       
    46     IMPORT_C static CHnAttributeText* NewL();
       
    47 
       
    48     /**
       
    49      * Two-phase constructor.
       
    50      *
       
    51      * @since S60 5.0
       
    52      * @return Fully constructed object.
       
    53      */
       
    54     IMPORT_C static CHnAttributeText* NewLC();
       
    55 
       
    56     
       
    57     /**
       
    58      * Standard C++ virtual destructor.
       
    59      */
       
    60     ~CHnAttributeText();
       
    61     
       
    62     /**
       
    63      * Sets the attribute value.
       
    64      * 
       
    65      * @since S60 5.0
       
    66      * @param aValue A reference to a descriptor.
       
    67      */
       
    68     IMPORT_C void SetValueL ( const TDesC8& aValue );
       
    69 
       
    70 // From base class CHnAttributeBase
       
    71 public:
       
    72     
       
    73     /**
       
    74      * Returns the value of the attribute.
       
    75      *
       
    76      * @since S60 5.0
       
    77      * @return Value of the attribute.
       
    78      */
       
    79     const TDesC8& Value( );
       
    80 
       
    81 private:
       
    82 
       
    83     /**
       
    84       * Standard C++ constructor.
       
    85       * 
       
    86       * @since S60 5.0
       
    87       */
       
    88      CHnAttributeText();
       
    89 
       
    90      /**
       
    91       * Standard symbian 2nd phase constructor.
       
    92       * 
       
    93       * @since S60 5.0
       
    94       */
       
    95      void ConstructL();
       
    96     
       
    97 private:
       
    98 
       
    99     /**
       
   100      * Attribute value.
       
   101      */
       
   102     RBuf8 iValue;
       
   103     
       
   104     };
       
   105 
       
   106 #endif // C_HNATTRIBUTETEXT_H
       
   107