|
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 * System parameters in plug-in framework. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef SYSTEMPARAMETERS_H |
|
22 #define SYSTEMPARAMETERS_H |
|
23 |
|
24 |
|
25 #include <e32base.h> |
|
26 |
|
27 /** |
|
28 * CSystemParameters represents system parameters in plug-in framework |
|
29 * |
|
30 * @code |
|
31 * ?good_class_usage_example(s) |
|
32 * @endcode |
|
33 * |
|
34 * @lib SystemParameters.lib |
|
35 * @since S60 v5.0 |
|
36 */ |
|
37 class CSystemParameters : public CBase |
|
38 { |
|
39 |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 IMPORT_C ~CSystemParameters(); |
|
46 |
|
47 |
|
48 /** |
|
49 * Getter for source image size, non-const |
|
50 * |
|
51 * @since S60 v5.0 |
|
52 * @param - |
|
53 * @return Source image size |
|
54 */ |
|
55 IMPORT_C TSize & SourceSize(); |
|
56 |
|
57 /** |
|
58 * Getter for source image size, const |
|
59 * |
|
60 * @since S60 v5.0 |
|
61 * @param - |
|
62 * @return Source image size |
|
63 */ |
|
64 IMPORT_C const TSize & SourceSize() const; |
|
65 |
|
66 |
|
67 /** |
|
68 * Getter for view port rect, non-const |
|
69 * |
|
70 * @since S60 v5.0 |
|
71 * @param - |
|
72 * @return View port rect |
|
73 */ |
|
74 IMPORT_C TRect & ViewPortRect(); |
|
75 |
|
76 /** |
|
77 * Getter for view port rect, const |
|
78 * |
|
79 * @since S60 v5.0 |
|
80 * @param - |
|
81 * @return View port rect |
|
82 */ |
|
83 IMPORT_C const TRect & ViewPortRect() const; |
|
84 |
|
85 /** |
|
86 * Getter for visible image rect, non-const |
|
87 * |
|
88 * @since S60 v5.0 |
|
89 * @param - |
|
90 * @return Visible image rect |
|
91 */ |
|
92 IMPORT_C TRect & VisibleImageRect(); |
|
93 |
|
94 /** |
|
95 * Getter for visible image rect, const |
|
96 * |
|
97 * @since S60 v5.0 |
|
98 * @param - |
|
99 * @return Visible image rect |
|
100 */ |
|
101 IMPORT_C const TRect & VisibleImageRect() const; |
|
102 |
|
103 /** |
|
104 * Getter for visible image rect in preview, non-const |
|
105 * |
|
106 * @since S60 v5.0 |
|
107 * @param - |
|
108 * @return Visible image rect in preview |
|
109 */ |
|
110 IMPORT_C TRect & VisibleImageRectPrev(); |
|
111 |
|
112 /** |
|
113 * Getter for visible image rect in preview, const |
|
114 * |
|
115 * @since S60 v5.0 |
|
116 * @param - |
|
117 * @return Visible image rect in preview |
|
118 */ |
|
119 IMPORT_C const TRect & VisibleImageRectPrev() const; |
|
120 |
|
121 /** |
|
122 * Getter for output scale, non-const |
|
123 * |
|
124 * @since S60 v5.0 |
|
125 * @param - |
|
126 * @return Output scale |
|
127 */ |
|
128 IMPORT_C TReal & Scale(); |
|
129 |
|
130 /** |
|
131 * Getter for output scale, const |
|
132 * |
|
133 * @since S60 v5.0 |
|
134 * @param - |
|
135 * @return Output scale |
|
136 */ |
|
137 IMPORT_C const TReal & Scale() const; |
|
138 |
|
139 /** |
|
140 * Getter for relative scale, non-const |
|
141 * |
|
142 * @since S60 v5.0 |
|
143 * @param - |
|
144 * @return Relative scale |
|
145 */ |
|
146 IMPORT_C TReal & RelScale(); |
|
147 |
|
148 /** |
|
149 * Getter for relative scale, const |
|
150 * |
|
151 * @since S60 v5.0 |
|
152 * @param - |
|
153 * @return Relative scale |
|
154 */ |
|
155 IMPORT_C const TReal & RelScale() const; |
|
156 |
|
157 protected: |
|
158 |
|
159 private: // data |
|
160 |
|
161 /** |
|
162 * Source image size |
|
163 */ |
|
164 TSize iSourceSize; |
|
165 |
|
166 /** |
|
167 * View port rectangle |
|
168 */ |
|
169 TRect iViewPortRect; |
|
170 |
|
171 /** |
|
172 * Visible image rect (from view port) |
|
173 */ |
|
174 TRect iVisibleImageRect; |
|
175 |
|
176 /** |
|
177 * Visible image rect (from view port) in preview image |
|
178 */ |
|
179 TRect iVisibleImageRectPrev; |
|
180 |
|
181 /** |
|
182 * Scale |
|
183 */ |
|
184 TReal iScale; |
|
185 |
|
186 /** |
|
187 * Scale relative to the source image |
|
188 */ |
|
189 TReal iRelScale; |
|
190 |
|
191 }; |
|
192 |
|
193 |
|
194 #endif // SYSTEMPARAMETERS_H |
|
195 |
|
196 |