5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.EricWidgets.EricMessageBox</h1> |
9 <h1>eric7.EricWidgets.EricMessageBox</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing QMessageBox replacements and more convenience function. |
11 Module implementing QMessageBox replacements and more convenience function. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
15 <table> |
16 <table> |
16 <tr><td>Abort</td></tr> |
17 <tr><td>Abort</td></tr><tr><td>AcceptRole</td></tr><tr><td>ActionRole</td></tr><tr><td>Apply</td></tr><tr><td>ApplyRole</td></tr><tr><td>Cancel</td></tr><tr><td>Close</td></tr><tr><td>Critical</td></tr><tr><td>DestructiveRole</td></tr><tr><td>Discard</td></tr><tr><td>Help</td></tr><tr><td>HelpRole</td></tr><tr><td>Ignore</td></tr><tr><td>Information</td></tr><tr><td>InvalidRole</td></tr><tr><td>No</td></tr><tr><td>NoButton</td></tr><tr><td>NoIcon</td></tr><tr><td>NoRole</td></tr><tr><td>NoToAll</td></tr><tr><td>Ok</td></tr><tr><td>Open</td></tr><tr><td>Question</td></tr><tr><td>RejectRole</td></tr><tr><td>Reset</td></tr><tr><td>ResetRole</td></tr><tr><td>RestoreDefaults</td></tr><tr><td>Retry</td></tr><tr><td>Save</td></tr><tr><td>SaveAll</td></tr><tr><td>Warning</td></tr><tr><td>Yes</td></tr><tr><td>YesRole</td></tr><tr><td>YesToAll</td></tr><tr><td>about</td></tr><tr><td>aboutQt</td></tr> |
17 <tr><td>AcceptRole</td></tr> |
18 </table> |
18 <tr><td>ActionRole</td></tr> |
|
19 <tr><td>Apply</td></tr> |
|
20 <tr><td>ApplyRole</td></tr> |
|
21 <tr><td>Cancel</td></tr> |
|
22 <tr><td>Close</td></tr> |
|
23 <tr><td>Critical</td></tr> |
|
24 <tr><td>DestructiveRole</td></tr> |
|
25 <tr><td>Discard</td></tr> |
|
26 <tr><td>Help</td></tr> |
|
27 <tr><td>HelpRole</td></tr> |
|
28 <tr><td>Ignore</td></tr> |
|
29 <tr><td>Information</td></tr> |
|
30 <tr><td>InvalidRole</td></tr> |
|
31 <tr><td>No</td></tr> |
|
32 <tr><td>NoButton</td></tr> |
|
33 <tr><td>NoIcon</td></tr> |
|
34 <tr><td>NoRole</td></tr> |
|
35 <tr><td>NoToAll</td></tr> |
|
36 <tr><td>Ok</td></tr> |
|
37 <tr><td>Open</td></tr> |
|
38 <tr><td>Question</td></tr> |
|
39 <tr><td>RejectRole</td></tr> |
|
40 <tr><td>Reset</td></tr> |
|
41 <tr><td>ResetRole</td></tr> |
|
42 <tr><td>RestoreDefaults</td></tr> |
|
43 <tr><td>Retry</td></tr> |
|
44 <tr><td>Save</td></tr> |
|
45 <tr><td>SaveAll</td></tr> |
|
46 <tr><td>Warning</td></tr> |
|
47 <tr><td>Yes</td></tr> |
|
48 <tr><td>YesRole</td></tr> |
|
49 <tr><td>YesToAll</td></tr> |
|
50 <tr><td>about</td></tr> |
|
51 <tr><td>aboutQt</td></tr> |
|
52 </table> |
|
53 |
19 <h3>Classes</h3> |
54 <h3>Classes</h3> |
20 |
55 <table> |
21 <table> |
|
22 |
|
23 <tr> |
56 <tr> |
24 <td><a href="#EricMessageBox">EricMessageBox</a></td> |
57 <td><a href="#EricMessageBox">EricMessageBox</a></td> |
25 <td>Class implementing a replacement for QMessageBox.</td> |
58 <td>Class implementing a replacement for QMessageBox.</td> |
26 </tr> |
59 </tr> |
27 </table> |
60 </table> |
|
61 |
28 <h3>Functions</h3> |
62 <h3>Functions</h3> |
29 |
63 <table> |
30 <table> |
|
31 |
|
32 <tr> |
64 <tr> |
33 <td><a href="#__messageBox">__messageBox</a></td> |
65 <td><a href="#__messageBox">__messageBox</a></td> |
34 <td>Private module function to show a modal message box.</td> |
66 <td>Private module function to show a modal message box.</td> |
35 </tr> |
67 </tr> |
36 <tr> |
68 <tr> |
60 <tr> |
92 <tr> |
61 <td><a href="#yesNo">yesNo</a></td> |
93 <td><a href="#yesNo">yesNo</a></td> |
62 <td>Function to show a model yes/no message box.</td> |
94 <td>Function to show a model yes/no message box.</td> |
63 </tr> |
95 </tr> |
64 </table> |
96 </table> |
|
97 |
65 <hr /> |
98 <hr /> |
66 <hr /> |
99 <hr /> |
67 <a NAME="EricMessageBox" ID="EricMessageBox"></a> |
100 <a NAME="EricMessageBox" ID="EricMessageBox"></a> |
68 <h2>EricMessageBox</h2> |
101 <h2>EricMessageBox</h2> |
69 |
|
70 <p> |
102 <p> |
71 Class implementing a replacement for QMessageBox. |
103 Class implementing a replacement for QMessageBox. |
72 </p> |
104 </p> |
|
105 |
73 <h3>Derived from</h3> |
106 <h3>Derived from</h3> |
74 QMessageBox |
107 QMessageBox |
75 <h3>Class Attributes</h3> |
108 <h3>Class Attributes</h3> |
76 |
|
77 <table> |
109 <table> |
78 <tr><td>None</td></tr> |
110 <tr><td>None</td></tr> |
79 </table> |
111 </table> |
|
112 |
80 <h3>Class Methods</h3> |
113 <h3>Class Methods</h3> |
81 |
|
82 <table> |
114 <table> |
83 <tr><td>None</td></tr> |
115 <tr><td>None</td></tr> |
84 </table> |
116 </table> |
|
117 |
85 <h3>Methods</h3> |
118 <h3>Methods</h3> |
86 |
119 <table> |
87 <table> |
|
88 |
|
89 <tr> |
120 <tr> |
90 <td><a href="#EricMessageBox.__init__">EricMessageBox</a></td> |
121 <td><a href="#EricMessageBox.__init__">EricMessageBox</a></td> |
91 <td>Constructor</td> |
122 <td>Constructor</td> |
92 </tr> |
123 </tr> |
93 </table> |
124 </table> |
|
125 |
94 <h3>Static Methods</h3> |
126 <h3>Static Methods</h3> |
95 |
|
96 <table> |
127 <table> |
97 <tr><td>None</td></tr> |
128 <tr><td>None</td></tr> |
98 </table> |
129 </table> |
|
130 |
99 |
131 |
100 <a NAME="EricMessageBox.__init__" ID="EricMessageBox.__init__"></a> |
132 <a NAME="EricMessageBox.__init__" ID="EricMessageBox.__init__"></a> |
101 <h4>EricMessageBox (Constructor)</h4> |
133 <h4>EricMessageBox (Constructor)</h4> |
102 <b>EricMessageBox</b>(<i>icon, title, text, modal=False, buttons=QMessageBox.StandardButton.NoButton, parent=None, </i>) |
134 <b>EricMessageBox</b>(<i>icon, title, text, modal=False, buttons=QMessageBox.StandardButton.NoButton, parent=None, </i>) |
103 |
|
104 <p> |
135 <p> |
105 Constructor |
136 Constructor |
106 </p> |
137 </p> |
|
138 |
107 <dl> |
139 <dl> |
108 |
140 |
109 <dt><i>icon</i> (QMessageBox.Icon)</dt> |
141 <dt><i>icon</i> (QMessageBox.Icon)</dt> |
110 <dd> |
142 <dd> |
111 type of icon to be shown |
143 type of icon to be shown |
135 <hr /> |
167 <hr /> |
136 <hr /> |
168 <hr /> |
137 <a NAME="__messageBox" ID="__messageBox"></a> |
169 <a NAME="__messageBox" ID="__messageBox"></a> |
138 <h2>__messageBox</h2> |
170 <h2>__messageBox</h2> |
139 <b>__messageBox</b>(<i>parent, title, text, icon, buttons=QMessageBox.StandardButton.Ok, defaultButton=QMessageBox.StandardButton.NoButton, textFormat=Qt.TextFormat.AutoText, </i>) |
171 <b>__messageBox</b>(<i>parent, title, text, icon, buttons=QMessageBox.StandardButton.Ok, defaultButton=QMessageBox.StandardButton.NoButton, textFormat=Qt.TextFormat.AutoText, </i>) |
140 |
|
141 <p> |
172 <p> |
142 Private module function to show a modal message box. |
173 Private module function to show a modal message box. |
143 </p> |
174 </p> |
|
175 |
144 <dl> |
176 <dl> |
145 |
177 |
146 <dt><i>parent</i> (QWidget)</dt> |
178 <dt><i>parent</i> (QWidget)</dt> |
147 <dd> |
179 <dd> |
148 parent widget of the message box |
180 parent widget of the message box |
188 <hr /> |
220 <hr /> |
189 <hr /> |
221 <hr /> |
190 <a NAME="critical" ID="critical"></a> |
222 <a NAME="critical" ID="critical"></a> |
191 <h2>critical</h2> |
223 <h2>critical</h2> |
192 <b>critical</b>(<i>parent, title, text, buttons=QMessageBox.StandardButton.Ok, defaultButton=QMessageBox.StandardButton.NoButton, </i>) |
224 <b>critical</b>(<i>parent, title, text, buttons=QMessageBox.StandardButton.Ok, defaultButton=QMessageBox.StandardButton.NoButton, </i>) |
193 |
|
194 <p> |
225 <p> |
195 Function to show a modal critical message box. |
226 Function to show a modal critical message box. |
196 </p> |
227 </p> |
|
228 |
197 <dl> |
229 <dl> |
198 |
230 |
199 <dt><i>parent</i> (QWidget)</dt> |
231 <dt><i>parent</i> (QWidget)</dt> |
200 <dd> |
232 <dd> |
201 parent widget of the message box |
233 parent widget of the message box |
233 <hr /> |
265 <hr /> |
234 <hr /> |
266 <hr /> |
235 <a NAME="information" ID="information"></a> |
267 <a NAME="information" ID="information"></a> |
236 <h2>information</h2> |
268 <h2>information</h2> |
237 <b>information</b>(<i>parent, title, text, buttons=QMessageBox.StandardButton.Ok, defaultButton=QMessageBox.StandardButton.NoButton, </i>) |
269 <b>information</b>(<i>parent, title, text, buttons=QMessageBox.StandardButton.Ok, defaultButton=QMessageBox.StandardButton.NoButton, </i>) |
238 |
|
239 <p> |
270 <p> |
240 Function to show a modal information message box. |
271 Function to show a modal information message box. |
241 </p> |
272 </p> |
|
273 |
242 <dl> |
274 <dl> |
243 |
275 |
244 <dt><i>parent</i> (QWidget)</dt> |
276 <dt><i>parent</i> (QWidget)</dt> |
245 <dd> |
277 <dd> |
246 parent widget of the message box |
278 parent widget of the message box |
278 <hr /> |
310 <hr /> |
279 <hr /> |
311 <hr /> |
280 <a NAME="okToClearData" ID="okToClearData"></a> |
312 <a NAME="okToClearData" ID="okToClearData"></a> |
281 <h2>okToClearData</h2> |
313 <h2>okToClearData</h2> |
282 <b>okToClearData</b>(<i>parent, title, text, saveFunc, textFormat=Qt.TextFormat.AutoText</i>) |
314 <b>okToClearData</b>(<i>parent, title, text, saveFunc, textFormat=Qt.TextFormat.AutoText</i>) |
283 |
|
284 <p> |
315 <p> |
285 Function to show a modal message box to ask for clearing the data. |
316 Function to show a modal message box to ask for clearing the data. |
286 </p> |
317 </p> |
|
318 |
287 <dl> |
319 <dl> |
288 |
320 |
289 <dt><i>parent</i> (QWidget)</dt> |
321 <dt><i>parent</i> (QWidget)</dt> |
290 <dd> |
322 <dd> |
291 parent widget of the message box |
323 parent widget of the message box |
324 <hr /> |
356 <hr /> |
325 <hr /> |
357 <hr /> |
326 <a NAME="question" ID="question"></a> |
358 <a NAME="question" ID="question"></a> |
327 <h2>question</h2> |
359 <h2>question</h2> |
328 <b>question</b>(<i>parent, title, text, buttons=QMessageBox.StandardButton.Ok, defaultButton=QMessageBox.StandardButton.NoButton, </i>) |
360 <b>question</b>(<i>parent, title, text, buttons=QMessageBox.StandardButton.Ok, defaultButton=QMessageBox.StandardButton.NoButton, </i>) |
329 |
|
330 <p> |
361 <p> |
331 Function to show a modal question message box. |
362 Function to show a modal question message box. |
332 </p> |
363 </p> |
|
364 |
333 <dl> |
365 <dl> |
334 |
366 |
335 <dt><i>parent</i> (QWidget)</dt> |
367 <dt><i>parent</i> (QWidget)</dt> |
336 <dd> |
368 <dd> |
337 parent widget of the message box |
369 parent widget of the message box |
369 <hr /> |
401 <hr /> |
370 <hr /> |
402 <hr /> |
371 <a NAME="retryAbort" ID="retryAbort"></a> |
403 <a NAME="retryAbort" ID="retryAbort"></a> |
372 <h2>retryAbort</h2> |
404 <h2>retryAbort</h2> |
373 <b>retryAbort</b>(<i>parent, title, text, icon=Question, textFormat=Qt.TextFormat.AutoText</i>) |
405 <b>retryAbort</b>(<i>parent, title, text, icon=Question, textFormat=Qt.TextFormat.AutoText</i>) |
374 |
|
375 <p> |
406 <p> |
376 Function to show a model abort/retry message box. |
407 Function to show a model abort/retry message box. |
377 </p> |
408 </p> |
|
409 |
378 <dl> |
410 <dl> |
379 |
411 |
380 <dt><i>parent</i> (QWidget)</dt> |
412 <dt><i>parent</i> (QWidget)</dt> |
381 <dd> |
413 <dd> |
382 parent widget of the message box |
414 parent widget of the message box |
422 <hr /> |
454 <hr /> |
423 <hr /> |
455 <hr /> |
424 <a NAME="warning" ID="warning"></a> |
456 <a NAME="warning" ID="warning"></a> |
425 <h2>warning</h2> |
457 <h2>warning</h2> |
426 <b>warning</b>(<i>parent, title, text, buttons=QMessageBox.StandardButton.Ok, defaultButton=QMessageBox.StandardButton.NoButton, </i>) |
458 <b>warning</b>(<i>parent, title, text, buttons=QMessageBox.StandardButton.Ok, defaultButton=QMessageBox.StandardButton.NoButton, </i>) |
427 |
|
428 <p> |
459 <p> |
429 Function to show a modal warning message box. |
460 Function to show a modal warning message box. |
430 </p> |
461 </p> |
|
462 |
431 <dl> |
463 <dl> |
432 |
464 |
433 <dt><i>parent</i> (QWidget)</dt> |
465 <dt><i>parent</i> (QWidget)</dt> |
434 <dd> |
466 <dd> |
435 parent widget of the message box |
467 parent widget of the message box |
467 <hr /> |
499 <hr /> |
468 <hr /> |
500 <hr /> |
469 <a NAME="yesNo" ID="yesNo"></a> |
501 <a NAME="yesNo" ID="yesNo"></a> |
470 <h2>yesNo</h2> |
502 <h2>yesNo</h2> |
471 <b>yesNo</b>(<i>parent, title, text, icon=Question, yesDefault=False, textFormat=Qt.TextFormat.AutoText, </i>) |
503 <b>yesNo</b>(<i>parent, title, text, icon=Question, yesDefault=False, textFormat=Qt.TextFormat.AutoText, </i>) |
472 |
|
473 <p> |
504 <p> |
474 Function to show a model yes/no message box. |
505 Function to show a model yes/no message box. |
475 </p> |
506 </p> |
|
507 |
476 <dl> |
508 <dl> |
477 |
509 |
478 <dt><i>parent</i> (QWidget)</dt> |
510 <dt><i>parent</i> (QWidget)</dt> |
479 <dd> |
511 <dd> |
480 parent widget of the message box |
512 parent widget of the message box |