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.Toolbox.Startup</h1> |
23 <h1>eric6.Toolbox.Startup</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing some startup helper funcions. |
26 Module implementing some startup helper funcions. |
25 </p> |
27 </p> |
26 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
|
29 |
27 <table> |
30 <table> |
28 <tr><td>application</td></tr><tr><td>loaded_translators</td></tr> |
31 <tr><td>application</td></tr><tr><td>loaded_translators</td></tr> |
29 </table> |
32 </table> |
30 <h3>Classes</h3> |
33 <h3>Classes</h3> |
|
34 |
31 <table> |
35 <table> |
32 <tr><td>None</td></tr> |
36 <tr><td>None</td></tr> |
33 </table> |
37 </table> |
34 <h3>Functions</h3> |
38 <h3>Functions</h3> |
|
39 |
35 <table> |
40 <table> |
|
41 |
36 <tr> |
42 <tr> |
37 <td><a href="#handleArgs">handleArgs</a></td> |
43 <td><a href="#handleArgs">handleArgs</a></td> |
38 <td>Module function to handle the always present commandline options.</td> |
44 <td>Module function to handle the always present commandline options.</td> |
39 </tr><tr> |
45 </tr> |
|
46 <tr> |
40 <td><a href="#initializeResourceSearchPath">initializeResourceSearchPath</a></td> |
47 <td><a href="#initializeResourceSearchPath">initializeResourceSearchPath</a></td> |
41 <td>Module function to initialize the default mime source factory.</td> |
48 <td>Module function to initialize the default mime source factory.</td> |
42 </tr><tr> |
49 </tr> |
|
50 <tr> |
43 <td><a href="#loadTranslatorForLocale">loadTranslatorForLocale</a></td> |
51 <td><a href="#loadTranslatorForLocale">loadTranslatorForLocale</a></td> |
44 <td>Module function to find and load a specific translation.</td> |
52 <td>Module function to find and load a specific translation.</td> |
45 </tr><tr> |
53 </tr> |
|
54 <tr> |
46 <td><a href="#loadTranslators">loadTranslators</a></td> |
55 <td><a href="#loadTranslators">loadTranslators</a></td> |
47 <td>Module function to load all required translations.</td> |
56 <td>Module function to load all required translations.</td> |
48 </tr><tr> |
57 </tr> |
|
58 <tr> |
49 <td><a href="#setLibraryPaths">setLibraryPaths</a></td> |
59 <td><a href="#setLibraryPaths">setLibraryPaths</a></td> |
50 <td>Module function to set the Qt library paths correctly for windows systems.</td> |
60 <td>Module function to set the Qt library paths correctly for windows systems.</td> |
51 </tr><tr> |
61 </tr> |
|
62 <tr> |
52 <td><a href="#simpleAppStartup">simpleAppStartup</a></td> |
63 <td><a href="#simpleAppStartup">simpleAppStartup</a></td> |
53 <td>Module function to start up an application that doesn't need a specialized start up.</td> |
64 <td>Module function to start up an application that doesn't need a specialized start up.</td> |
54 </tr><tr> |
65 </tr> |
|
66 <tr> |
55 <td><a href="#usage">usage</a></td> |
67 <td><a href="#usage">usage</a></td> |
56 <td>Module function to show the usage information.</td> |
68 <td>Module function to show the usage information.</td> |
57 </tr><tr> |
69 </tr> |
|
70 <tr> |
58 <td><a href="#version">version</a></td> |
71 <td><a href="#version">version</a></td> |
59 <td>Module function to show the version information.</td> |
72 <td>Module function to show the version information.</td> |
60 </tr> |
73 </tr> |
61 </table> |
74 </table> |
62 <hr /><hr /> |
75 <hr /> |
|
76 <hr /> |
63 <a NAME="handleArgs" ID="handleArgs"></a> |
77 <a NAME="handleArgs" ID="handleArgs"></a> |
64 <h2>handleArgs</h2> |
78 <h2>handleArgs</h2> |
65 <b>handleArgs</b>(<i>argv, appinfo</i>) |
79 <b>handleArgs</b>(<i>argv, appinfo</i>) |
|
80 |
66 <p> |
81 <p> |
67 Module function to handle the always present commandline options. |
82 Module function to handle the always present commandline options. |
68 </p><dl> |
83 </p> |
|
84 <dl> |
|
85 |
69 <dt><i>argv</i></dt> |
86 <dt><i>argv</i></dt> |
70 <dd> |
87 <dd> |
71 list of commandline parameters (list of strings) |
88 list of commandline parameters (list of strings) |
72 </dd><dt><i>appinfo</i></dt> |
89 </dd> |
73 <dd> |
90 <dt><i>appinfo</i></dt> |
74 dictionary describing the application |
91 <dd> |
75 </dd> |
92 dictionary describing the application |
76 </dl><dl> |
93 </dd> |
|
94 </dl> |
|
95 <dl> |
77 <dt>Returns:</dt> |
96 <dt>Returns:</dt> |
78 <dd> |
97 <dd> |
79 index of the '--' option (integer). This is used to tell |
98 index of the '--' option (integer). This is used to tell |
80 the application, that all additional options don't belong to |
99 the application, that all additional options don't belong to |
81 the application. |
100 the application. |
82 </dd> |
101 </dd> |
83 </dl> |
102 </dl> |
84 <div align="right"><a href="#top">Up</a></div> |
103 <div align="right"><a href="#top">Up</a></div> |
85 <hr /><hr /> |
104 <hr /> |
|
105 <hr /> |
86 <a NAME="initializeResourceSearchPath" ID="initializeResourceSearchPath"></a> |
106 <a NAME="initializeResourceSearchPath" ID="initializeResourceSearchPath"></a> |
87 <h2>initializeResourceSearchPath</h2> |
107 <h2>initializeResourceSearchPath</h2> |
88 <b>initializeResourceSearchPath</b>(<i></i>) |
108 <b>initializeResourceSearchPath</b>(<i></i>) |
|
109 |
89 <p> |
110 <p> |
90 Module function to initialize the default mime source factory. |
111 Module function to initialize the default mime source factory. |
91 </p> |
112 </p> |
92 <div align="right"><a href="#top">Up</a></div> |
113 <div align="right"><a href="#top">Up</a></div> |
93 <hr /><hr /> |
114 <hr /> |
|
115 <hr /> |
94 <a NAME="loadTranslatorForLocale" ID="loadTranslatorForLocale"></a> |
116 <a NAME="loadTranslatorForLocale" ID="loadTranslatorForLocale"></a> |
95 <h2>loadTranslatorForLocale</h2> |
117 <h2>loadTranslatorForLocale</h2> |
96 <b>loadTranslatorForLocale</b>(<i>dirs, tn</i>) |
118 <b>loadTranslatorForLocale</b>(<i>dirs, tn</i>) |
|
119 |
97 <p> |
120 <p> |
98 Module function to find and load a specific translation. |
121 Module function to find and load a specific translation. |
99 </p><dl> |
122 </p> |
|
123 <dl> |
|
124 |
100 <dt><i>dirs</i></dt> |
125 <dt><i>dirs</i></dt> |
101 <dd> |
126 <dd> |
102 Searchpath for the translations. (list of strings) |
127 Searchpath for the translations. (list of strings) |
103 </dd><dt><i>tn</i></dt> |
128 </dd> |
|
129 <dt><i>tn</i></dt> |
104 <dd> |
130 <dd> |
105 The translation to be loaded. (string) |
131 The translation to be loaded. (string) |
106 </dd> |
132 </dd> |
107 </dl><dl> |
133 </dl> |
|
134 <dl> |
108 <dt>Returns:</dt> |
135 <dt>Returns:</dt> |
109 <dd> |
136 <dd> |
110 Tuple of a status flag and the loaded translator |
137 Tuple of a status flag and the loaded translator |
111 (int, QTranslator) |
138 (int, QTranslator) |
112 </dd> |
139 </dd> |
113 </dl> |
140 </dl> |
114 <div align="right"><a href="#top">Up</a></div> |
141 <div align="right"><a href="#top">Up</a></div> |
115 <hr /><hr /> |
142 <hr /> |
|
143 <hr /> |
116 <a NAME="loadTranslators" ID="loadTranslators"></a> |
144 <a NAME="loadTranslators" ID="loadTranslators"></a> |
117 <h2>loadTranslators</h2> |
145 <h2>loadTranslators</h2> |
118 <b>loadTranslators</b>(<i>qtTransDir, app, translationFiles=()</i>) |
146 <b>loadTranslators</b>(<i>qtTransDir, app, translationFiles=()</i>) |
|
147 |
119 <p> |
148 <p> |
120 Module function to load all required translations. |
149 Module function to load all required translations. |
121 </p><dl> |
150 </p> |
|
151 <dl> |
|
152 |
122 <dt><i>qtTransDir</i></dt> |
153 <dt><i>qtTransDir</i></dt> |
123 <dd> |
154 <dd> |
124 directory of the Qt translations files (string) |
155 directory of the Qt translations files (string) |
125 </dd><dt><i>app</i></dt> |
156 </dd> |
|
157 <dt><i>app</i></dt> |
126 <dd> |
158 <dd> |
127 reference to the application object (QApplication) |
159 reference to the application object (QApplication) |
128 </dd><dt><i>translationFiles</i></dt> |
160 </dd> |
|
161 <dt><i>translationFiles</i></dt> |
129 <dd> |
162 <dd> |
130 tuple of additional translations to |
163 tuple of additional translations to |
131 be loaded (tuple of strings) |
164 be loaded (tuple of strings) |
132 </dd> |
165 </dd> |
133 </dl><dl> |
166 </dl> |
|
167 <dl> |
134 <dt>Returns:</dt> |
168 <dt>Returns:</dt> |
135 <dd> |
169 <dd> |
136 the requested locale (string) |
170 the requested locale (string) |
137 </dd> |
171 </dd> |
138 </dl> |
172 </dl> |
139 <div align="right"><a href="#top">Up</a></div> |
173 <div align="right"><a href="#top">Up</a></div> |
140 <hr /><hr /> |
174 <hr /> |
|
175 <hr /> |
141 <a NAME="setLibraryPaths" ID="setLibraryPaths"></a> |
176 <a NAME="setLibraryPaths" ID="setLibraryPaths"></a> |
142 <h2>setLibraryPaths</h2> |
177 <h2>setLibraryPaths</h2> |
143 <b>setLibraryPaths</b>(<i></i>) |
178 <b>setLibraryPaths</b>(<i></i>) |
|
179 |
144 <p> |
180 <p> |
145 Module function to set the Qt library paths correctly for windows systems. |
181 Module function to set the Qt library paths correctly for windows systems. |
146 </p> |
182 </p> |
147 <div align="right"><a href="#top">Up</a></div> |
183 <div align="right"><a href="#top">Up</a></div> |
148 <hr /><hr /> |
184 <hr /> |
|
185 <hr /> |
149 <a NAME="simpleAppStartup" ID="simpleAppStartup"></a> |
186 <a NAME="simpleAppStartup" ID="simpleAppStartup"></a> |
150 <h2>simpleAppStartup</h2> |
187 <h2>simpleAppStartup</h2> |
151 <b>simpleAppStartup</b>(<i>argv, appinfo, mwFactory, quitOnLastWindowClosed=True, app=None, raiseIt=True, installErrorHandler=False</i>) |
188 <b>simpleAppStartup</b>(<i>argv, appinfo, mwFactory, quitOnLastWindowClosed=True, app=None, raiseIt=True, installErrorHandler=False</i>) |
|
189 |
152 <p> |
190 <p> |
153 Module function to start up an application that doesn't need a specialized |
191 Module function to start up an application that doesn't need a specialized |
154 start up. |
192 start up. |
155 </p><p> |
193 </p> |
|
194 <p> |
156 This function is used by all of eric6's helper programs. |
195 This function is used by all of eric6's helper programs. |
157 </p><dl> |
196 </p> |
|
197 <dl> |
|
198 |
158 <dt><i>argv</i></dt> |
199 <dt><i>argv</i></dt> |
159 <dd> |
200 <dd> |
160 list of commandline parameters (list of strings) |
201 list of commandline parameters (list of strings) |
161 </dd><dt><i>appinfo</i></dt> |
202 </dd> |
162 <dd> |
203 <dt><i>appinfo</i></dt> |
163 dictionary describing the application |
204 <dd> |
164 </dd><dt><i>mwFactory</i></dt> |
205 dictionary describing the application |
|
206 </dd> |
|
207 <dt><i>mwFactory</i></dt> |
165 <dd> |
208 <dd> |
166 factory function generating the main widget. This |
209 factory function generating the main widget. This |
167 function must accept the following parameter. |
210 function must accept the following parameter. |
168 <dl> |
211 <dl> |
169 <dt>argv</dt> |
212 <dt>argv</dt> |
170 <dd>list of commandline parameters (list of strings)</dd> |
213 <dd>list of commandline parameters (list of strings)</dd> |
171 </dl> |
214 </dl> |
172 </dd><dt><i>quitOnLastWindowClosed=</i></dt> |
215 </dd> |
|
216 <dt><i>quitOnLastWindowClosed=</i></dt> |
173 <dd> |
217 <dd> |
174 flag indicating to quit the application, |
218 flag indicating to quit the application, |
175 if the last window was closed (boolean) |
219 if the last window was closed (boolean) |
176 </dd><dt><i>app=</i></dt> |
220 </dd> |
|
221 <dt><i>app=</i></dt> |
177 <dd> |
222 <dd> |
178 reference to the application object (QApplication or None) |
223 reference to the application object (QApplication or None) |
179 </dd><dt><i>raiseIt=</i></dt> |
224 </dd> |
|
225 <dt><i>raiseIt=</i></dt> |
180 <dd> |
226 <dd> |
181 flag indicating to raise the generated application |
227 flag indicating to raise the generated application |
182 window (boolean) |
228 window (boolean) |
183 </dd><dt><i>installErrorHandler=</i></dt> |
229 </dd> |
|
230 <dt><i>installErrorHandler=</i></dt> |
184 <dd> |
231 <dd> |
185 flag indicating to install an error |
232 flag indicating to install an error |
186 handler dialog (boolean) |
233 handler dialog (boolean) |
187 </dd> |
234 </dd> |
188 </dl><dl> |
235 </dl> |
|
236 <dl> |
189 <dt>Returns:</dt> |
237 <dt>Returns:</dt> |
190 <dd> |
238 <dd> |
191 exit result (integer) |
239 exit result (integer) |
192 </dd> |
240 </dd> |
193 </dl> |
241 </dl> |
194 <div align="right"><a href="#top">Up</a></div> |
242 <div align="right"><a href="#top">Up</a></div> |
195 <hr /><hr /> |
243 <hr /> |
|
244 <hr /> |
196 <a NAME="usage" ID="usage"></a> |
245 <a NAME="usage" ID="usage"></a> |
197 <h2>usage</h2> |
246 <h2>usage</h2> |
198 <b>usage</b>(<i>appinfo, optlen=12</i>) |
247 <b>usage</b>(<i>appinfo, optlen=12</i>) |
|
248 |
199 <p> |
249 <p> |
200 Module function to show the usage information. |
250 Module function to show the usage information. |
201 </p><dl> |
251 </p> |
202 <dt><i>appinfo</i></dt> |
252 <dl> |
203 <dd> |
253 |
204 dictionary describing the application |
254 <dt><i>appinfo</i></dt> |
205 </dd><dt><i>optlen</i></dt> |
255 <dd> |
|
256 dictionary describing the application |
|
257 </dd> |
|
258 <dt><i>optlen</i></dt> |
206 <dd> |
259 <dd> |
207 length of the field for the commandline option (integer) |
260 length of the field for the commandline option (integer) |
208 </dd> |
261 </dd> |
209 </dl> |
262 </dl> |
210 <div align="right"><a href="#top">Up</a></div> |
263 <div align="right"><a href="#top">Up</a></div> |
211 <hr /><hr /> |
264 <hr /> |
|
265 <hr /> |
212 <a NAME="version" ID="version"></a> |
266 <a NAME="version" ID="version"></a> |
213 <h2>version</h2> |
267 <h2>version</h2> |
214 <b>version</b>(<i>appinfo</i>) |
268 <b>version</b>(<i>appinfo</i>) |
|
269 |
215 <p> |
270 <p> |
216 Module function to show the version information. |
271 Module function to show the version information. |
217 </p><dl> |
272 </p> |
|
273 <dl> |
|
274 |
218 <dt><i>appinfo</i></dt> |
275 <dt><i>appinfo</i></dt> |
219 <dd> |
276 <dd> |
220 dictionary describing the application |
277 dictionary describing the application |
221 </dd> |
278 </dd> |
222 </dl> |
279 </dl> |