|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.EricWidgets.EricPathPickerDialog</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> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.EricWidgets.EricPathPickerDialog</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a dialog to enter a file system path using a file picker. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#EricPathPickerDialog">EricPathPickerDialog</a></td> |
|
39 <td>Class implementing a dialog to enter a file system path using a file picker.</td> |
|
40 </tr> |
|
41 </table> |
|
42 <h3>Functions</h3> |
|
43 |
|
44 <table> |
|
45 |
|
46 <tr> |
|
47 <td><a href="#getPath">getPath</a></td> |
|
48 <td>Function to get a file or directory path from the user.</td> |
|
49 </tr> |
|
50 </table> |
|
51 <hr /> |
|
52 <hr /> |
|
53 <a NAME="EricPathPickerDialog" ID="EricPathPickerDialog"></a> |
|
54 <h2>EricPathPickerDialog</h2> |
|
55 |
|
56 <p> |
|
57 Class implementing a dialog to enter a file system path using a file |
|
58 picker. |
|
59 </p> |
|
60 <h3>Derived from</h3> |
|
61 QDialog |
|
62 <h3>Class Attributes</h3> |
|
63 |
|
64 <table> |
|
65 <tr><td>None</td></tr> |
|
66 </table> |
|
67 <h3>Class Methods</h3> |
|
68 |
|
69 <table> |
|
70 <tr><td>None</td></tr> |
|
71 </table> |
|
72 <h3>Methods</h3> |
|
73 |
|
74 <table> |
|
75 |
|
76 <tr> |
|
77 <td><a href="#EricPathPickerDialog.__init__">EricPathPickerDialog</a></td> |
|
78 <td>Constructor</td> |
|
79 </tr> |
|
80 <tr> |
|
81 <td><a href="#EricPathPickerDialog.getPath">getPath</a></td> |
|
82 <td>Public method to get the current path.</td> |
|
83 </tr> |
|
84 <tr> |
|
85 <td><a href="#EricPathPickerDialog.setDefaultDirectory">setDefaultDirectory</a></td> |
|
86 <td>Public method to set the default directory of the path picker.</td> |
|
87 </tr> |
|
88 <tr> |
|
89 <td><a href="#EricPathPickerDialog.setLabelText">setLabelText</a></td> |
|
90 <td>Public method to set the label text.</td> |
|
91 </tr> |
|
92 <tr> |
|
93 <td><a href="#EricPathPickerDialog.setPickerFilters">setPickerFilters</a></td> |
|
94 <td>Public method to set the filters of the path picker.</td> |
|
95 </tr> |
|
96 <tr> |
|
97 <td><a href="#EricPathPickerDialog.setPickerMode">setPickerMode</a></td> |
|
98 <td>Public method to set the mode of the path picker.</td> |
|
99 </tr> |
|
100 <tr> |
|
101 <td><a href="#EricPathPickerDialog.setPickerPath">setPickerPath</a></td> |
|
102 <td>Public method to set the path of the path picker.</td> |
|
103 </tr> |
|
104 <tr> |
|
105 <td><a href="#EricPathPickerDialog.setTitle">setTitle</a></td> |
|
106 <td>Public method to set the window title.</td> |
|
107 </tr> |
|
108 </table> |
|
109 <h3>Static Methods</h3> |
|
110 |
|
111 <table> |
|
112 <tr><td>None</td></tr> |
|
113 </table> |
|
114 |
|
115 <a NAME="EricPathPickerDialog.__init__" ID="EricPathPickerDialog.__init__"></a> |
|
116 <h4>EricPathPickerDialog (Constructor)</h4> |
|
117 <b>EricPathPickerDialog</b>(<i>parent=None</i>) |
|
118 |
|
119 <p> |
|
120 Constructor |
|
121 </p> |
|
122 <dl> |
|
123 |
|
124 <dt><i>parent</i> (QWidget)</dt> |
|
125 <dd> |
|
126 reference to the parent widget |
|
127 </dd> |
|
128 </dl> |
|
129 <a NAME="EricPathPickerDialog.getPath" ID="EricPathPickerDialog.getPath"></a> |
|
130 <h4>EricPathPickerDialog.getPath</h4> |
|
131 <b>getPath</b>(<i></i>) |
|
132 |
|
133 <p> |
|
134 Public method to get the current path. |
|
135 </p> |
|
136 <dl> |
|
137 <dt>Return:</dt> |
|
138 <dd> |
|
139 current path |
|
140 </dd> |
|
141 </dl> |
|
142 <dl> |
|
143 <dt>Return Type:</dt> |
|
144 <dd> |
|
145 str |
|
146 </dd> |
|
147 </dl> |
|
148 <a NAME="EricPathPickerDialog.setDefaultDirectory" ID="EricPathPickerDialog.setDefaultDirectory"></a> |
|
149 <h4>EricPathPickerDialog.setDefaultDirectory</h4> |
|
150 <b>setDefaultDirectory</b>(<i>directory</i>) |
|
151 |
|
152 <p> |
|
153 Public method to set the default directory of the path picker. |
|
154 </p> |
|
155 <dl> |
|
156 |
|
157 <dt><i>directory</i> (str)</dt> |
|
158 <dd> |
|
159 default directory |
|
160 </dd> |
|
161 </dl> |
|
162 <a NAME="EricPathPickerDialog.setLabelText" ID="EricPathPickerDialog.setLabelText"></a> |
|
163 <h4>EricPathPickerDialog.setLabelText</h4> |
|
164 <b>setLabelText</b>(<i>text</i>) |
|
165 |
|
166 <p> |
|
167 Public method to set the label text. |
|
168 </p> |
|
169 <dl> |
|
170 |
|
171 <dt><i>text</i> (str)</dt> |
|
172 <dd> |
|
173 label text |
|
174 </dd> |
|
175 </dl> |
|
176 <a NAME="EricPathPickerDialog.setPickerFilters" ID="EricPathPickerDialog.setPickerFilters"></a> |
|
177 <h4>EricPathPickerDialog.setPickerFilters</h4> |
|
178 <b>setPickerFilters</b>(<i>filters</i>) |
|
179 |
|
180 <p> |
|
181 Public method to set the filters of the path picker. |
|
182 </p> |
|
183 <p> |
|
184 Note: Multiple filters must be separated by ';;'. |
|
185 </p> |
|
186 <dl> |
|
187 |
|
188 <dt><i>filters</i> (str)</dt> |
|
189 <dd> |
|
190 string containing the file filters |
|
191 </dd> |
|
192 </dl> |
|
193 <a NAME="EricPathPickerDialog.setPickerMode" ID="EricPathPickerDialog.setPickerMode"></a> |
|
194 <h4>EricPathPickerDialog.setPickerMode</h4> |
|
195 <b>setPickerMode</b>(<i>mode</i>) |
|
196 |
|
197 <p> |
|
198 Public method to set the mode of the path picker. |
|
199 </p> |
|
200 <dl> |
|
201 |
|
202 <dt><i>mode</i> (EricPathPickerModes)</dt> |
|
203 <dd> |
|
204 picker mode |
|
205 </dd> |
|
206 </dl> |
|
207 <a NAME="EricPathPickerDialog.setPickerPath" ID="EricPathPickerDialog.setPickerPath"></a> |
|
208 <h4>EricPathPickerDialog.setPickerPath</h4> |
|
209 <b>setPickerPath</b>(<i>path</i>) |
|
210 |
|
211 <p> |
|
212 Public method to set the path of the path picker. |
|
213 </p> |
|
214 <dl> |
|
215 |
|
216 <dt><i>path</i> (str)</dt> |
|
217 <dd> |
|
218 path to be set |
|
219 </dd> |
|
220 </dl> |
|
221 <a NAME="EricPathPickerDialog.setTitle" ID="EricPathPickerDialog.setTitle"></a> |
|
222 <h4>EricPathPickerDialog.setTitle</h4> |
|
223 <b>setTitle</b>(<i>title</i>) |
|
224 |
|
225 <p> |
|
226 Public method to set the window title. |
|
227 </p> |
|
228 <dl> |
|
229 |
|
230 <dt><i>title</i> (str)</dt> |
|
231 <dd> |
|
232 window title |
|
233 </dd> |
|
234 </dl> |
|
235 <div align="right"><a href="#top">Up</a></div> |
|
236 <hr /> |
|
237 <hr /> |
|
238 <a NAME="getPath" ID="getPath"></a> |
|
239 <h2>getPath</h2> |
|
240 <b>getPath</b>(<i>parent, title, label, mode=EricPathPickerModes.OPEN_FILE_MODE, path="", defaultDirectory="", filters=None</i>) |
|
241 |
|
242 <p> |
|
243 Function to get a file or directory path from the user. |
|
244 </p> |
|
245 <dl> |
|
246 |
|
247 <dt><i>parent</i> (QWidget)</dt> |
|
248 <dd> |
|
249 reference to the parent widget |
|
250 </dd> |
|
251 <dt><i>title</i> (str)</dt> |
|
252 <dd> |
|
253 title of the dialog |
|
254 </dd> |
|
255 <dt><i>label</i> (str)</dt> |
|
256 <dd> |
|
257 text to be shown above the path picker |
|
258 </dd> |
|
259 <dt><i>mode</i> (EricPathPickerModes)</dt> |
|
260 <dd> |
|
261 mode of the path picker |
|
262 </dd> |
|
263 <dt><i>path</i> (str)</dt> |
|
264 <dd> |
|
265 initial path to be shown |
|
266 </dd> |
|
267 <dt><i>defaultDirectory</i> (str)</dt> |
|
268 <dd> |
|
269 default directory of the path picker selection |
|
270 dialog |
|
271 </dd> |
|
272 <dt><i>filters</i> (list of str)</dt> |
|
273 <dd> |
|
274 list of file filters |
|
275 </dd> |
|
276 </dl> |
|
277 <dl> |
|
278 <dt>Return:</dt> |
|
279 <dd> |
|
280 tuple containing the entered path and a flag indicating that the |
|
281 user pressed the OK button |
|
282 </dd> |
|
283 </dl> |
|
284 <dl> |
|
285 <dt>Return Type:</dt> |
|
286 <dd> |
|
287 tuple of (str, bool) |
|
288 </dd> |
|
289 </dl> |
|
290 <div align="right"><a href="#top">Up</a></div> |
|
291 <hr /> |
|
292 </body></html> |