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