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