meetingrequest/mrgui/inc/cmrimage.h
branchRCL_3
changeset 12 4ce476e64c59
parent 11 0396474f30f5
child 13 8592a65ad3fb
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: Declaration of CMRImage class.
       
    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 
       
    38      * @return Pointer to created and initialized mr image object.
       
    39      */
       
    40      IMPORT_C static CMRImage* NewL( 
       
    41              const TAknsItemID& aIconId, 
       
    42              TScaleMode aScaleMode = EAspectRatioPreserved );
       
    43      IMPORT_C static CMRImage* NewL(
       
    44              NMRBitmapManager::TMRBitmapId aBitmapId, 
       
    45              TScaleMode aScaleMode = EAspectRatioPreserved );
       
    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( const TAknsItemID& aIconId );
       
    60     void ConstructL( NMRBitmapManager::TMRBitmapId aBitmapId );
       
    61     void SetBitmapFallback( 
       
    62             const TAknsItemID& aIconId,
       
    63             TInt& aFileIndex,
       
    64             TInt& aFileMaskIndex );
       
    65     void CreateIconL( const TAknsItemID& aIconId);
       
    66     void CreateIconL( NMRBitmapManager::TMRBitmapId aBitmapId );
       
    67     
       
    68 private:
       
    69     TScaleMode iScaleMode;
       
    70     };
       
    71 
       
    72 #endif //CMRIMAGE_H
       
    73 
       
    74 // EOF