|
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 aParent parent control |
|
39 * @param aScaleMode |
|
40 * @return Pointer to created and initialized mr image object. |
|
41 */ |
|
42 IMPORT_C static CMRImage* NewL( |
|
43 NMRBitmapManager::TMRBitmapId aBitmapId, |
|
44 const CCoeControl* aParent = NULL, |
|
45 TBool aIsMaskIcon = EFalse, |
|
46 TScaleMode aScaleMode = EAspectRatioPreserved |
|
47 ); |
|
48 |
|
49 /** |
|
50 * C++ Destructor |
|
51 */ |
|
52 IMPORT_C virtual ~CMRImage(); |
|
53 |
|
54 void SizeChanged(); |
|
55 |
|
56 private: |
|
57 /** |
|
58 * C++ default constructor |
|
59 */ |
|
60 CMRImage( TScaleMode aScaleMode ); |
|
61 void ConstructL( |
|
62 NMRBitmapManager::TMRBitmapId aBitmapId, |
|
63 const CCoeControl* aParent, |
|
64 TBool aIsMaskIcon ); |
|
65 void CreateIconL( NMRBitmapManager::TMRBitmapId aBitmapId ); |
|
66 void CreateMaskIconL( NMRBitmapManager::TMRBitmapId aBitmapId ); |
|
67 |
|
68 private: |
|
69 TScaleMode iScaleMode; |
|
70 }; |
|
71 |
|
72 #endif //CMRIMAGE_H |
|
73 |
|
74 // EOF |