|
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 EDITORIMAGE_H |
|
22 #define EDITORIMAGE_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <fbs.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 |
|
30 |
|
31 /* CLASS: CEditorImage |
|
32 * |
|
33 * CEditorImage class represents an image in Image Editor. The image can |
|
34 * be loaded with RAJPEG engine (JPEG) or Symbian MMF (other formats). |
|
35 * When image is loaded with RAJPEG, the image is represented as file name. |
|
36 * When image is loaded with MMF, the image is represented as CFbsBitmap. |
|
37 */ |
|
38 class CEditorImage : public CBase |
|
39 { |
|
40 |
|
41 public: |
|
42 |
|
43 |
|
44 /** @name Methods:*/ |
|
45 //@{ |
|
46 |
|
47 /** NewL factory method, pops cleanupstack |
|
48 * |
|
49 * @param - |
|
50 * @return pointer to created CEditorImage object |
|
51 */ |
|
52 static CEditorImage * NewL (); |
|
53 |
|
54 /** NewLC factory method, does not pop cleanupstack |
|
55 * |
|
56 * @param - |
|
57 * @return pointer to created CEditorImage object |
|
58 */ |
|
59 static CEditorImage * NewLC (); |
|
60 |
|
61 /** Destructor |
|
62 * |
|
63 * @param - |
|
64 * @return - |
|
65 */ |
|
66 ~CEditorImage (); |
|
67 |
|
68 /** GetPreviewData |
|
69 * |
|
70 * @param - |
|
71 * @return pointer to preview bitmap |
|
72 */ |
|
73 CFbsBitmap *& GetPreviewData(); |
|
74 |
|
75 /** GetFullData |
|
76 * |
|
77 * @param - |
|
78 * @return pointer to full sized bitmap |
|
79 */ |
|
80 CFbsBitmap *& GetFullData(); |
|
81 |
|
82 /** GetImageName |
|
83 * |
|
84 * @param - |
|
85 * @return pointer to bitmap |
|
86 */ |
|
87 TFileName & GetImageName(); |
|
88 |
|
89 /** LockHeapLC |
|
90 * |
|
91 * Locks bitmap heap |
|
92 * |
|
93 * @param - |
|
94 * @return - |
|
95 */ |
|
96 void LockHeapLC() const; |
|
97 |
|
98 /** LockHeapL |
|
99 * |
|
100 * Releases bitmap heap. |
|
101 * |
|
102 * @param - |
|
103 * @return - |
|
104 */ |
|
105 void ReleaseHeap() const; |
|
106 |
|
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 /** Default constructor |
|
128 * |
|
129 * @param - |
|
130 * @return - |
|
131 */ |
|
132 CEditorImage (); |
|
133 |
|
134 /** Second phase constructor, may leave |
|
135 * |
|
136 * @param - |
|
137 * @return - |
|
138 */ |
|
139 void ConstructL (); |
|
140 //@} |
|
141 |
|
142 /** @name Members:*/ |
|
143 //@{ |
|
144 /// Preview |
|
145 CFbsBitmap * iPreview; |
|
146 /// Full |
|
147 CFbsBitmap * iFull; |
|
148 /// File name |
|
149 TFileName iFileName; |
|
150 //@} |
|
151 |
|
152 }; |
|
153 |
|
154 |
|
155 #endif |