eric6/Documentation/Source/eric6.E5Gui.E5ZoomWidget.html

changeset 6942
2602857055c5
parent 5727
c8842a8d1167
child 7273
391d6b7b1eff
equal deleted inserted replaced
6941:f99d60d6b59b 6942:2602857055c5
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.E5Gui.E5ZoomWidget</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.E5Gui.E5ZoomWidget</h1>
23 <p>
24 Module implementing a zoom widget for the status bar.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#E5ZoomWidget">E5ZoomWidget</a></td>
34 <td>Class implementing a zoom widget for the status bar.</td>
35 </tr>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="E5ZoomWidget" ID="E5ZoomWidget"></a>
43 <h2>E5ZoomWidget</h2>
44 <p>
45 Class implementing a zoom widget for the status bar.
46 </p><h3>Signals</h3>
47 <dl>
48 <dt>valueChanged(value)</dt>
49 <dd>
50 emitted to indicate the new zoom value (int)
51 </dd>
52 </dl>
53 <h3>Derived from</h3>
54 QWidget, Ui_E5ZoomWidget
55 <h3>Class Attributes</h3>
56 <table>
57 <tr><td>None</td></tr>
58 </table>
59 <h3>Class Methods</h3>
60 <table>
61 <tr><td>None</td></tr>
62 </table>
63 <h3>Methods</h3>
64 <table>
65 <tr>
66 <td><a href="#E5ZoomWidget.__init__">E5ZoomWidget</a></td>
67 <td>Constructor</td>
68 </tr><tr>
69 <td><a href="#E5ZoomWidget.__indexForValue">__indexForValue</a></td>
70 <td>Private method to get the nearest index for a given value.</td>
71 </tr><tr>
72 <td><a href="#E5ZoomWidget.__setValueLabelWidth">__setValueLabelWidth</a></td>
73 <td>Private slot to determine the width of the zoom value label.</td>
74 </tr><tr>
75 <td><a href="#E5ZoomWidget.__zoomIn">__zoomIn</a></td>
76 <td>Private slot to zoom in one step.</td>
77 </tr><tr>
78 <td><a href="#E5ZoomWidget.__zoomOut">__zoomOut</a></td>
79 <td>Private slot to zoom out one step.</td>
80 </tr><tr>
81 <td><a href="#E5ZoomWidget.__zoomReset">__zoomReset</a></td>
82 <td>Private slot to reset the value.</td>
83 </tr><tr>
84 <td><a href="#E5ZoomWidget._sliderValueChanged">_sliderValueChanged</a></td>
85 <td>Protected slot to handle changes of the slider value.</td>
86 </tr><tr>
87 <td><a href="#E5ZoomWidget.default">default</a></td>
88 <td>Public method to get the default zoom value.</td>
89 </tr><tr>
90 <td><a href="#E5ZoomWidget.isMapped">isMapped</a></td>
91 <td>Public method to check for a mapped zoom widget.</td>
92 </tr><tr>
93 <td><a href="#E5ZoomWidget.isPercent">isPercent</a></td>
94 <td>Public method to get the percent mode.</td>
95 </tr><tr>
96 <td><a href="#E5ZoomWidget.mapping">mapping</a></td>
97 <td>Public method to get the current mapping.</td>
98 </tr><tr>
99 <td><a href="#E5ZoomWidget.maximum">maximum</a></td>
100 <td>Public method to get the maximum value.</td>
101 </tr><tr>
102 <td><a href="#E5ZoomWidget.minimum">minimum</a></td>
103 <td>Public method to get the minimum value.</td>
104 </tr><tr>
105 <td><a href="#E5ZoomWidget.on_slider_sliderMoved">on_slider_sliderMoved</a></td>
106 <td>Private slot to handle changes of the zoom value.</td>
107 </tr><tr>
108 <td><a href="#E5ZoomWidget.pageStep">pageStep</a></td>
109 <td>Public method to get the page step value.</td>
110 </tr><tr>
111 <td><a href="#E5ZoomWidget.setDefault">setDefault</a></td>
112 <td>Public method to set the default zoom value.</td>
113 </tr><tr>
114 <td><a href="#E5ZoomWidget.setMapping">setMapping</a></td>
115 <td>Public method to set a zoom level mapping.</td>
116 </tr><tr>
117 <td><a href="#E5ZoomWidget.setMaximum">setMaximum</a></td>
118 <td>Public method to set the maximum value.</td>
119 </tr><tr>
120 <td><a href="#E5ZoomWidget.setMinimum">setMinimum</a></td>
121 <td>Public method to set the minimum value.</td>
122 </tr><tr>
123 <td><a href="#E5ZoomWidget.setPageStep">setPageStep</a></td>
124 <td>Public method to set the page step value.</td>
125 </tr><tr>
126 <td><a href="#E5ZoomWidget.setPercent">setPercent</a></td>
127 <td>Public method to set the percent mode of the widget.</td>
128 </tr><tr>
129 <td><a href="#E5ZoomWidget.setSingleStep">setSingleStep</a></td>
130 <td>Public method to set the single step value.</td>
131 </tr><tr>
132 <td><a href="#E5ZoomWidget.setValue">setValue</a></td>
133 <td>Public slot to set the value.</td>
134 </tr><tr>
135 <td><a href="#E5ZoomWidget.singleStep">singleStep</a></td>
136 <td>Public method to get the single step value.</td>
137 </tr><tr>
138 <td><a href="#E5ZoomWidget.value">value</a></td>
139 <td>Public method to get the current value.</td>
140 </tr>
141 </table>
142 <h3>Static Methods</h3>
143 <table>
144 <tr><td>None</td></tr>
145 </table>
146 <a NAME="E5ZoomWidget.__init__" ID="E5ZoomWidget.__init__"></a>
147 <h4>E5ZoomWidget (Constructor)</h4>
148 <b>E5ZoomWidget</b>(<i>outPix, inPix, resetPix, parent=None</i>)
149 <p>
150 Constructor
151 </p><dl>
152 <dt><i>outPix</i></dt>
153 <dd>
154 pixmap for the zoom out button (QPixmap)
155 </dd><dt><i>inPix</i></dt>
156 <dd>
157 pixmap for the zoom in button (QPixmap)
158 </dd><dt><i>resetPix</i></dt>
159 <dd>
160 pixmap for the zoom reset button (QPixmap)
161 </dd><dt><i>parent</i></dt>
162 <dd>
163 reference to the parent widget (QWidget)
164 </dd>
165 </dl><a NAME="E5ZoomWidget.__indexForValue" ID="E5ZoomWidget.__indexForValue"></a>
166 <h4>E5ZoomWidget.__indexForValue</h4>
167 <b>__indexForValue</b>(<i>value</i>)
168 <p>
169 Private method to get the nearest index for a given value.
170 </p><dl>
171 <dt><i>value</i></dt>
172 <dd>
173 value to get the index for (integer)
174 </dd>
175 </dl><dl>
176 <dt>Returns:</dt>
177 <dd>
178 index into the mapping list or the unchanged value,
179 if mapping is not set (integer)
180 </dd>
181 </dl><a NAME="E5ZoomWidget.__setValueLabelWidth" ID="E5ZoomWidget.__setValueLabelWidth"></a>
182 <h4>E5ZoomWidget.__setValueLabelWidth</h4>
183 <b>__setValueLabelWidth</b>(<i></i>)
184 <p>
185 Private slot to determine the width of the zoom value label.
186 </p><a NAME="E5ZoomWidget.__zoomIn" ID="E5ZoomWidget.__zoomIn"></a>
187 <h4>E5ZoomWidget.__zoomIn</h4>
188 <b>__zoomIn</b>(<i></i>)
189 <p>
190 Private slot to zoom in one step.
191 </p><a NAME="E5ZoomWidget.__zoomOut" ID="E5ZoomWidget.__zoomOut"></a>
192 <h4>E5ZoomWidget.__zoomOut</h4>
193 <b>__zoomOut</b>(<i></i>)
194 <p>
195 Private slot to zoom out one step.
196 </p><a NAME="E5ZoomWidget.__zoomReset" ID="E5ZoomWidget.__zoomReset"></a>
197 <h4>E5ZoomWidget.__zoomReset</h4>
198 <b>__zoomReset</b>(<i></i>)
199 <p>
200 Private slot to reset the value.
201 </p><a NAME="E5ZoomWidget._sliderValueChanged" ID="E5ZoomWidget._sliderValueChanged"></a>
202 <h4>E5ZoomWidget._sliderValueChanged</h4>
203 <b>_sliderValueChanged</b>(<i>value</i>)
204 <p>
205 Protected slot to handle changes of the slider value.
206 </p><dl>
207 <dt><i>value</i></dt>
208 <dd>
209 slider value (integer)
210 </dd>
211 </dl><a NAME="E5ZoomWidget.default" ID="E5ZoomWidget.default"></a>
212 <h4>E5ZoomWidget.default</h4>
213 <b>default</b>(<i></i>)
214 <p>
215 Public method to get the default zoom value.
216 </p><dl>
217 <dt>Returns:</dt>
218 <dd>
219 default zoom value (integer)
220 </dd>
221 </dl><a NAME="E5ZoomWidget.isMapped" ID="E5ZoomWidget.isMapped"></a>
222 <h4>E5ZoomWidget.isMapped</h4>
223 <b>isMapped</b>(<i></i>)
224 <p>
225 Public method to check for a mapped zoom widget.
226 </p><dl>
227 <dt>Returns:</dt>
228 <dd>
229 flag indicating a mapped zoom widget (boolean)
230 </dd>
231 </dl><a NAME="E5ZoomWidget.isPercent" ID="E5ZoomWidget.isPercent"></a>
232 <h4>E5ZoomWidget.isPercent</h4>
233 <b>isPercent</b>(<i></i>)
234 <p>
235 Public method to get the percent mode.
236 </p><dl>
237 <dt>Returns:</dt>
238 <dd>
239 flag indicating percent mode (boolean)
240 </dd>
241 </dl><a NAME="E5ZoomWidget.mapping" ID="E5ZoomWidget.mapping"></a>
242 <h4>E5ZoomWidget.mapping</h4>
243 <b>mapping</b>(<i></i>)
244 <p>
245 Public method to get the current mapping.
246 </p><dl>
247 <dt>Returns:</dt>
248 <dd>
249 tuple of the mapping and the default index
250 (list of integer, integer)
251 </dd>
252 </dl><a NAME="E5ZoomWidget.maximum" ID="E5ZoomWidget.maximum"></a>
253 <h4>E5ZoomWidget.maximum</h4>
254 <b>maximum</b>(<i></i>)
255 <p>
256 Public method to get the maximum value.
257 </p><dl>
258 <dt>Returns:</dt>
259 <dd>
260 maximum value (integer)
261 </dd>
262 </dl><a NAME="E5ZoomWidget.minimum" ID="E5ZoomWidget.minimum"></a>
263 <h4>E5ZoomWidget.minimum</h4>
264 <b>minimum</b>(<i></i>)
265 <p>
266 Public method to get the minimum value.
267 </p><dl>
268 <dt>Returns:</dt>
269 <dd>
270 minimum value (integer)
271 </dd>
272 </dl><a NAME="E5ZoomWidget.on_slider_sliderMoved" ID="E5ZoomWidget.on_slider_sliderMoved"></a>
273 <h4>E5ZoomWidget.on_slider_sliderMoved</h4>
274 <b>on_slider_sliderMoved</b>(<i>value</i>)
275 <p>
276 Private slot to handle changes of the zoom value.
277 </p><dl>
278 <dt><i>value</i></dt>
279 <dd>
280 value of the slider (integer)
281 </dd>
282 </dl><a NAME="E5ZoomWidget.pageStep" ID="E5ZoomWidget.pageStep"></a>
283 <h4>E5ZoomWidget.pageStep</h4>
284 <b>pageStep</b>(<i></i>)
285 <p>
286 Public method to get the page step value.
287 </p><dl>
288 <dt>Returns:</dt>
289 <dd>
290 page step value (integer)
291 </dd>
292 </dl><a NAME="E5ZoomWidget.setDefault" ID="E5ZoomWidget.setDefault"></a>
293 <h4>E5ZoomWidget.setDefault</h4>
294 <b>setDefault</b>(<i>value</i>)
295 <p>
296 Public method to set the default zoom value.
297 </p><dl>
298 <dt><i>value</i></dt>
299 <dd>
300 default zoom value (integer)
301 </dd>
302 </dl><a NAME="E5ZoomWidget.setMapping" ID="E5ZoomWidget.setMapping"></a>
303 <h4>E5ZoomWidget.setMapping</h4>
304 <b>setMapping</b>(<i>mapping, default, percent=True</i>)
305 <p>
306 Public method to set a zoom level mapping.
307 </p><p>
308 When zoom level mapping is activated, the slider covers
309 values from 0 to the max. index of the mapping list. The
310 default value is the value of the default zoom level. If
311 percent is given, the zoom level is shown as a percent value.
312 </p><dl>
313 <dt><i>mapping</i></dt>
314 <dd>
315 list of mapping values (list of integer)
316 </dd><dt><i>default</i></dt>
317 <dd>
318 index of the default value (integer)
319 </dd><dt><i>percent=</i></dt>
320 <dd>
321 flag indicating to show zoom value in percent
322 (boolean)
323 </dd>
324 </dl><a NAME="E5ZoomWidget.setMaximum" ID="E5ZoomWidget.setMaximum"></a>
325 <h4>E5ZoomWidget.setMaximum</h4>
326 <b>setMaximum</b>(<i>maximum</i>)
327 <p>
328 Public method to set the maximum value.
329 </p><dl>
330 <dt><i>maximum</i></dt>
331 <dd>
332 new maximum value (integer)
333 </dd>
334 </dl><a NAME="E5ZoomWidget.setMinimum" ID="E5ZoomWidget.setMinimum"></a>
335 <h4>E5ZoomWidget.setMinimum</h4>
336 <b>setMinimum</b>(<i>minimum</i>)
337 <p>
338 Public method to set the minimum value.
339 </p><dl>
340 <dt><i>minimum</i></dt>
341 <dd>
342 new minimum value (integer)
343 </dd>
344 </dl><a NAME="E5ZoomWidget.setPageStep" ID="E5ZoomWidget.setPageStep"></a>
345 <h4>E5ZoomWidget.setPageStep</h4>
346 <b>setPageStep</b>(<i>value</i>)
347 <p>
348 Public method to set the page step value.
349 </p><dl>
350 <dt><i>value</i></dt>
351 <dd>
352 page step value (integer)
353 </dd>
354 </dl><a NAME="E5ZoomWidget.setPercent" ID="E5ZoomWidget.setPercent"></a>
355 <h4>E5ZoomWidget.setPercent</h4>
356 <b>setPercent</b>(<i>on</i>)
357 <p>
358 Public method to set the percent mode of the widget.
359 </p><dl>
360 <dt><i>on</i></dt>
361 <dd>
362 flag indicating percent mode (boolean)
363 </dd>
364 </dl><a NAME="E5ZoomWidget.setSingleStep" ID="E5ZoomWidget.setSingleStep"></a>
365 <h4>E5ZoomWidget.setSingleStep</h4>
366 <b>setSingleStep</b>(<i>value</i>)
367 <p>
368 Public method to set the single step value.
369 </p><dl>
370 <dt><i>value</i></dt>
371 <dd>
372 value for the single step (integer)
373 </dd>
374 </dl><a NAME="E5ZoomWidget.setValue" ID="E5ZoomWidget.setValue"></a>
375 <h4>E5ZoomWidget.setValue</h4>
376 <b>setValue</b>(<i>value</i>)
377 <p>
378 Public slot to set the value.
379 </p><dl>
380 <dt><i>value</i></dt>
381 <dd>
382 new zoom value (integer)
383 </dd>
384 </dl><a NAME="E5ZoomWidget.singleStep" ID="E5ZoomWidget.singleStep"></a>
385 <h4>E5ZoomWidget.singleStep</h4>
386 <b>singleStep</b>(<i></i>)
387 <p>
388 Public method to get the single step value.
389 </p><dl>
390 <dt>Returns:</dt>
391 <dd>
392 single step value (integer)
393 </dd>
394 </dl><a NAME="E5ZoomWidget.value" ID="E5ZoomWidget.value"></a>
395 <h4>E5ZoomWidget.value</h4>
396 <b>value</b>(<i></i>)
397 <p>
398 Public method to get the current value.
399 </p><dl>
400 <dt>Returns:</dt>
401 <dd>
402 current zoom value (integer)
403 </dd>
404 </dl>
405 <div align="right"><a href="#top">Up</a></div>
406 <hr />
407 </body></html>

eric ide

mercurial