src/eric7/Documentation/Source/eric7.Toolbox.Startup.html

branch
eric7
changeset 10303
ee1aadab1215
parent 9236
db53a9efe7ef
child 10431
64157aeb0312
equal deleted inserted replaced
10302:8cb0dabf852f 10303:ee1aadab1215
24 <h3>Functions</h3> 24 <h3>Functions</h3>
25 25
26 <table> 26 <table>
27 27
28 <tr> 28 <tr>
29 <td><a href="#appStartup">appStartup</a></td>
30 <td>Module function to start up an application that doesn't need a specialized start up.</td>
31 </tr>
32 <tr>
29 <td><a href="#getDefaultIconPaths">getDefaultIconPaths</a></td> 33 <td><a href="#getDefaultIconPaths">getDefaultIconPaths</a></td>
30 <td>Module function to determine the default icon paths.</td> 34 <td>Module function to determine the default icon paths.</td>
31 </tr> 35 </tr>
32 <tr> 36 <tr>
33 <td><a href="#handleArgs">handleArgs</a></td>
34 <td>Module function to handle the always present commandline options.</td>
35 </tr>
36 <tr>
37 <td><a href="#initializeResourceSearchPath">initializeResourceSearchPath</a></td> 37 <td><a href="#initializeResourceSearchPath">initializeResourceSearchPath</a></td>
38 <td>Module function to initialize the default mime source factory.</td> 38 <td>Module function to initialize the default mime source factory.</td>
39 </tr> 39 </tr>
40 <tr> 40 <tr>
41 <td><a href="#loadTranslatorForLocale">loadTranslatorForLocale</a></td> 41 <td><a href="#loadTranslatorForLocale">loadTranslatorForLocale</a></td>
47 </tr> 47 </tr>
48 <tr> 48 <tr>
49 <td><a href="#setLibraryPaths">setLibraryPaths</a></td> 49 <td><a href="#setLibraryPaths">setLibraryPaths</a></td>
50 <td>Module function to set the Qt library paths correctly.</td> 50 <td>Module function to set the Qt library paths correctly.</td>
51 </tr> 51 </tr>
52 <tr>
53 <td><a href="#simpleAppStartup">simpleAppStartup</a></td>
54 <td>Module function to start up an application that doesn't need a specialized start up.</td>
55 </tr>
56 <tr>
57 <td><a href="#usage">usage</a></td>
58 <td>Module function to show the usage information.</td>
59 </tr>
60 <tr>
61 <td><a href="#version">version</a></td>
62 <td>Module function to show the version information.</td>
63 </tr>
64 </table> 52 </table>
53 <hr />
54 <hr />
55 <a NAME="appStartup" ID="appStartup"></a>
56 <h2>appStartup</h2>
57 <b>appStartup</b>(<i>args, mwFactory, quitOnLastWindowClosed=True, app=None, raiseIt=True, installErrorHandler=False, </i>)
58
59 <p>
60 Module function to start up an application that doesn't need a specialized
61 start up.
62 </p>
63 <p>
64 This function is used by all of eric's helper programs.
65 </p>
66 <dl>
67
68 <dt><i>args</i> (argparse.Namespace)</dt>
69 <dd>
70 namespace object created by ArgumentParser.parse_args() containing
71 the parsed command line arguments
72 </dd>
73 <dt><i>mwFactory</i></dt>
74 <dd>
75 factory function generating the main widget. This
76 function must accept the following parameter.
77 <dl>
78 <dt>args</dt>
79 <dd>parsed command line arguments (argparse.Namespace)</dd>
80 </dl>
81 </dd>
82 <dt><i>quitOnLastWindowClosed</i> (bool)</dt>
83 <dd>
84 flag indicating to quit the application,
85 if the last window was closed
86 </dd>
87 <dt><i>app</i> (QApplication or None)</dt>
88 <dd>
89 reference to the application object
90 </dd>
91 <dt><i>raiseIt</i> (bool)</dt>
92 <dd>
93 flag indicating to raise the generated application
94 window
95 </dd>
96 <dt><i>installErrorHandler</i> (bool)</dt>
97 <dd>
98 flag indicating to install an error
99 handler dialog
100 </dd>
101 </dl>
102 <dl>
103 <dt>Return:</dt>
104 <dd>
105 exit result
106 </dd>
107 </dl>
108 <dl>
109 <dt>Return Type:</dt>
110 <dd>
111 int
112 </dd>
113 </dl>
114 <div align="right"><a href="#top">Up</a></div>
65 <hr /> 115 <hr />
66 <hr /> 116 <hr />
67 <a NAME="getDefaultIconPaths" ID="getDefaultIconPaths"></a> 117 <a NAME="getDefaultIconPaths" ID="getDefaultIconPaths"></a>
68 <h2>getDefaultIconPaths</h2> 118 <h2>getDefaultIconPaths</h2>
69 <b>getDefaultIconPaths</b>(<i>application</i>) 119 <b>getDefaultIconPaths</b>(<i>application</i>)
91 </dd> 141 </dd>
92 </dl> 142 </dl>
93 <div align="right"><a href="#top">Up</a></div> 143 <div align="right"><a href="#top">Up</a></div>
94 <hr /> 144 <hr />
95 <hr /> 145 <hr />
96 <a NAME="handleArgs" ID="handleArgs"></a>
97 <h2>handleArgs</h2>
98 <b>handleArgs</b>(<i>argv, appinfo</i>)
99
100 <p>
101 Module function to handle the always present commandline options.
102 </p>
103 <dl>
104
105 <dt><i>argv</i></dt>
106 <dd>
107 list of commandline parameters (list of strings)
108 </dd>
109 <dt><i>appinfo</i></dt>
110 <dd>
111 dictionary describing the application
112 </dd>
113 </dl>
114 <dl>
115 <dt>Return:</dt>
116 <dd>
117 index of the '--' option (integer). This is used to tell
118 the application, that all additional options don't belong to
119 the application.
120 </dd>
121 </dl>
122 <div align="right"><a href="#top">Up</a></div>
123 <hr />
124 <hr />
125 <a NAME="initializeResourceSearchPath" ID="initializeResourceSearchPath"></a> 146 <a NAME="initializeResourceSearchPath" ID="initializeResourceSearchPath"></a>
126 <h2>initializeResourceSearchPath</h2> 147 <h2>initializeResourceSearchPath</h2>
127 <b>initializeResourceSearchPath</b>(<i>application</i>) 148 <b>initializeResourceSearchPath</b>(<i>application</i>)
128 149
129 <p> 150 <p>
146 <p> 167 <p>
147 Module function to find and load a specific translation. 168 Module function to find and load a specific translation.
148 </p> 169 </p>
149 <dl> 170 <dl>
150 171
151 <dt><i>dirs</i></dt> 172 <dt><i>dirs</i> (list of str)</dt>
152 <dd> 173 <dd>
153 Searchpath for the translations. (list of strings) 174 searchpath for the translations
154 </dd> 175 </dd>
155 <dt><i>tn</i></dt> 176 <dt><i>tn</i> (str)</dt>
156 <dd> 177 <dd>
157 The translation to be loaded. (string) 178 translation to be loaded
158 </dd> 179 </dd>
159 </dl> 180 </dl>
160 <dl> 181 <dl>
161 <dt>Return:</dt> 182 <dt>Return:</dt>
162 <dd> 183 <dd>
163 Tuple of a status flag and the loaded translator 184 tuple containing a status flag and the loaded translator
164 (int, QTranslator) 185 </dd>
186 </dl>
187 <dl>
188 <dt>Return Type:</dt>
189 <dd>
190 tuple of (int, QTranslator)
165 </dd> 191 </dd>
166 </dl> 192 </dl>
167 <div align="right"><a href="#top">Up</a></div> 193 <div align="right"><a href="#top">Up</a></div>
168 <hr /> 194 <hr />
169 <hr /> 195 <hr />
174 <p> 200 <p>
175 Module function to load all required translations. 201 Module function to load all required translations.
176 </p> 202 </p>
177 <dl> 203 <dl>
178 204
179 <dt><i>qtTransDir</i></dt> 205 <dt><i>qtTransDir</i> (str)</dt>
180 <dd> 206 <dd>
181 directory of the Qt translations files (string) 207 directory of the Qt translations files
182 </dd> 208 </dd>
183 <dt><i>app</i></dt> 209 <dt><i>app</i> (QApplication)</dt>
184 <dd> 210 <dd>
185 reference to the application object (QApplication) 211 reference to the application object
186 </dd> 212 </dd>
187 <dt><i>translationFiles</i></dt> 213 <dt><i>translationFiles</i> (tuple of str)</dt>
188 <dd> 214 <dd>
189 tuple of additional translations to 215 tuple of additional translations to
190 be loaded (tuple of strings) 216 be loaded
191 </dd> 217 </dd>
192 </dl> 218 </dl>
193 <dl> 219 <dl>
194 <dt>Return:</dt> 220 <dt>Return:</dt>
195 <dd> 221 <dd>
196 the requested locale (string) 222 the requested locale
223 </dd>
224 </dl>
225 <dl>
226 <dt>Return Type:</dt>
227 <dd>
228 str
197 </dd> 229 </dd>
198 </dl> 230 </dl>
199 <div align="right"><a href="#top">Up</a></div> 231 <div align="right"><a href="#top">Up</a></div>
200 <hr /> 232 <hr />
201 <hr /> 233 <hr />
206 <p> 238 <p>
207 Module function to set the Qt library paths correctly. 239 Module function to set the Qt library paths correctly.
208 </p> 240 </p>
209 <div align="right"><a href="#top">Up</a></div> 241 <div align="right"><a href="#top">Up</a></div>
210 <hr /> 242 <hr />
211 <hr />
212 <a NAME="simpleAppStartup" ID="simpleAppStartup"></a>
213 <h2>simpleAppStartup</h2>
214 <b>simpleAppStartup</b>(<i>argv, appinfo, mwFactory, quitOnLastWindowClosed=True, app=None, raiseIt=True, installErrorHandler=False, </i>)
215
216 <p>
217 Module function to start up an application that doesn't need a specialized
218 start up.
219 </p>
220 <p>
221 This function is used by all of eric's helper programs.
222 </p>
223 <dl>
224
225 <dt><i>argv</i></dt>
226 <dd>
227 list of commandline parameters (list of strings)
228 </dd>
229 <dt><i>appinfo</i></dt>
230 <dd>
231 dictionary describing the application
232 </dd>
233 <dt><i>mwFactory</i></dt>
234 <dd>
235 factory function generating the main widget. This
236 function must accept the following parameter.
237 <dl>
238 <dt>argv</dt>
239 <dd>list of commandline parameters (list of strings)</dd>
240 </dl>
241 </dd>
242 <dt><i>quitOnLastWindowClosed</i></dt>
243 <dd>
244 flag indicating to quit the application,
245 if the last window was closed (boolean)
246 </dd>
247 <dt><i>app</i></dt>
248 <dd>
249 reference to the application object (QApplication or None)
250 </dd>
251 <dt><i>raiseIt</i></dt>
252 <dd>
253 flag indicating to raise the generated application
254 window (boolean)
255 </dd>
256 <dt><i>installErrorHandler</i></dt>
257 <dd>
258 flag indicating to install an error
259 handler dialog (boolean)
260 </dd>
261 </dl>
262 <dl>
263 <dt>Return:</dt>
264 <dd>
265 exit result (integer)
266 </dd>
267 </dl>
268 <div align="right"><a href="#top">Up</a></div>
269 <hr />
270 <hr />
271 <a NAME="usage" ID="usage"></a>
272 <h2>usage</h2>
273 <b>usage</b>(<i>appinfo, optlen=12</i>)
274
275 <p>
276 Module function to show the usage information.
277 </p>
278 <dl>
279
280 <dt><i>appinfo</i></dt>
281 <dd>
282 dictionary describing the application
283 </dd>
284 <dt><i>optlen</i></dt>
285 <dd>
286 length of the field for the commandline option (integer)
287 </dd>
288 </dl>
289 <div align="right"><a href="#top">Up</a></div>
290 <hr />
291 <hr />
292 <a NAME="version" ID="version"></a>
293 <h2>version</h2>
294 <b>version</b>(<i>appinfo</i>)
295
296 <p>
297 Module function to show the version information.
298 </p>
299 <dl>
300
301 <dt><i>appinfo</i></dt>
302 <dd>
303 dictionary describing the application
304 </dd>
305 </dl>
306 <div align="right"><a href="#top">Up</a></div>
307 <hr />
308 </body></html> 243 </body></html>

eric ide

mercurial