|
1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef IMAGEEDITORCROPPLUGIN_H |
|
22 #define IMAGEEDITORCROPPLUGIN_H |
|
23 |
|
24 // INCLUDES |
|
25 #include "iepb.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CEditorImage; |
|
29 class CCoeControl; |
|
30 class CSystemParameters; |
|
31 |
|
32 |
|
33 /* CLASS: CImageEditorCropPlugin |
|
34 * |
|
35 * CImageEditorCropPlugin represents crop plug-in for Image Editor |
|
36 * application. |
|
37 * |
|
38 */ |
|
39 class CImageEditorCropPlugin : public CImageEditorPluginBase |
|
40 { |
|
41 |
|
42 public: |
|
43 |
|
44 /** @name Methods:*/ |
|
45 //@{ |
|
46 |
|
47 /** Default constructor |
|
48 * |
|
49 * @param - |
|
50 * @return - |
|
51 */ |
|
52 CImageEditorCropPlugin (); |
|
53 |
|
54 /** Second phase constructor, may leave |
|
55 * |
|
56 * @param - |
|
57 * @return - |
|
58 */ |
|
59 virtual void ConstructL (); |
|
60 |
|
61 /** Destructor |
|
62 * |
|
63 * @param - |
|
64 * @return - |
|
65 */ |
|
66 virtual ~CImageEditorCropPlugin (); |
|
67 |
|
68 /* SetProperty |
|
69 * |
|
70 * @see CPluginBase |
|
71 */ |
|
72 virtual TInt SetProperty ( |
|
73 TInt aPropertyId, |
|
74 TDesC & aPropertyValue |
|
75 ); |
|
76 |
|
77 /* GetProperty |
|
78 * |
|
79 * @see CPluginBase |
|
80 */ |
|
81 virtual TInt GetProperty ( |
|
82 TInt aPropertyId, |
|
83 TDes & aPropertyValue |
|
84 ); |
|
85 |
|
86 /** InitPluginL |
|
87 * |
|
88 * @see CImageEditorPluginBase |
|
89 */ |
|
90 virtual TInt InitPluginL ( |
|
91 const TRect & aRect, |
|
92 CCoeControl * aParent, |
|
93 CCoeControl *& aPluginControl |
|
94 ); |
|
95 |
|
96 /** ProcessImageL |
|
97 * |
|
98 * @see CImageEditorPluginBase |
|
99 */ |
|
100 virtual void ProcessImageL (CEditorImage * aImage); |
|
101 |
|
102 /** ReleasePlugin |
|
103 * |
|
104 * @see CImageEditorPluginBase |
|
105 */ |
|
106 virtual void ReleasePlugin (); |
|
107 |
|
108 //@} |
|
109 |
|
110 protected: |
|
111 |
|
112 /** @name Methods:*/ |
|
113 //@{ |
|
114 |
|
115 //@} |
|
116 |
|
117 /** @name Members:*/ |
|
118 //@{ |
|
119 |
|
120 //@} |
|
121 |
|
122 private: |
|
123 |
|
124 /** @name Methods:*/ |
|
125 //@{ |
|
126 |
|
127 /** Copy constructor, disabled |
|
128 */ |
|
129 CImageEditorCropPlugin (const CImageEditorCropPlugin & rhs); |
|
130 |
|
131 /** Assignment operator, disabled |
|
132 */ |
|
133 CImageEditorCropPlugin & operator= (const CImageEditorCropPlugin & rhs); |
|
134 |
|
135 /** ReadWallPaperCropDefinitionsL |
|
136 * |
|
137 * Adds the crop ratio names to aCropTexts and aspect ratio description |
|
138 * to aCropRatios. Aspect ratio is current screen resolution either in |
|
139 * portrait or in landscape. |
|
140 * |
|
141 * The aspect ratio is defined by two integers W for width and H for |
|
142 * height. On return, aCropRatios have the aspect ratio definitions |
|
143 * inserted as follows: W1 H1 W2 H2... |
|
144 |
|
145 * @param aCropTexts - on return includes crop ratio names |
|
146 * @param aCropRatios - on return includes crop ratio definitions |
|
147 * @return - |
|
148 */ |
|
149 void ReadWallPaperCropDefinitionsL ( |
|
150 CDesCArray & aCropTexts, |
|
151 RArray<TInt> & aCropRatios |
|
152 ) const; |
|
153 |
|
154 /** ReadCropDefinitionsL |
|
155 * |
|
156 * Reads crop definition resource. Adds the crop ratio names to |
|
157 * aCropTexts and aspect ratio description to aCropRatios. |
|
158 * |
|
159 * The aspect ratio is defined by two integers W for width and H for |
|
160 * height. On return, aCropRatios have the aspect ratio definitions |
|
161 * inserted as follows: W1 H1 W2 H2... This means that after this method |
|
162 * is called, count of aCropRatios is three times the count of aCropTexts. |
|
163 * |
|
164 * @param aCropTexts - on return includes crop ratio names |
|
165 * @param aCropRatios - on return includes crop ratio definitions |
|
166 * @return - |
|
167 */ |
|
168 void ReadCropDefinitionsL ( |
|
169 CDesCArray & aCropTexts, |
|
170 RArray<TInt> & aCropRatios |
|
171 ) const; |
|
172 |
|
173 //@} |
|
174 |
|
175 /** @name Members:*/ |
|
176 //@{ |
|
177 /// Plug-in UI control |
|
178 CCoeControl * iControl; |
|
179 /// Image height |
|
180 const CSystemParameters * iSysPars; |
|
181 |
|
182 //@} |
|
183 |
|
184 }; |
|
185 |
|
186 |
|
187 #endif |
|
188 |
|
189 // End of File |