src/eric7/Documentation/Source/eric7.Snapshot.SnapWidget.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8596
d64760b2da50
child 10431
64157aeb0312
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Snapshot.SnapWidget</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.Snapshot.SnapWidget</h1>
10
11 <p>
12 Module implementing the snapshot widget.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#SnapWidget">SnapWidget</a></td>
25 <td>Class implementing the snapshot widget.</td>
26 </tr>
27 </table>
28 <h3>Functions</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <hr />
34 <hr />
35 <a NAME="SnapWidget" ID="SnapWidget"></a>
36 <h2>SnapWidget</h2>
37
38 <p>
39 Class implementing the snapshot widget.
40 </p>
41 <h3>Derived from</h3>
42 QWidget, Ui_SnapWidget
43 <h3>Class Attributes</h3>
44
45 <table>
46 <tr><td>None</td></tr>
47 </table>
48 <h3>Class Methods</h3>
49
50 <table>
51 <tr><td>None</td></tr>
52 </table>
53 <h3>Methods</h3>
54
55 <table>
56
57 <tr>
58 <td><a href="#SnapWidget.__init__">SnapWidget</a></td>
59 <td>Constructor</td>
60 </tr>
61 <tr>
62 <td><a href="#SnapWidget.__autoIncFilename">__autoIncFilename</a></td>
63 <td>Private method to auto-increment the file name.</td>
64 </tr>
65 <tr>
66 <td><a href="#SnapWidget.__captured">__captured</a></td>
67 <td>Private slot to show a preview of the snapshot.</td>
68 </tr>
69 <tr>
70 <td><a href="#SnapWidget.__dragSnapshot">__dragSnapshot</a></td>
71 <td>Private slot handling the dragging of the preview picture.</td>
72 </tr>
73 <tr>
74 <td><a href="#SnapWidget.__initFileFilters">__initFileFilters</a></td>
75 <td>Private method to define the supported image file filters.</td>
76 </tr>
77 <tr>
78 <td><a href="#SnapWidget.__initShortcuts">__initShortcuts</a></td>
79 <td>Private method to initialize the keyboard shortcuts.</td>
80 </tr>
81 <tr>
82 <td><a href="#SnapWidget.__quickSave">__quickSave</a></td>
83 <td>Private slot to save the snapshot bypassing the file selection dialog.</td>
84 </tr>
85 <tr>
86 <td><a href="#SnapWidget.__redisplay">__redisplay</a></td>
87 <td>Private method to redisplay the window.</td>
88 </tr>
89 <tr>
90 <td><a href="#SnapWidget.__saveImage">__saveImage</a></td>
91 <td>Private method to save the snapshot.</td>
92 </tr>
93 <tr>
94 <td><a href="#SnapWidget.__updateCaption">__updateCaption</a></td>
95 <td>Private method to update the window caption.</td>
96 </tr>
97 <tr>
98 <td><a href="#SnapWidget.__updatePreview">__updatePreview</a></td>
99 <td>Private slot to update the preview picture.</td>
100 </tr>
101 <tr>
102 <td><a href="#SnapWidget.closeEvent">closeEvent</a></td>
103 <td>Protected method handling the close event.</td>
104 </tr>
105 <tr>
106 <td><a href="#SnapWidget.on_copyButton_clicked">on_copyButton_clicked</a></td>
107 <td>Private slot to copy the snapshot to the clipboard.</td>
108 </tr>
109 <tr>
110 <td><a href="#SnapWidget.on_copyPreviewButton_clicked">on_copyPreviewButton_clicked</a></td>
111 <td>Private slot to copy the snapshot preview to the clipboard.</td>
112 </tr>
113 <tr>
114 <td><a href="#SnapWidget.on_modeCombo_currentIndexChanged">on_modeCombo_currentIndexChanged</a></td>
115 <td>Private slot handling the selection of a screenshot mode.</td>
116 </tr>
117 <tr>
118 <td><a href="#SnapWidget.on_saveButton_clicked">on_saveButton_clicked</a></td>
119 <td>Private slot to save the snapshot.</td>
120 </tr>
121 <tr>
122 <td><a href="#SnapWidget.on_takeButton_clicked">on_takeButton_clicked</a></td>
123 <td>Private slot to take a snapshot.</td>
124 </tr>
125 <tr>
126 <td><a href="#SnapWidget.resizeEvent">resizeEvent</a></td>
127 <td>Protected method handling a resizing of the window.</td>
128 </tr>
129 </table>
130 <h3>Static Methods</h3>
131
132 <table>
133 <tr><td>None</td></tr>
134 </table>
135
136 <a NAME="SnapWidget.__init__" ID="SnapWidget.__init__"></a>
137 <h4>SnapWidget (Constructor)</h4>
138 <b>SnapWidget</b>(<i>parent=None</i>)
139
140 <p>
141 Constructor
142 </p>
143 <dl>
144
145 <dt><i>parent</i></dt>
146 <dd>
147 reference to the parent widget (QWidget)
148 </dd>
149 </dl>
150 <a NAME="SnapWidget.__autoIncFilename" ID="SnapWidget.__autoIncFilename"></a>
151 <h4>SnapWidget.__autoIncFilename</h4>
152 <b>__autoIncFilename</b>(<i></i>)
153
154 <p>
155 Private method to auto-increment the file name.
156 </p>
157 <a NAME="SnapWidget.__captured" ID="SnapWidget.__captured"></a>
158 <h4>SnapWidget.__captured</h4>
159 <b>__captured</b>(<i>pixmap</i>)
160
161 <p>
162 Private slot to show a preview of the snapshot.
163 </p>
164 <dl>
165
166 <dt><i>pixmap</i></dt>
167 <dd>
168 pixmap of the snapshot (QPixmap)
169 </dd>
170 </dl>
171 <a NAME="SnapWidget.__dragSnapshot" ID="SnapWidget.__dragSnapshot"></a>
172 <h4>SnapWidget.__dragSnapshot</h4>
173 <b>__dragSnapshot</b>(<i></i>)
174
175 <p>
176 Private slot handling the dragging of the preview picture.
177 </p>
178 <a NAME="SnapWidget.__initFileFilters" ID="SnapWidget.__initFileFilters"></a>
179 <h4>SnapWidget.__initFileFilters</h4>
180 <b>__initFileFilters</b>(<i></i>)
181
182 <p>
183 Private method to define the supported image file filters.
184 </p>
185 <a NAME="SnapWidget.__initShortcuts" ID="SnapWidget.__initShortcuts"></a>
186 <h4>SnapWidget.__initShortcuts</h4>
187 <b>__initShortcuts</b>(<i></i>)
188
189 <p>
190 Private method to initialize the keyboard shortcuts.
191 </p>
192 <a NAME="SnapWidget.__quickSave" ID="SnapWidget.__quickSave"></a>
193 <h4>SnapWidget.__quickSave</h4>
194 <b>__quickSave</b>(<i></i>)
195
196 <p>
197 Private slot to save the snapshot bypassing the file selection dialog.
198 </p>
199 <a NAME="SnapWidget.__redisplay" ID="SnapWidget.__redisplay"></a>
200 <h4>SnapWidget.__redisplay</h4>
201 <b>__redisplay</b>(<i></i>)
202
203 <p>
204 Private method to redisplay the window.
205 </p>
206 <a NAME="SnapWidget.__saveImage" ID="SnapWidget.__saveImage"></a>
207 <h4>SnapWidget.__saveImage</h4>
208 <b>__saveImage</b>(<i>fileName</i>)
209
210 <p>
211 Private method to save the snapshot.
212 </p>
213 <dl>
214
215 <dt><i>fileName</i></dt>
216 <dd>
217 name of the file to save to (string)
218 </dd>
219 </dl>
220 <dl>
221 <dt>Return:</dt>
222 <dd>
223 flag indicating success (boolean)
224 </dd>
225 </dl>
226 <a NAME="SnapWidget.__updateCaption" ID="SnapWidget.__updateCaption"></a>
227 <h4>SnapWidget.__updateCaption</h4>
228 <b>__updateCaption</b>(<i></i>)
229
230 <p>
231 Private method to update the window caption.
232 </p>
233 <a NAME="SnapWidget.__updatePreview" ID="SnapWidget.__updatePreview"></a>
234 <h4>SnapWidget.__updatePreview</h4>
235 <b>__updatePreview</b>(<i></i>)
236
237 <p>
238 Private slot to update the preview picture.
239 </p>
240 <a NAME="SnapWidget.closeEvent" ID="SnapWidget.closeEvent"></a>
241 <h4>SnapWidget.closeEvent</h4>
242 <b>closeEvent</b>(<i>evt</i>)
243
244 <p>
245 Protected method handling the close event.
246 </p>
247 <dl>
248
249 <dt><i>evt</i></dt>
250 <dd>
251 close event (QCloseEvent)
252 </dd>
253 </dl>
254 <a NAME="SnapWidget.on_copyButton_clicked" ID="SnapWidget.on_copyButton_clicked"></a>
255 <h4>SnapWidget.on_copyButton_clicked</h4>
256 <b>on_copyButton_clicked</b>(<i></i>)
257
258 <p>
259 Private slot to copy the snapshot to the clipboard.
260 </p>
261 <a NAME="SnapWidget.on_copyPreviewButton_clicked" ID="SnapWidget.on_copyPreviewButton_clicked"></a>
262 <h4>SnapWidget.on_copyPreviewButton_clicked</h4>
263 <b>on_copyPreviewButton_clicked</b>(<i></i>)
264
265 <p>
266 Private slot to copy the snapshot preview to the clipboard.
267 </p>
268 <a NAME="SnapWidget.on_modeCombo_currentIndexChanged" ID="SnapWidget.on_modeCombo_currentIndexChanged"></a>
269 <h4>SnapWidget.on_modeCombo_currentIndexChanged</h4>
270 <b>on_modeCombo_currentIndexChanged</b>(<i>index</i>)
271
272 <p>
273 Private slot handling the selection of a screenshot mode.
274 </p>
275 <dl>
276
277 <dt><i>index</i> (int)</dt>
278 <dd>
279 index of the selection
280 </dd>
281 </dl>
282 <a NAME="SnapWidget.on_saveButton_clicked" ID="SnapWidget.on_saveButton_clicked"></a>
283 <h4>SnapWidget.on_saveButton_clicked</h4>
284 <b>on_saveButton_clicked</b>(<i></i>)
285
286 <p>
287 Private slot to save the snapshot.
288 </p>
289 <a NAME="SnapWidget.on_takeButton_clicked" ID="SnapWidget.on_takeButton_clicked"></a>
290 <h4>SnapWidget.on_takeButton_clicked</h4>
291 <b>on_takeButton_clicked</b>(<i></i>)
292
293 <p>
294 Private slot to take a snapshot.
295 </p>
296 <a NAME="SnapWidget.resizeEvent" ID="SnapWidget.resizeEvent"></a>
297 <h4>SnapWidget.resizeEvent</h4>
298 <b>resizeEvent</b>(<i>evt</i>)
299
300 <p>
301 Protected method handling a resizing of the window.
302 </p>
303 <dl>
304
305 <dt><i>evt</i></dt>
306 <dd>
307 resize event (QResizeEvent)
308 </dd>
309 </dl>
310 <div align="right"><a href="#top">Up</a></div>
311 <hr />
312 </body></html>

eric ide

mercurial