16 |
16 |
17 a { color: #BA6D36; } |
17 a { color: #BA6D36; } |
18 |
18 |
19 </style> |
19 </style> |
20 </head> |
20 </head> |
21 <body><a NAME="top" ID="top"></a> |
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
22 <h1>eric6.E5Gui.E5FileSaveConfirmDialog</h1> |
23 <h1>eric6.E5Gui.E5FileSaveConfirmDialog</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing a dialog to enter a file system path using a file picker. |
26 Module implementing a dialog to enter a file system path using a file picker. |
25 </p> |
27 </p> |
26 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
|
29 |
27 <table> |
30 <table> |
28 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
29 </table> |
32 </table> |
30 <h3>Classes</h3> |
33 <h3>Classes</h3> |
31 <table> |
34 |
|
35 <table> |
|
36 |
32 <tr> |
37 <tr> |
33 <td><a href="#E5FileSaveConfirmDialog">E5FileSaveConfirmDialog</a></td> |
38 <td><a href="#E5FileSaveConfirmDialog">E5FileSaveConfirmDialog</a></td> |
34 <td>Class implementing a dialog to enter a file system path using a file picker.</td> |
39 <td>Class implementing a dialog to enter a file system path using a file picker.</td> |
35 </tr> |
40 </tr> |
36 </table> |
41 </table> |
37 <h3>Functions</h3> |
42 <h3>Functions</h3> |
38 <table> |
43 |
|
44 <table> |
|
45 |
39 <tr> |
46 <tr> |
40 <td><a href="#confirmOverwrite">confirmOverwrite</a></td> |
47 <td><a href="#confirmOverwrite">confirmOverwrite</a></td> |
41 <td>Function to confirm that a file shall be overwritten.</td> |
48 <td>Function to confirm that a file shall be overwritten.</td> |
42 </tr> |
49 </tr> |
43 </table> |
50 </table> |
44 <hr /><hr /> |
51 <hr /> |
|
52 <hr /> |
45 <a NAME="E5FileSaveConfirmDialog" ID="E5FileSaveConfirmDialog"></a> |
53 <a NAME="E5FileSaveConfirmDialog" ID="E5FileSaveConfirmDialog"></a> |
46 <h2>E5FileSaveConfirmDialog</h2> |
54 <h2>E5FileSaveConfirmDialog</h2> |
|
55 |
47 <p> |
56 <p> |
48 Class implementing a dialog to enter a file system path using a file |
57 Class implementing a dialog to enter a file system path using a file |
49 picker. |
58 picker. |
50 </p> |
59 </p> |
51 <h3>Derived from</h3> |
60 <h3>Derived from</h3> |
52 QDialog |
61 QDialog |
53 <h3>Class Attributes</h3> |
62 <h3>Class Attributes</h3> |
|
63 |
54 <table> |
64 <table> |
55 <tr><td>None</td></tr> |
65 <tr><td>None</td></tr> |
56 </table> |
66 </table> |
57 <h3>Class Methods</h3> |
67 <h3>Class Methods</h3> |
|
68 |
58 <table> |
69 <table> |
59 <tr><td>None</td></tr> |
70 <tr><td>None</td></tr> |
60 </table> |
71 </table> |
61 <h3>Methods</h3> |
72 <h3>Methods</h3> |
62 <table> |
73 |
|
74 <table> |
|
75 |
63 <tr> |
76 <tr> |
64 <td><a href="#E5FileSaveConfirmDialog.__init__">E5FileSaveConfirmDialog</a></td> |
77 <td><a href="#E5FileSaveConfirmDialog.__init__">E5FileSaveConfirmDialog</a></td> |
65 <td>Constructor</td> |
78 <td>Constructor</td> |
66 </tr><tr> |
79 </tr> |
|
80 <tr> |
67 <td><a href="#E5FileSaveConfirmDialog.__buttonBoxClicked">__buttonBoxClicked</a></td> |
81 <td><a href="#E5FileSaveConfirmDialog.__buttonBoxClicked">__buttonBoxClicked</a></td> |
68 <td>Private slot to handle the user clicking a button.</td> |
82 <td>Private slot to handle the user clicking a button.</td> |
69 </tr><tr> |
83 </tr> |
|
84 <tr> |
70 <td><a href="#E5FileSaveConfirmDialog.__filenameChanged">__filenameChanged</a></td> |
85 <td><a href="#E5FileSaveConfirmDialog.__filenameChanged">__filenameChanged</a></td> |
71 <td>Private slot to handle a change of the file name.</td> |
86 <td>Private slot to handle a change of the file name.</td> |
72 </tr><tr> |
87 </tr> |
|
88 <tr> |
73 <td><a href="#E5FileSaveConfirmDialog.selectedAction">selectedAction</a></td> |
89 <td><a href="#E5FileSaveConfirmDialog.selectedAction">selectedAction</a></td> |
74 <td>Public method to get the selected action and associated data.</td> |
90 <td>Public method to get the selected action and associated data.</td> |
75 </tr> |
91 </tr> |
76 </table> |
92 </table> |
77 <h3>Static Methods</h3> |
93 <h3>Static Methods</h3> |
78 <table> |
94 |
79 <tr><td>None</td></tr> |
95 <table> |
80 </table> |
96 <tr><td>None</td></tr> |
|
97 </table> |
|
98 |
81 <a NAME="E5FileSaveConfirmDialog.__init__" ID="E5FileSaveConfirmDialog.__init__"></a> |
99 <a NAME="E5FileSaveConfirmDialog.__init__" ID="E5FileSaveConfirmDialog.__init__"></a> |
82 <h4>E5FileSaveConfirmDialog (Constructor)</h4> |
100 <h4>E5FileSaveConfirmDialog (Constructor)</h4> |
83 <b>E5FileSaveConfirmDialog</b>(<i>filename, title, message="", picker=True, parent=None</i>) |
101 <b>E5FileSaveConfirmDialog</b>(<i>filename, title, message="", picker=True, parent=None</i>) |
|
102 |
84 <p> |
103 <p> |
85 Constructor |
104 Constructor |
86 </p><dl> |
105 </p> |
|
106 <dl> |
|
107 |
87 <dt><i>filename</i> (str)</dt> |
108 <dt><i>filename</i> (str)</dt> |
88 <dd> |
109 <dd> |
89 file name to be shown |
110 file name to be shown |
90 </dd><dt><i>title</i> (str)</dt> |
111 </dd> |
|
112 <dt><i>title</i> (str)</dt> |
91 <dd> |
113 <dd> |
92 title for the dialog |
114 title for the dialog |
93 </dd><dt><i>message</i> (str)</dt> |
115 </dd> |
|
116 <dt><i>message</i> (str)</dt> |
94 <dd> |
117 <dd> |
95 message to be shown |
118 message to be shown |
96 </dd><dt><i>picker</i> (bool)</dt> |
119 </dd> |
|
120 <dt><i>picker</i> (bool)</dt> |
97 <dd> |
121 <dd> |
98 flag indicating to use a path picker |
122 flag indicating to use a path picker |
99 </dd><dt><i>parent</i> (QWidget)</dt> |
123 </dd> |
|
124 <dt><i>parent</i> (QWidget)</dt> |
100 <dd> |
125 <dd> |
101 reference to the parent widget |
126 reference to the parent widget |
102 </dd> |
127 </dd> |
103 </dl><a NAME="E5FileSaveConfirmDialog.__buttonBoxClicked" ID="E5FileSaveConfirmDialog.__buttonBoxClicked"></a> |
128 </dl> |
|
129 <a NAME="E5FileSaveConfirmDialog.__buttonBoxClicked" ID="E5FileSaveConfirmDialog.__buttonBoxClicked"></a> |
104 <h4>E5FileSaveConfirmDialog.__buttonBoxClicked</h4> |
130 <h4>E5FileSaveConfirmDialog.__buttonBoxClicked</h4> |
105 <b>__buttonBoxClicked</b>(<i>button</i>) |
131 <b>__buttonBoxClicked</b>(<i>button</i>) |
|
132 |
106 <p> |
133 <p> |
107 Private slot to handle the user clicking a button. |
134 Private slot to handle the user clicking a button. |
108 </p><dl> |
135 </p> |
|
136 <dl> |
|
137 |
109 <dt><i>button</i> (QAbstractButton)</dt> |
138 <dt><i>button</i> (QAbstractButton)</dt> |
110 <dd> |
139 <dd> |
111 reference to the clicked button |
140 reference to the clicked button |
112 </dd> |
141 </dd> |
113 </dl><a NAME="E5FileSaveConfirmDialog.__filenameChanged" ID="E5FileSaveConfirmDialog.__filenameChanged"></a> |
142 </dl> |
|
143 <a NAME="E5FileSaveConfirmDialog.__filenameChanged" ID="E5FileSaveConfirmDialog.__filenameChanged"></a> |
114 <h4>E5FileSaveConfirmDialog.__filenameChanged</h4> |
144 <h4>E5FileSaveConfirmDialog.__filenameChanged</h4> |
115 <b>__filenameChanged</b>(<i>text</i>) |
145 <b>__filenameChanged</b>(<i>text</i>) |
|
146 |
116 <p> |
147 <p> |
117 Private slot to handle a change of the file name. |
148 Private slot to handle a change of the file name. |
118 </p><dl> |
149 </p> |
|
150 <dl> |
|
151 |
119 <dt><i>text</i> (str)</dt> |
152 <dt><i>text</i> (str)</dt> |
120 <dd> |
153 <dd> |
121 new file name |
154 new file name |
122 </dd> |
155 </dd> |
123 </dl><a NAME="E5FileSaveConfirmDialog.selectedAction" ID="E5FileSaveConfirmDialog.selectedAction"></a> |
156 </dl> |
|
157 <a NAME="E5FileSaveConfirmDialog.selectedAction" ID="E5FileSaveConfirmDialog.selectedAction"></a> |
124 <h4>E5FileSaveConfirmDialog.selectedAction</h4> |
158 <h4>E5FileSaveConfirmDialog.selectedAction</h4> |
125 <b>selectedAction</b>(<i></i>) |
159 <b>selectedAction</b>(<i></i>) |
|
160 |
126 <p> |
161 <p> |
127 Public method to get the selected action and associated data. |
162 Public method to get the selected action and associated data. |
128 </p><dl> |
163 </p> |
|
164 <dl> |
129 <dt>Returns:</dt> |
165 <dt>Returns:</dt> |
130 <dd> |
166 <dd> |
131 tuple containing the selected action (cancel, rename, |
167 tuple containing the selected action (cancel, rename, |
132 overwrite) and the filename (in case of 'rename' or 'overwrite') |
168 overwrite) and the filename (in case of 'rename' or 'overwrite') |
133 </dd> |
169 </dd> |
134 </dl><dl> |
170 </dl> |
|
171 <dl> |
135 <dt>Return Type:</dt> |
172 <dt>Return Type:</dt> |
136 <dd> |
173 <dd> |
137 tuple of (str, str) |
174 tuple of (str, str) |
138 </dd> |
175 </dd> |
139 </dl> |
176 </dl> |
140 <div align="right"><a href="#top">Up</a></div> |
177 <div align="right"><a href="#top">Up</a></div> |
141 <hr /><hr /> |
178 <hr /> |
|
179 <hr /> |
142 <a NAME="confirmOverwrite" ID="confirmOverwrite"></a> |
180 <a NAME="confirmOverwrite" ID="confirmOverwrite"></a> |
143 <h2>confirmOverwrite</h2> |
181 <h2>confirmOverwrite</h2> |
144 <b>confirmOverwrite</b>(<i>filename, title, message="", picker=True, parent=None</i>) |
182 <b>confirmOverwrite</b>(<i>filename, title, message="", picker=True, parent=None</i>) |
|
183 |
145 <p> |
184 <p> |
146 Function to confirm that a file shall be overwritten. |
185 Function to confirm that a file shall be overwritten. |
147 </p><dl> |
186 </p> |
|
187 <dl> |
|
188 |
148 <dt><i>filename</i> (str)</dt> |
189 <dt><i>filename</i> (str)</dt> |
149 <dd> |
190 <dd> |
150 file name to be shown |
191 file name to be shown |
151 </dd><dt><i>title</i> (str)</dt> |
192 </dd> |
|
193 <dt><i>title</i> (str)</dt> |
152 <dd> |
194 <dd> |
153 title for the dialog |
195 title for the dialog |
154 </dd><dt><i>message</i> (str)</dt> |
196 </dd> |
|
197 <dt><i>message</i> (str)</dt> |
155 <dd> |
198 <dd> |
156 message to be shown |
199 message to be shown |
157 </dd><dt><i>picker</i> (bool)</dt> |
200 </dd> |
|
201 <dt><i>picker</i> (bool)</dt> |
158 <dd> |
202 <dd> |
159 flag indicating to use a path picker |
203 flag indicating to use a path picker |
160 </dd><dt><i>parent</i> (QWidget)</dt> |
204 </dd> |
|
205 <dt><i>parent</i> (QWidget)</dt> |
161 <dd> |
206 <dd> |
162 reference to the parent widget |
207 reference to the parent widget |
163 </dd> |
208 </dd> |
164 </dl><dl> |
209 </dl> |
|
210 <dl> |
165 <dt>Returns:</dt> |
211 <dt>Returns:</dt> |
166 <dd> |
212 <dd> |
167 tuple containing the selected action (cancel, rename, |
213 tuple containing the selected action (cancel, rename, |
168 overwrite) and the filename (in case of 'rename' or 'overwrite') |
214 overwrite) and the filename (in case of 'rename' or 'overwrite') |
169 </dd> |
215 </dd> |
170 </dl><dl> |
216 </dl> |
|
217 <dl> |
171 <dt>Return Type:</dt> |
218 <dt>Return Type:</dt> |
172 <dd> |
219 <dd> |
173 tuple of (str, str) |
220 tuple of (str, str) |
174 </dd> |
221 </dd> |
175 </dl> |
222 </dl> |