|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>Plugin_Project_Django.PluginProjectDjango</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>Plugin_Project_Django.PluginProjectDjango</h1> |
|
23 <p> |
|
24 Module implementing the Django project plugin. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>author</td></tr><tr><td>autoactivate</td></tr><tr><td>className</td></tr><tr><td>deactivateable</td></tr><tr><td>djangoPluginObject</td></tr><tr><td>error</td></tr><tr><td>longDescription</td></tr><tr><td>name</td></tr><tr><td>needsRestart</td></tr><tr><td>packageName</td></tr><tr><td>pyqtApi</td></tr><tr><td>shortDescription</td></tr><tr><td>version</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#ProjectDjangoPlugin">ProjectDjangoPlugin</a></td> |
|
34 <td>Class implementing the Pyramid project plugin.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr> |
|
40 <td><a href="#apiFiles">apiFiles</a></td> |
|
41 <td>Module function to return the API files made available by this plugin.</td> |
|
42 </tr><tr> |
|
43 <td><a href="#createDjangoPage">createDjangoPage</a></td> |
|
44 <td>Module function to create the Django configuration page.</td> |
|
45 </tr><tr> |
|
46 <td><a href="#getConfigData">getConfigData</a></td> |
|
47 <td>Module function returning data as required by the configuration dialog.</td> |
|
48 </tr><tr> |
|
49 <td><a href="#prepareUninstall">prepareUninstall</a></td> |
|
50 <td>Module function to prepare for an uninstallation.</td> |
|
51 </tr> |
|
52 </table> |
|
53 <hr /><hr /> |
|
54 <a NAME="ProjectDjangoPlugin" ID="ProjectDjangoPlugin"></a> |
|
55 <h2>ProjectDjangoPlugin</h2> |
|
56 <p> |
|
57 Class implementing the Pyramid project plugin. |
|
58 </p> |
|
59 <h3>Derived from</h3> |
|
60 QObject |
|
61 <h3>Class Attributes</h3> |
|
62 <table> |
|
63 <tr><td>PreferencesKey</td></tr><tr><td>lexerAssociations</td></tr> |
|
64 </table> |
|
65 <h3>Class Methods</h3> |
|
66 <table> |
|
67 <tr><td>None</td></tr> |
|
68 </table> |
|
69 <h3>Methods</h3> |
|
70 <table> |
|
71 <tr> |
|
72 <td><a href="#ProjectDjangoPlugin.__init__">ProjectDjangoPlugin</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr><tr> |
|
75 <td><a href="#ProjectDjangoPlugin.__checkVersions">__checkVersions</a></td> |
|
76 <td>Private function to check that the eric5 version is ok.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#ProjectDjangoPlugin.__initialize">__initialize</a></td> |
|
79 <td>Private slot to (re)initialize the plugin.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#ProjectDjangoPlugin.__loadTranslator">__loadTranslator</a></td> |
|
82 <td>Private method to load the translation file.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#ProjectDjangoPlugin.__projectClosed">__projectClosed</a></td> |
|
85 <td>Private slot to handle the projectClosed signal.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#ProjectDjangoPlugin.__projectOpened">__projectOpened</a></td> |
|
88 <td>Private slot to handle the projectOpened signal.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#ProjectDjangoPlugin.activate">activate</a></td> |
|
91 <td>Public method to activate this plugin.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#ProjectDjangoPlugin.binaryTranslationsCallback">binaryTranslationsCallback</a></td> |
|
94 <td>Public method to determine the filename of a compiled translation file given the translation source file.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#ProjectDjangoPlugin.deactivate">deactivate</a></td> |
|
97 <td>Public method to deactivate this plugin.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#ProjectDjangoPlugin.fileTypesCallback">fileTypesCallback</a></td> |
|
100 <td>Public method get the filetype associations of the Django project type.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#ProjectDjangoPlugin.getPreferences">getPreferences</a></td> |
|
103 <td>Public method to retrieve the various settings.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#ProjectDjangoPlugin.lexerAssociationCallback">lexerAssociationCallback</a></td> |
|
106 <td>Public method to get the lexer association of the Django project type for a file.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#ProjectDjangoPlugin.setPreferences">setPreferences</a></td> |
|
109 <td>Public method to store the various settings.</td> |
|
110 </tr> |
|
111 </table> |
|
112 <h3>Static Methods</h3> |
|
113 <table> |
|
114 <tr><td>None</td></tr> |
|
115 </table> |
|
116 <a NAME="ProjectDjangoPlugin.__init__" ID="ProjectDjangoPlugin.__init__"></a> |
|
117 <h4>ProjectDjangoPlugin (Constructor)</h4> |
|
118 <b>ProjectDjangoPlugin</b>(<i>ui</i>) |
|
119 <p> |
|
120 Constructor |
|
121 </p><dl> |
|
122 <dt><i>ui</i></dt> |
|
123 <dd> |
|
124 reference to the user interface object (UI.UserInterface) |
|
125 </dd> |
|
126 </dl><a NAME="ProjectDjangoPlugin.__checkVersions" ID="ProjectDjangoPlugin.__checkVersions"></a> |
|
127 <h4>ProjectDjangoPlugin.__checkVersions</h4> |
|
128 <b>__checkVersions</b>(<i></i>) |
|
129 <p> |
|
130 Private function to check that the eric5 version is ok. |
|
131 </p><dl> |
|
132 <dt>Returns:</dt> |
|
133 <dd> |
|
134 flag indicating version is ok (boolean) |
|
135 </dd> |
|
136 </dl><a NAME="ProjectDjangoPlugin.__initialize" ID="ProjectDjangoPlugin.__initialize"></a> |
|
137 <h4>ProjectDjangoPlugin.__initialize</h4> |
|
138 <b>__initialize</b>(<i></i>) |
|
139 <p> |
|
140 Private slot to (re)initialize the plugin. |
|
141 </p><a NAME="ProjectDjangoPlugin.__loadTranslator" ID="ProjectDjangoPlugin.__loadTranslator"></a> |
|
142 <h4>ProjectDjangoPlugin.__loadTranslator</h4> |
|
143 <b>__loadTranslator</b>(<i></i>) |
|
144 <p> |
|
145 Private method to load the translation file. |
|
146 </p><a NAME="ProjectDjangoPlugin.__projectClosed" ID="ProjectDjangoPlugin.__projectClosed"></a> |
|
147 <h4>ProjectDjangoPlugin.__projectClosed</h4> |
|
148 <b>__projectClosed</b>(<i></i>) |
|
149 <p> |
|
150 Private slot to handle the projectClosed signal. |
|
151 </p><a NAME="ProjectDjangoPlugin.__projectOpened" ID="ProjectDjangoPlugin.__projectOpened"></a> |
|
152 <h4>ProjectDjangoPlugin.__projectOpened</h4> |
|
153 <b>__projectOpened</b>(<i></i>) |
|
154 <p> |
|
155 Private slot to handle the projectOpened signal. |
|
156 </p><a NAME="ProjectDjangoPlugin.activate" ID="ProjectDjangoPlugin.activate"></a> |
|
157 <h4>ProjectDjangoPlugin.activate</h4> |
|
158 <b>activate</b>(<i></i>) |
|
159 <p> |
|
160 Public method to activate this plugin. |
|
161 </p><dl> |
|
162 <dt>Returns:</dt> |
|
163 <dd> |
|
164 tuple of None and activation status (boolean) |
|
165 </dd> |
|
166 </dl><a NAME="ProjectDjangoPlugin.binaryTranslationsCallback" ID="ProjectDjangoPlugin.binaryTranslationsCallback"></a> |
|
167 <h4>ProjectDjangoPlugin.binaryTranslationsCallback</h4> |
|
168 <b>binaryTranslationsCallback</b>(<i>filename</i>) |
|
169 <p> |
|
170 Public method to determine the filename of a compiled translation file |
|
171 given the translation source file. |
|
172 </p><dl> |
|
173 <dt><i>filename</i></dt> |
|
174 <dd> |
|
175 name of the translation source file (string) |
|
176 </dd> |
|
177 </dl><dl> |
|
178 <dt>Returns:</dt> |
|
179 <dd> |
|
180 name of the binary translation file (string) |
|
181 </dd> |
|
182 </dl><a NAME="ProjectDjangoPlugin.deactivate" ID="ProjectDjangoPlugin.deactivate"></a> |
|
183 <h4>ProjectDjangoPlugin.deactivate</h4> |
|
184 <b>deactivate</b>(<i></i>) |
|
185 <p> |
|
186 Public method to deactivate this plugin. |
|
187 </p><a NAME="ProjectDjangoPlugin.fileTypesCallback" ID="ProjectDjangoPlugin.fileTypesCallback"></a> |
|
188 <h4>ProjectDjangoPlugin.fileTypesCallback</h4> |
|
189 <b>fileTypesCallback</b>(<i></i>) |
|
190 <p> |
|
191 Public method get the filetype associations of the Django project type. |
|
192 </p><dl> |
|
193 <dt>Returns:</dt> |
|
194 <dd> |
|
195 dictionary with file type associations |
|
196 </dd> |
|
197 </dl><a NAME="ProjectDjangoPlugin.getPreferences" ID="ProjectDjangoPlugin.getPreferences"></a> |
|
198 <h4>ProjectDjangoPlugin.getPreferences</h4> |
|
199 <b>getPreferences</b>(<i>key</i>) |
|
200 <p> |
|
201 Public method to retrieve the various settings. |
|
202 </p><dl> |
|
203 <dt><i>key</i></dt> |
|
204 <dd> |
|
205 the key of the value to get |
|
206 </dd><dt><i>prefClass</i></dt> |
|
207 <dd> |
|
208 preferences class used as the storage area |
|
209 </dd> |
|
210 </dl><dl> |
|
211 <dt>Returns:</dt> |
|
212 <dd> |
|
213 the requested setting |
|
214 </dd> |
|
215 </dl><a NAME="ProjectDjangoPlugin.lexerAssociationCallback" ID="ProjectDjangoPlugin.lexerAssociationCallback"></a> |
|
216 <h4>ProjectDjangoPlugin.lexerAssociationCallback</h4> |
|
217 <b>lexerAssociationCallback</b>(<i>filename</i>) |
|
218 <p> |
|
219 Public method to get the lexer association of the Django project type for |
|
220 a file. |
|
221 </p><dl> |
|
222 <dt><i>filename</i></dt> |
|
223 <dd> |
|
224 name of the file (string) |
|
225 </dd> |
|
226 </dl><dl> |
|
227 <dt>Returns:</dt> |
|
228 <dd> |
|
229 name of the lexer (string) (Pygments lexers are prefixed with 'Pygments|') |
|
230 </dd> |
|
231 </dl><a NAME="ProjectDjangoPlugin.setPreferences" ID="ProjectDjangoPlugin.setPreferences"></a> |
|
232 <h4>ProjectDjangoPlugin.setPreferences</h4> |
|
233 <b>setPreferences</b>(<i>key, value</i>) |
|
234 <p> |
|
235 Public method to store the various settings. |
|
236 </p><dl> |
|
237 <dt><i>key</i></dt> |
|
238 <dd> |
|
239 the key of the setting to be set (string) |
|
240 </dd><dt><i>value</i></dt> |
|
241 <dd> |
|
242 the value to be set |
|
243 </dd><dt><i>prefClass</i></dt> |
|
244 <dd> |
|
245 preferences class used as the storage area |
|
246 </dd> |
|
247 </dl> |
|
248 <div align="right"><a href="#top">Up</a></div> |
|
249 <hr /><hr /> |
|
250 <a NAME="apiFiles" ID="apiFiles"></a> |
|
251 <h2>apiFiles</h2> |
|
252 <b>apiFiles</b>(<i>language</i>) |
|
253 <p> |
|
254 Module function to return the API files made available by this plugin. |
|
255 </p><dl> |
|
256 <dt>Returns:</dt> |
|
257 <dd> |
|
258 list of API filenames (list of string) |
|
259 </dd> |
|
260 </dl> |
|
261 <div align="right"><a href="#top">Up</a></div> |
|
262 <hr /><hr /> |
|
263 <a NAME="createDjangoPage" ID="createDjangoPage"></a> |
|
264 <h2>createDjangoPage</h2> |
|
265 <b>createDjangoPage</b>(<i>configDlg</i>) |
|
266 <p> |
|
267 Module function to create the Django configuration page. |
|
268 </p><dl> |
|
269 <dt>Returns:</dt> |
|
270 <dd> |
|
271 reference to the configuration page |
|
272 </dd> |
|
273 </dl> |
|
274 <div align="right"><a href="#top">Up</a></div> |
|
275 <hr /><hr /> |
|
276 <a NAME="getConfigData" ID="getConfigData"></a> |
|
277 <h2>getConfigData</h2> |
|
278 <b>getConfigData</b>(<i></i>) |
|
279 <p> |
|
280 Module function returning data as required by the configuration dialog. |
|
281 </p><dl> |
|
282 <dt>Returns:</dt> |
|
283 <dd> |
|
284 dictionary containing the relevant data |
|
285 </dd> |
|
286 </dl> |
|
287 <div align="right"><a href="#top">Up</a></div> |
|
288 <hr /><hr /> |
|
289 <a NAME="prepareUninstall" ID="prepareUninstall"></a> |
|
290 <h2>prepareUninstall</h2> |
|
291 <b>prepareUninstall</b>(<i></i>) |
|
292 <p> |
|
293 Module function to prepare for an uninstallation. |
|
294 </p> |
|
295 <div align="right"><a href="#top">Up</a></div> |
|
296 <hr /> |
|
297 </body></html> |