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