meetingrequest/mrguicommon/inc/cmrimage.h
branchRCL_3
changeset 12 4ce476e64c59
child 16 b5fbb9b25d57
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
       
     1 /*
       
     2 * Copyright (c) 2002-2009 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 #ifndef CMRIMAGE_H
       
    19 #define CMRIMAGE_H
       
    20 
       
    21 //#include <aknsconstants.h>
       
    22 #include <akniconutils.h>
       
    23 #include <eikimage.h>
       
    24 
       
    25 #include "esmrfieldbuilderdef.h"
       
    26 #include "nmrbitmapmanager.h"
       
    27 
       
    28 /**
       
    29  *  CMRImage is icon component for fields 
       
    30  */
       
    31 NONSHARABLE_CLASS( CMRImage ) : public CEikImage
       
    32     {
       
    33 public:
       
    34     /**
       
    35      * Two-phased constructor.
       
    36      *
       
    37      * @param aBitmapId
       
    38      * @param aScaleMode 
       
    39      * @return Pointer to created and initialized mr image object.
       
    40      */
       
    41     IMPORT_C static CMRImage* NewL(
       
    42             NMRBitmapManager::TMRBitmapId aBitmapId,
       
    43             TBool aIsMaskIcon = EFalse,
       
    44             TScaleMode aScaleMode = EAspectRatioPreserved
       
    45             );
       
    46 
       
    47    /**
       
    48     * C++ Destructor
       
    49     */
       
    50    IMPORT_C virtual ~CMRImage();
       
    51    
       
    52    void SizeChanged();
       
    53 
       
    54 private:
       
    55    /**
       
    56     * C++ default constructor
       
    57     */
       
    58    CMRImage( TScaleMode aScaleMode );
       
    59    void ConstructL( NMRBitmapManager::TMRBitmapId aBitmapId, TBool aIsMaskIcon );
       
    60    void CreateIconL( NMRBitmapManager::TMRBitmapId aBitmapId );
       
    61    void CreateMaskIconL( NMRBitmapManager::TMRBitmapId aBitmapId );
       
    62     
       
    63 private:
       
    64     TScaleMode iScaleMode;
       
    65     };
       
    66 
       
    67 #endif //CMRIMAGE_H
       
    68 
       
    69 // EOF