src/eric7/Documentation/Source/eric7.EricWidgets.EricPathPickerDialog.html

branch
eric7
changeset 9238
a7cbf3d61498
parent 9236
db53a9efe7ef
child 10479
856476537696
equal deleted inserted replaced
9237:03c714bd4ebf 9238:a7cbf3d61498
31 31
32 <tr> 32 <tr>
33 <td><a href="#getPath">getPath</a></td> 33 <td><a href="#getPath">getPath</a></td>
34 <td>Function to get a file or directory path from the user.</td> 34 <td>Function to get a file or directory path from the user.</td>
35 </tr> 35 </tr>
36 <tr>
37 <td><a href="#getStrPath">getStrPath</a></td>
38 <td>Function to get a file or directory path from the user.</td>
39 </tr>
36 </table> 40 </table>
37 <hr /> 41 <hr />
38 <hr /> 42 <hr />
39 <a NAME="EricPathPickerDialog" ID="EricPathPickerDialog"></a> 43 <a NAME="EricPathPickerDialog" ID="EricPathPickerDialog"></a>
40 <h2>EricPathPickerDialog</h2> 44 <h2>EricPathPickerDialog</h2>
63 <td><a href="#EricPathPickerDialog.__init__">EricPathPickerDialog</a></td> 67 <td><a href="#EricPathPickerDialog.__init__">EricPathPickerDialog</a></td>
64 <td>Constructor</td> 68 <td>Constructor</td>
65 </tr> 69 </tr>
66 <tr> 70 <tr>
67 <td><a href="#EricPathPickerDialog.getPath">getPath</a></td> 71 <td><a href="#EricPathPickerDialog.getPath">getPath</a></td>
68 <td>Public method to get the current path.</td> 72 <td>Public method to get the current path as a pathlib.Path object.</td>
73 </tr>
74 <tr>
75 <td><a href="#EricPathPickerDialog.getText">getText</a></td>
76 <td>Public method to get the current path as text.</td>
69 </tr> 77 </tr>
70 <tr> 78 <tr>
71 <td><a href="#EricPathPickerDialog.setDefaultDirectory">setDefaultDirectory</a></td> 79 <td><a href="#EricPathPickerDialog.setDefaultDirectory">setDefaultDirectory</a></td>
72 <td>Public method to set the default directory of the path picker.</td> 80 <td>Public method to set the default directory of the path picker.</td>
73 </tr> 81 </tr>
115 <a NAME="EricPathPickerDialog.getPath" ID="EricPathPickerDialog.getPath"></a> 123 <a NAME="EricPathPickerDialog.getPath" ID="EricPathPickerDialog.getPath"></a>
116 <h4>EricPathPickerDialog.getPath</h4> 124 <h4>EricPathPickerDialog.getPath</h4>
117 <b>getPath</b>(<i></i>) 125 <b>getPath</b>(<i></i>)
118 126
119 <p> 127 <p>
120 Public method to get the current path. 128 Public method to get the current path as a pathlib.Path object.
129 </p>
130 <dl>
131 <dt>Return:</dt>
132 <dd>
133 current path
134 </dd>
135 </dl>
136 <dl>
137 <dt>Return Type:</dt>
138 <dd>
139 pathlib.Path
140 </dd>
141 </dl>
142 <a NAME="EricPathPickerDialog.getText" ID="EricPathPickerDialog.getText"></a>
143 <h4>EricPathPickerDialog.getText</h4>
144 <b>getText</b>(<i></i>)
145
146 <p>
147 Public method to get the current path as text.
121 </p> 148 </p>
122 <dl> 149 <dl>
123 <dt>Return:</dt> 150 <dt>Return:</dt>
124 <dd> 151 <dd>
125 current path 152 current path
138 <p> 165 <p>
139 Public method to set the default directory of the path picker. 166 Public method to set the default directory of the path picker.
140 </p> 167 </p>
141 <dl> 168 <dl>
142 169
143 <dt><i>directory</i> (str)</dt> 170 <dt><i>directory</i> (str or pathlib.Path)</dt>
144 <dd> 171 <dd>
145 default directory 172 default directory
146 </dd> 173 </dd>
147 </dl> 174 </dl>
148 <a NAME="EricPathPickerDialog.setLabelText" ID="EricPathPickerDialog.setLabelText"></a> 175 <a NAME="EricPathPickerDialog.setLabelText" ID="EricPathPickerDialog.setLabelText"></a>
190 picker mode 217 picker mode
191 </dd> 218 </dd>
192 </dl> 219 </dl>
193 <a NAME="EricPathPickerDialog.setPickerPath" ID="EricPathPickerDialog.setPickerPath"></a> 220 <a NAME="EricPathPickerDialog.setPickerPath" ID="EricPathPickerDialog.setPickerPath"></a>
194 <h4>EricPathPickerDialog.setPickerPath</h4> 221 <h4>EricPathPickerDialog.setPickerPath</h4>
195 <b>setPickerPath</b>(<i>path</i>) 222 <b>setPickerPath</b>(<i>fpath</i>)
196 223
197 <p> 224 <p>
198 Public method to set the path of the path picker. 225 Public method to set the path of the path picker.
199 </p> 226 </p>
200 <dl> 227 <dl>
201 228
202 <dt><i>path</i> (str)</dt> 229 <dt><i>fpath</i> (str or pathlib.Path)</dt>
203 <dd> 230 <dd>
204 path to be set 231 path to be set
205 </dd> 232 </dd>
206 </dl> 233 </dl>
207 <a NAME="EricPathPickerDialog.setTitle" ID="EricPathPickerDialog.setTitle"></a> 234 <a NAME="EricPathPickerDialog.setTitle" ID="EricPathPickerDialog.setTitle"></a>
221 <div align="right"><a href="#top">Up</a></div> 248 <div align="right"><a href="#top">Up</a></div>
222 <hr /> 249 <hr />
223 <hr /> 250 <hr />
224 <a NAME="getPath" ID="getPath"></a> 251 <a NAME="getPath" ID="getPath"></a>
225 <h2>getPath</h2> 252 <h2>getPath</h2>
226 <b>getPath</b>(<i>parent, title, label, mode=EricPathPickerModes.OPEN_FILE_MODE, path="", defaultDirectory="", filters=None, </i>) 253 <b>getPath</b>(<i>parent, title, label, mode=EricPathPickerModes.OPEN_FILE_MODE, pathlibPath=None, defaultDirectory=None, filters=None, </i>)
227 254
228 <p> 255 <p>
229 Function to get a file or directory path from the user. 256 Function to get a file or directory path from the user.
230 </p> 257 </p>
231 <dl> 258 <dl>
240 </dd> 267 </dd>
241 <dt><i>label</i> (str)</dt> 268 <dt><i>label</i> (str)</dt>
242 <dd> 269 <dd>
243 text to be shown above the path picker 270 text to be shown above the path picker
244 </dd> 271 </dd>
245 <dt><i>mode</i> (EricPathPickerModes)</dt> 272 <dt><i>mode</i> (EricPathPickerModes (optional))</dt>
246 <dd> 273 <dd>
247 mode of the path picker 274 mode of the path picker (defaults to EricPathPickerModes.OPEN_FILE_MODE)
248 </dd> 275 </dd>
249 <dt><i>path</i> (str)</dt> 276 <dt><i>pathlibPath</i> (pathlib.Path (optional))</dt>
250 <dd> 277 <dd>
251 initial path to be shown 278 initial path to be shown (defaults to None)
252 </dd> 279 </dd>
253 <dt><i>defaultDirectory</i> (str)</dt> 280 <dt><i>defaultDirectory</i> (pathlib.Path (optional))</dt>
254 <dd> 281 <dd>
255 default directory of the path picker selection 282 default directory of the path picker selection
256 dialog 283 dialog (defaults to None)
257 </dd> 284 </dd>
258 <dt><i>filters</i> (list of str)</dt> 285 <dt><i>filters</i> (list of str (optional))</dt>
259 <dd> 286 <dd>
260 list of file filters 287 list of file filters (defaults to None)
261 </dd> 288 </dd>
262 </dl> 289 </dl>
263 <dl> 290 <dl>
264 <dt>Return:</dt> 291 <dt>Return:</dt>
265 <dd> 292 <dd>
268 </dd> 295 </dd>
269 </dl> 296 </dl>
270 <dl> 297 <dl>
271 <dt>Return Type:</dt> 298 <dt>Return Type:</dt>
272 <dd> 299 <dd>
300 tuple of (pathlib.Path, bool)
301 </dd>
302 </dl>
303 <div align="right"><a href="#top">Up</a></div>
304 <hr />
305 <hr />
306 <a NAME="getStrPath" ID="getStrPath"></a>
307 <h2>getStrPath</h2>
308 <b>getStrPath</b>(<i>parent, title, label, mode=EricPathPickerModes.OPEN_FILE_MODE, strPath=None, defaultDirectory=None, filters=None, </i>)
309
310 <p>
311 Function to get a file or directory path from the user.
312 </p>
313 <dl>
314
315 <dt><i>parent</i> (QWidget)</dt>
316 <dd>
317 reference to the parent widget
318 </dd>
319 <dt><i>title</i> (str)</dt>
320 <dd>
321 title of the dialog
322 </dd>
323 <dt><i>label</i> (str)</dt>
324 <dd>
325 text to be shown above the path picker
326 </dd>
327 <dt><i>mode</i> (EricPathPickerModes (optional))</dt>
328 <dd>
329 mode of the path picker (defaults to EricPathPickerModes.OPEN_FILE_MODE)
330 </dd>
331 <dt><i>strPath</i> (str (optional))</dt>
332 <dd>
333 initial path to be shown (defaults to None)
334 </dd>
335 <dt><i>defaultDirectory</i> (str (optional))</dt>
336 <dd>
337 default directory of the path picker selection
338 dialog (defaults to None)
339 </dd>
340 <dt><i>filters</i> (list of str (optional))</dt>
341 <dd>
342 list of file filters (defaults to None)
343 </dd>
344 </dl>
345 <dl>
346 <dt>Return:</dt>
347 <dd>
348 tuple containing the entered path and a flag indicating that the
349 user pressed the OK button
350 </dd>
351 </dl>
352 <dl>
353 <dt>Return Type:</dt>
354 <dd>
273 tuple of (str, bool) 355 tuple of (str, bool)
274 </dd> 356 </dd>
275 </dl> 357 </dl>
276 <div align="right"><a href="#top">Up</a></div> 358 <div align="right"><a href="#top">Up</a></div>
277 <hr /> 359 <hr />

eric ide

mercurial