|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.E5Gui.E5FileSaveConfirmDialog</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.E5FileSaveConfirmDialog</h1> |
|
23 <p> |
|
24 Module implementing a dialog to enter a file system path using a file picker. |
|
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="#E5FileSaveConfirmDialog">E5FileSaveConfirmDialog</a></td> |
|
34 <td>Class implementing a dialog to enter a file system path using a file picker.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr> |
|
40 <td><a href="#confirmOverwrite">confirmOverwrite</a></td> |
|
41 <td>Function to confirm that a file shall be overwritten.</td> |
|
42 </tr> |
|
43 </table> |
|
44 <hr /><hr /> |
|
45 <a NAME="E5FileSaveConfirmDialog" ID="E5FileSaveConfirmDialog"></a> |
|
46 <h2>E5FileSaveConfirmDialog</h2> |
|
47 <p> |
|
48 Class implementing a dialog to enter a file system path using a file |
|
49 picker. |
|
50 </p> |
|
51 <h3>Derived from</h3> |
|
52 QDialog |
|
53 <h3>Class Attributes</h3> |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Class Methods</h3> |
|
58 <table> |
|
59 <tr><td>None</td></tr> |
|
60 </table> |
|
61 <h3>Methods</h3> |
|
62 <table> |
|
63 <tr> |
|
64 <td><a href="#E5FileSaveConfirmDialog.__init__">E5FileSaveConfirmDialog</a></td> |
|
65 <td>Constructor</td> |
|
66 </tr><tr> |
|
67 <td><a href="#E5FileSaveConfirmDialog.__buttonBoxClicked">__buttonBoxClicked</a></td> |
|
68 <td>Private slot to handle the user clicking a button.</td> |
|
69 </tr><tr> |
|
70 <td><a href="#E5FileSaveConfirmDialog.__filenameChanged">__filenameChanged</a></td> |
|
71 <td>Private slot to handle a change of the file name.</td> |
|
72 </tr><tr> |
|
73 <td><a href="#E5FileSaveConfirmDialog.selectedAction">selectedAction</a></td> |
|
74 <td>Public method to get the selected action and associated data.</td> |
|
75 </tr> |
|
76 </table> |
|
77 <h3>Static Methods</h3> |
|
78 <table> |
|
79 <tr><td>None</td></tr> |
|
80 </table> |
|
81 <a NAME="E5FileSaveConfirmDialog.__init__" ID="E5FileSaveConfirmDialog.__init__"></a> |
|
82 <h4>E5FileSaveConfirmDialog (Constructor)</h4> |
|
83 <b>E5FileSaveConfirmDialog</b>(<i>filename, title, message="", picker=True, parent=None</i>) |
|
84 <p> |
|
85 Constructor |
|
86 </p><dl> |
|
87 <dt><i>filename</i> (str)</dt> |
|
88 <dd> |
|
89 file name to be shown |
|
90 </dd><dt><i>title</i> (str)</dt> |
|
91 <dd> |
|
92 title for the dialog |
|
93 </dd><dt><i>message</i> (str)</dt> |
|
94 <dd> |
|
95 message to be shown |
|
96 </dd><dt><i>picker</i> (bool)</dt> |
|
97 <dd> |
|
98 flag indicating to use a path picker |
|
99 </dd><dt><i>parent</i> (QWidget)</dt> |
|
100 <dd> |
|
101 reference to the parent widget |
|
102 </dd> |
|
103 </dl><a NAME="E5FileSaveConfirmDialog.__buttonBoxClicked" ID="E5FileSaveConfirmDialog.__buttonBoxClicked"></a> |
|
104 <h4>E5FileSaveConfirmDialog.__buttonBoxClicked</h4> |
|
105 <b>__buttonBoxClicked</b>(<i>button</i>) |
|
106 <p> |
|
107 Private slot to handle the user clicking a button. |
|
108 </p><dl> |
|
109 <dt><i>button</i> (QAbstractButton)</dt> |
|
110 <dd> |
|
111 reference to the clicked button |
|
112 </dd> |
|
113 </dl><a NAME="E5FileSaveConfirmDialog.__filenameChanged" ID="E5FileSaveConfirmDialog.__filenameChanged"></a> |
|
114 <h4>E5FileSaveConfirmDialog.__filenameChanged</h4> |
|
115 <b>__filenameChanged</b>(<i>text</i>) |
|
116 <p> |
|
117 Private slot to handle a change of the file name. |
|
118 </p><dl> |
|
119 <dt><i>text</i> (str)</dt> |
|
120 <dd> |
|
121 new file name |
|
122 </dd> |
|
123 </dl><a NAME="E5FileSaveConfirmDialog.selectedAction" ID="E5FileSaveConfirmDialog.selectedAction"></a> |
|
124 <h4>E5FileSaveConfirmDialog.selectedAction</h4> |
|
125 <b>selectedAction</b>(<i></i>) |
|
126 <p> |
|
127 Public method to get the selected action and associated data. |
|
128 </p><dl> |
|
129 <dt>Returns:</dt> |
|
130 <dd> |
|
131 tuple containing the selected action (cancel, rename, |
|
132 overwrite) and the filename (in case of 'rename' or 'overwrite') |
|
133 </dd> |
|
134 </dl><dl> |
|
135 <dt>Return Type:</dt> |
|
136 <dd> |
|
137 tuple of (str, str) |
|
138 </dd> |
|
139 </dl> |
|
140 <div align="right"><a href="#top">Up</a></div> |
|
141 <hr /><hr /> |
|
142 <a NAME="confirmOverwrite" ID="confirmOverwrite"></a> |
|
143 <h2>confirmOverwrite</h2> |
|
144 <b>confirmOverwrite</b>(<i>filename, title, message="", picker=True, parent=None</i>) |
|
145 <p> |
|
146 Function to confirm that a file shall be overwritten. |
|
147 </p><dl> |
|
148 <dt><i>filename</i> (str)</dt> |
|
149 <dd> |
|
150 file name to be shown |
|
151 </dd><dt><i>title</i> (str)</dt> |
|
152 <dd> |
|
153 title for the dialog |
|
154 </dd><dt><i>message</i> (str)</dt> |
|
155 <dd> |
|
156 message to be shown |
|
157 </dd><dt><i>picker</i> (bool)</dt> |
|
158 <dd> |
|
159 flag indicating to use a path picker |
|
160 </dd><dt><i>parent</i> (QWidget)</dt> |
|
161 <dd> |
|
162 reference to the parent widget |
|
163 </dd> |
|
164 </dl><dl> |
|
165 <dt>Returns:</dt> |
|
166 <dd> |
|
167 tuple containing the selected action (cancel, rename, |
|
168 overwrite) and the filename (in case of 'rename' or 'overwrite') |
|
169 </dd> |
|
170 </dl><dl> |
|
171 <dt>Return Type:</dt> |
|
172 <dd> |
|
173 tuple of (str, str) |
|
174 </dd> |
|
175 </dl> |
|
176 <div align="right"><a href="#top">Up</a></div> |
|
177 <hr /> |
|
178 </body></html> |