1 /* |
|
2 * Copyright (c) 2007 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: Custmized image attribute setter for MulWidgets |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MULIMAGEVISUALATTRIBUTESETTER_H |
|
20 #define MULIMAGEVISUALATTRIBUTESETTER_H |
|
21 |
|
22 #include <osn/osndefines.h> |
|
23 #include "alf/alfimagevisualattributesetter.h" |
|
24 |
|
25 namespace Alf |
|
26 { |
|
27 |
|
28 class MulImageVisualAttributeSetterImpl; |
|
29 /** |
|
30 * The implementation of the attribute setter. |
|
31 * |
|
32 * @lib alfwidgetmodel.lib |
|
33 * @since S60 ?S60_version |
|
34 */ |
|
35 class MulImageVisualAttributeSetter : public AlfImageVisualAttributeSetter |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Constructor. |
|
41 * |
|
42 * @param aType Type of the attribute setter. |
|
43 */ |
|
44 OSN_IMPORT MulImageVisualAttributeSetter(); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 OSN_IMPORT virtual ~MulImageVisualAttributeSetter(); |
|
50 |
|
51 private: // from AlfImageVisualAttributeSetter |
|
52 |
|
53 void handleStaticDataAttribute(CAlfVisual &aVisual, |
|
54 AlfAttribute& aAttr, |
|
55 AlfAttributeContainer& aContainer, |
|
56 IAlfMap* aData); |
|
57 |
|
58 void handleStaticAttribute(CAlfVisual &aVisual, |
|
59 AlfAttribute& aAttr, |
|
60 AlfAttributeContainer& aContainer); |
|
61 |
|
62 void setAttributeValue ( CAlfVisual &aVisual, |
|
63 AlfAttributeContainer* aContainer, |
|
64 IAlfMap* aData ); |
|
65 |
|
66 void handleDynamicDataAttribute(CAlfVisual &aVisual, |
|
67 AlfAttribute& aAttr, |
|
68 AlfAttributeContainer& aContainer, |
|
69 IAlfMap* aData); |
|
70 |
|
71 void handleDynamicAttribute(CAlfVisual &aVisual, |
|
72 AlfAttribute& aAttr, |
|
73 AlfAttributeContainer& aContainer); |
|
74 |
|
75 public: //new method |
|
76 |
|
77 /** |
|
78 * Checks the given file path is of SVG image or not |
|
79 * |
|
80 * @param aImagePath Path of the image file,which need to be checked for SVG file format. |
|
81 */ |
|
82 OSN_IMPORT bool IsSVGImage(const UString& aImagePath); |
|
83 |
|
84 /** |
|
85 * Load Image visual with image provided from file path |
|
86 * |
|
87 * @param aSvgFilePath path of Image |
|
88 * @param aImageVisual visual on with image to be loaded |
|
89 */ |
|
90 OSN_IMPORT void LoadImageFromSvg(const UString& aSvgFilePath,CAlfImageVisual& aImageVisual ); |
|
91 |
|
92 /** |
|
93 * Apply texture on Image visual |
|
94 * |
|
95 * @param aTextureId Texture id |
|
96 * @param aImageVisual visual on with image to be loaded |
|
97 */ |
|
98 OSN_IMPORT void LoadImageFromTexture( int aTextureId,CAlfImageVisual& aImageVisual ); |
|
99 |
|
100 private: // data |
|
101 |
|
102 auto_ptr<MulImageVisualAttributeSetterImpl> mImpl; |
|
103 auto_ptr<AlfImageVisualAttributeSetter> mImageAttrSetter; |
|
104 IAlfMap* mData; |
|
105 }; |
|
106 |
|
107 } // namespace Alf |
|
108 |
|
109 #endif // MULIMAGEVISUALATTRIBUTESETTER_H |
|
110 |
|
111 //end of file |
|
112 |
|
113 |
|