|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Preferences.ConfigurationPages.EditorHighlightingStylesPage</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.Preferences.ConfigurationPages.EditorHighlightingStylesPage</h1> |
|
23 <p> |
|
24 Module implementing the Editor Highlighting Styles configuration page. |
|
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="#EditorHighlightingStylesPage">EditorHighlightingStylesPage</a></td> |
|
34 <td>Class implementing the Editor Highlighting Styles configuration page.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr> |
|
40 <td><a href="#create">create</a></td> |
|
41 <td>Module function to create the configuration page.</td> |
|
42 </tr> |
|
43 </table> |
|
44 <hr /><hr /> |
|
45 <a NAME="EditorHighlightingStylesPage" ID="EditorHighlightingStylesPage"></a> |
|
46 <h2>EditorHighlightingStylesPage</h2> |
|
47 <p> |
|
48 Class implementing the Editor Highlighting Styles configuration page. |
|
49 </p> |
|
50 <h3>Derived from</h3> |
|
51 ConfigurationPageBase, Ui_EditorHighlightingStylesPage |
|
52 <h3>Class Attributes</h3> |
|
53 <table> |
|
54 <tr><td>FAMILYANDSIZE</td></tr><tr><td>FAMILYONLY</td></tr><tr><td>FONT</td></tr><tr><td>SIZEONLY</td></tr> |
|
55 </table> |
|
56 <h3>Class Methods</h3> |
|
57 <table> |
|
58 <tr><td>None</td></tr> |
|
59 </table> |
|
60 <h3>Methods</h3> |
|
61 <table> |
|
62 <tr> |
|
63 <td><a href="#EditorHighlightingStylesPage.__init__">EditorHighlightingStylesPage</a></td> |
|
64 <td>Constructor</td> |
|
65 </tr><tr> |
|
66 <td><a href="#EditorHighlightingStylesPage.__allFontsButtonMenuTriggered">__allFontsButtonMenuTriggered</a></td> |
|
67 <td>Private slot used to change the font of all styles of a selected lexer.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#EditorHighlightingStylesPage.__changeFont">__changeFont</a></td> |
|
70 <td>Private slot to change the highlighter font.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#EditorHighlightingStylesPage.__exportStyles">__exportStyles</a></td> |
|
73 <td>Private method to export the styles of the given lexers.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#EditorHighlightingStylesPage.__fontButtonMenuTriggered">__fontButtonMenuTriggered</a></td> |
|
76 <td>Private slot used to select the font of the selected style and lexer.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#EditorHighlightingStylesPage.__importStyles">__importStyles</a></td> |
|
79 <td>Private method to import the styles of the given lexers.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#EditorHighlightingStylesPage.__setToDefault">__setToDefault</a></td> |
|
82 <td>Private method to set a specific style to its default values.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#EditorHighlightingStylesPage.__styleAllItems">__styleAllItems</a></td> |
|
85 <td>Private method to style all items of the style element list.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked">on_allBackgroundColoursButton_clicked</a></td> |
|
88 <td>Private method used to select the background colour of all styles of a selected lexer.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#EditorHighlightingStylesPage.on_allDefaultButton_clicked">on_allDefaultButton_clicked</a></td> |
|
91 <td>Private method to set all styles to their default values.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#EditorHighlightingStylesPage.on_allEolFillButton_clicked">on_allEolFillButton_clicked</a></td> |
|
94 <td>Private method used to set the eolfill for all styles of a selected lexer.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#EditorHighlightingStylesPage.on_backgroundButton_clicked">on_backgroundButton_clicked</a></td> |
|
97 <td>Private method used to select the background colour of the selected style and lexer.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#EditorHighlightingStylesPage.on_defaultButton_clicked">on_defaultButton_clicked</a></td> |
|
100 <td>Private method to set the current style to its default values.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#EditorHighlightingStylesPage.on_eolfillCheckBox_toggled">on_eolfillCheckBox_toggled</a></td> |
|
103 <td>Private method used to set the eolfill for the selected style and lexer.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#EditorHighlightingStylesPage.on_exportAllButton_clicked">on_exportAllButton_clicked</a></td> |
|
106 <td>Private slot to export the styles of all lexers.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#EditorHighlightingStylesPage.on_exportCurrentButton_clicked">on_exportCurrentButton_clicked</a></td> |
|
109 <td>Private slot to export the styles of the current lexer.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#EditorHighlightingStylesPage.on_foregroundButton_clicked">on_foregroundButton_clicked</a></td> |
|
112 <td>Private method used to select the foreground colour of the selected style and lexer.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#EditorHighlightingStylesPage.on_importAllButton_clicked">on_importAllButton_clicked</a></td> |
|
115 <td>Private slot to import the styles of all lexers.</td> |
|
116 </tr><tr> |
|
117 <td><a href="#EditorHighlightingStylesPage.on_importCurrentButton_clicked">on_importCurrentButton_clicked</a></td> |
|
118 <td>Private slot to import the styles of the current lexer.</td> |
|
119 </tr><tr> |
|
120 <td><a href="#EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated">on_lexerLanguageComboBox_activated</a></td> |
|
121 <td>Private slot to fill the style combo of the source page.</td> |
|
122 </tr><tr> |
|
123 <td><a href="#EditorHighlightingStylesPage.on_styleElementList_currentRowChanged">on_styleElementList_currentRowChanged</a></td> |
|
124 <td>Private method to set up the style element part of the source page.</td> |
|
125 </tr><tr> |
|
126 <td><a href="#EditorHighlightingStylesPage.save">save</a></td> |
|
127 <td>Public slot to save the Editor Highlighting Styles configuration.</td> |
|
128 </tr><tr> |
|
129 <td><a href="#EditorHighlightingStylesPage.saveState">saveState</a></td> |
|
130 <td>Public method to save the current state of the widget.</td> |
|
131 </tr><tr> |
|
132 <td><a href="#EditorHighlightingStylesPage.setFont">setFont</a></td> |
|
133 <td>Local function to set the font.</td> |
|
134 </tr><tr> |
|
135 <td><a href="#EditorHighlightingStylesPage.setSampleFont">setSampleFont</a></td> |
|
136 <td>Local function to set the font of the sample text.</td> |
|
137 </tr><tr> |
|
138 <td><a href="#EditorHighlightingStylesPage.setState">setState</a></td> |
|
139 <td>Public method to set the state of the widget.</td> |
|
140 </tr> |
|
141 </table> |
|
142 <h3>Static Methods</h3> |
|
143 <table> |
|
144 <tr><td>None</td></tr> |
|
145 </table> |
|
146 <a NAME="EditorHighlightingStylesPage.__init__" ID="EditorHighlightingStylesPage.__init__"></a> |
|
147 <h4>EditorHighlightingStylesPage (Constructor)</h4> |
|
148 <b>EditorHighlightingStylesPage</b>(<i>lexers</i>) |
|
149 <p> |
|
150 Constructor |
|
151 </p><dl> |
|
152 <dt><i>lexers</i></dt> |
|
153 <dd> |
|
154 reference to the lexers dictionary |
|
155 </dd> |
|
156 </dl><a NAME="EditorHighlightingStylesPage.__allFontsButtonMenuTriggered" ID="EditorHighlightingStylesPage.__allFontsButtonMenuTriggered"></a> |
|
157 <h4>EditorHighlightingStylesPage.__allFontsButtonMenuTriggered</h4> |
|
158 <b>__allFontsButtonMenuTriggered</b>(<i>act</i>) |
|
159 <p> |
|
160 Private slot used to change the font of all styles of a selected lexer. |
|
161 </p><dl> |
|
162 <dt><i>act</i></dt> |
|
163 <dd> |
|
164 reference to the triggering action (QAction) |
|
165 </dd> |
|
166 </dl><a NAME="EditorHighlightingStylesPage.__changeFont" ID="EditorHighlightingStylesPage.__changeFont"></a> |
|
167 <h4>EditorHighlightingStylesPage.__changeFont</h4> |
|
168 <b>__changeFont</b>(<i>doAll, familyOnly, sizeOnly</i>) |
|
169 <p> |
|
170 Private slot to change the highlighter font. |
|
171 </p><dl> |
|
172 <dt><i>doAll</i></dt> |
|
173 <dd> |
|
174 flag indicating to change the font for all styles |
|
175 (boolean) |
|
176 </dd><dt><i>familyOnly</i></dt> |
|
177 <dd> |
|
178 flag indicating to set the font family only (boolean) |
|
179 </dd><dt><i>sizeOnly</i></dt> |
|
180 <dd> |
|
181 flag indicating to set the font size only (boolean |
|
182 </dd> |
|
183 </dl><a NAME="EditorHighlightingStylesPage.__exportStyles" ID="EditorHighlightingStylesPage.__exportStyles"></a> |
|
184 <h4>EditorHighlightingStylesPage.__exportStyles</h4> |
|
185 <b>__exportStyles</b>(<i>lexers</i>) |
|
186 <p> |
|
187 Private method to export the styles of the given lexers. |
|
188 </p><dl> |
|
189 <dt><i>lexers</i></dt> |
|
190 <dd> |
|
191 list of lexer objects for which to export the styles |
|
192 </dd> |
|
193 </dl><a NAME="EditorHighlightingStylesPage.__fontButtonMenuTriggered" ID="EditorHighlightingStylesPage.__fontButtonMenuTriggered"></a> |
|
194 <h4>EditorHighlightingStylesPage.__fontButtonMenuTriggered</h4> |
|
195 <b>__fontButtonMenuTriggered</b>(<i>act</i>) |
|
196 <p> |
|
197 Private slot used to select the font of the selected style and lexer. |
|
198 </p><dl> |
|
199 <dt><i>act</i></dt> |
|
200 <dd> |
|
201 reference to the triggering action (QAction) |
|
202 </dd> |
|
203 </dl><a NAME="EditorHighlightingStylesPage.__importStyles" ID="EditorHighlightingStylesPage.__importStyles"></a> |
|
204 <h4>EditorHighlightingStylesPage.__importStyles</h4> |
|
205 <b>__importStyles</b>(<i>lexers</i>) |
|
206 <p> |
|
207 Private method to import the styles of the given lexers. |
|
208 </p><dl> |
|
209 <dt><i>lexers</i></dt> |
|
210 <dd> |
|
211 dictionary of lexer objects for which to import the |
|
212 styles |
|
213 </dd> |
|
214 </dl><a NAME="EditorHighlightingStylesPage.__setToDefault" ID="EditorHighlightingStylesPage.__setToDefault"></a> |
|
215 <h4>EditorHighlightingStylesPage.__setToDefault</h4> |
|
216 <b>__setToDefault</b>(<i>style</i>) |
|
217 <p> |
|
218 Private method to set a specific style to its default values. |
|
219 </p><dl> |
|
220 <dt><i>style</i></dt> |
|
221 <dd> |
|
222 style to be reset (integer) |
|
223 </dd> |
|
224 </dl><a NAME="EditorHighlightingStylesPage.__styleAllItems" ID="EditorHighlightingStylesPage.__styleAllItems"></a> |
|
225 <h4>EditorHighlightingStylesPage.__styleAllItems</h4> |
|
226 <b>__styleAllItems</b>(<i></i>) |
|
227 <p> |
|
228 Private method to style all items of the style element list. |
|
229 </p><a NAME="EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked" ID="EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked"></a> |
|
230 <h4>EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked</h4> |
|
231 <b>on_allBackgroundColoursButton_clicked</b>(<i></i>) |
|
232 <p> |
|
233 Private method used to select the background colour of all styles of a |
|
234 selected lexer. |
|
235 </p><a NAME="EditorHighlightingStylesPage.on_allDefaultButton_clicked" ID="EditorHighlightingStylesPage.on_allDefaultButton_clicked"></a> |
|
236 <h4>EditorHighlightingStylesPage.on_allDefaultButton_clicked</h4> |
|
237 <b>on_allDefaultButton_clicked</b>(<i></i>) |
|
238 <p> |
|
239 Private method to set all styles to their default values. |
|
240 </p><a NAME="EditorHighlightingStylesPage.on_allEolFillButton_clicked" ID="EditorHighlightingStylesPage.on_allEolFillButton_clicked"></a> |
|
241 <h4>EditorHighlightingStylesPage.on_allEolFillButton_clicked</h4> |
|
242 <b>on_allEolFillButton_clicked</b>(<i></i>) |
|
243 <p> |
|
244 Private method used to set the eolfill for all styles of a selected |
|
245 lexer. |
|
246 </p><a NAME="EditorHighlightingStylesPage.on_backgroundButton_clicked" ID="EditorHighlightingStylesPage.on_backgroundButton_clicked"></a> |
|
247 <h4>EditorHighlightingStylesPage.on_backgroundButton_clicked</h4> |
|
248 <b>on_backgroundButton_clicked</b>(<i></i>) |
|
249 <p> |
|
250 Private method used to select the background colour of the selected |
|
251 style and lexer. |
|
252 </p><a NAME="EditorHighlightingStylesPage.on_defaultButton_clicked" ID="EditorHighlightingStylesPage.on_defaultButton_clicked"></a> |
|
253 <h4>EditorHighlightingStylesPage.on_defaultButton_clicked</h4> |
|
254 <b>on_defaultButton_clicked</b>(<i></i>) |
|
255 <p> |
|
256 Private method to set the current style to its default values. |
|
257 </p><a NAME="EditorHighlightingStylesPage.on_eolfillCheckBox_toggled" ID="EditorHighlightingStylesPage.on_eolfillCheckBox_toggled"></a> |
|
258 <h4>EditorHighlightingStylesPage.on_eolfillCheckBox_toggled</h4> |
|
259 <b>on_eolfillCheckBox_toggled</b>(<i>on</i>) |
|
260 <p> |
|
261 Private method used to set the eolfill for the selected style and |
|
262 lexer. |
|
263 </p><dl> |
|
264 <dt><i>on</i></dt> |
|
265 <dd> |
|
266 flag indicating enabled or disabled state (boolean) |
|
267 </dd> |
|
268 </dl><a NAME="EditorHighlightingStylesPage.on_exportAllButton_clicked" ID="EditorHighlightingStylesPage.on_exportAllButton_clicked"></a> |
|
269 <h4>EditorHighlightingStylesPage.on_exportAllButton_clicked</h4> |
|
270 <b>on_exportAllButton_clicked</b>(<i></i>) |
|
271 <p> |
|
272 Private slot to export the styles of all lexers. |
|
273 </p><a NAME="EditorHighlightingStylesPage.on_exportCurrentButton_clicked" ID="EditorHighlightingStylesPage.on_exportCurrentButton_clicked"></a> |
|
274 <h4>EditorHighlightingStylesPage.on_exportCurrentButton_clicked</h4> |
|
275 <b>on_exportCurrentButton_clicked</b>(<i></i>) |
|
276 <p> |
|
277 Private slot to export the styles of the current lexer. |
|
278 </p><a NAME="EditorHighlightingStylesPage.on_foregroundButton_clicked" ID="EditorHighlightingStylesPage.on_foregroundButton_clicked"></a> |
|
279 <h4>EditorHighlightingStylesPage.on_foregroundButton_clicked</h4> |
|
280 <b>on_foregroundButton_clicked</b>(<i></i>) |
|
281 <p> |
|
282 Private method used to select the foreground colour of the selected |
|
283 style and lexer. |
|
284 </p><a NAME="EditorHighlightingStylesPage.on_importAllButton_clicked" ID="EditorHighlightingStylesPage.on_importAllButton_clicked"></a> |
|
285 <h4>EditorHighlightingStylesPage.on_importAllButton_clicked</h4> |
|
286 <b>on_importAllButton_clicked</b>(<i></i>) |
|
287 <p> |
|
288 Private slot to import the styles of all lexers. |
|
289 </p><a NAME="EditorHighlightingStylesPage.on_importCurrentButton_clicked" ID="EditorHighlightingStylesPage.on_importCurrentButton_clicked"></a> |
|
290 <h4>EditorHighlightingStylesPage.on_importCurrentButton_clicked</h4> |
|
291 <b>on_importCurrentButton_clicked</b>(<i></i>) |
|
292 <p> |
|
293 Private slot to import the styles of the current lexer. |
|
294 </p><a NAME="EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated" ID="EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated"></a> |
|
295 <h4>EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated</h4> |
|
296 <b>on_lexerLanguageComboBox_activated</b>(<i>language</i>) |
|
297 <p> |
|
298 Private slot to fill the style combo of the source page. |
|
299 </p><dl> |
|
300 <dt><i>language</i></dt> |
|
301 <dd> |
|
302 The lexer language (string) |
|
303 </dd> |
|
304 </dl><a NAME="EditorHighlightingStylesPage.on_styleElementList_currentRowChanged" ID="EditorHighlightingStylesPage.on_styleElementList_currentRowChanged"></a> |
|
305 <h4>EditorHighlightingStylesPage.on_styleElementList_currentRowChanged</h4> |
|
306 <b>on_styleElementList_currentRowChanged</b>(<i>index</i>) |
|
307 <p> |
|
308 Private method to set up the style element part of the source page. |
|
309 </p><dl> |
|
310 <dt><i>index</i></dt> |
|
311 <dd> |
|
312 the style index. |
|
313 </dd> |
|
314 </dl><a NAME="EditorHighlightingStylesPage.save" ID="EditorHighlightingStylesPage.save"></a> |
|
315 <h4>EditorHighlightingStylesPage.save</h4> |
|
316 <b>save</b>(<i></i>) |
|
317 <p> |
|
318 Public slot to save the Editor Highlighting Styles configuration. |
|
319 </p><a NAME="EditorHighlightingStylesPage.saveState" ID="EditorHighlightingStylesPage.saveState"></a> |
|
320 <h4>EditorHighlightingStylesPage.saveState</h4> |
|
321 <b>saveState</b>(<i></i>) |
|
322 <p> |
|
323 Public method to save the current state of the widget. |
|
324 </p><dl> |
|
325 <dt>Returns:</dt> |
|
326 <dd> |
|
327 array containing the index of the selected lexer language |
|
328 (integer) and the index of the selected lexer entry (integer) |
|
329 </dd> |
|
330 </dl><a NAME="EditorHighlightingStylesPage.setFont" ID="EditorHighlightingStylesPage.setFont"></a> |
|
331 <h4>EditorHighlightingStylesPage.setFont</h4> |
|
332 <b>setFont</b>(<i>style, familyOnly, sizeOnly</i>) |
|
333 <p> |
|
334 Local function to set the font. |
|
335 </p><dl> |
|
336 <dt><i>font</i></dt> |
|
337 <dd> |
|
338 font to be set (QFont) |
|
339 </dd><dt><i>style</i></dt> |
|
340 <dd> |
|
341 style to set the font for (integer) |
|
342 </dd><dt><i>familyOnly</i></dt> |
|
343 <dd> |
|
344 flag indicating to set the font family only |
|
345 (boolean) |
|
346 </dd><dt><i>sizeOnly</i></dt> |
|
347 <dd> |
|
348 flag indicating to set the font size only (boolean |
|
349 </dd> |
|
350 </dl><a NAME="EditorHighlightingStylesPage.setSampleFont" ID="EditorHighlightingStylesPage.setSampleFont"></a> |
|
351 <h4>EditorHighlightingStylesPage.setSampleFont</h4> |
|
352 <b>setSampleFont</b>(<i>familyOnly, sizeOnly</i>) |
|
353 <p> |
|
354 Local function to set the font of the sample text. |
|
355 </p><dl> |
|
356 <dt><i>font</i></dt> |
|
357 <dd> |
|
358 font to be set (QFont) |
|
359 </dd><dt><i>familyOnly</i></dt> |
|
360 <dd> |
|
361 flag indicating to set the font family only |
|
362 (boolean) |
|
363 </dd><dt><i>sizeOnly</i></dt> |
|
364 <dd> |
|
365 flag indicating to set the font size only (boolean |
|
366 </dd> |
|
367 </dl><a NAME="EditorHighlightingStylesPage.setState" ID="EditorHighlightingStylesPage.setState"></a> |
|
368 <h4>EditorHighlightingStylesPage.setState</h4> |
|
369 <b>setState</b>(<i>state</i>) |
|
370 <p> |
|
371 Public method to set the state of the widget. |
|
372 </p><dl> |
|
373 <dt><i>state</i></dt> |
|
374 <dd> |
|
375 state data generated by saveState |
|
376 </dd> |
|
377 </dl> |
|
378 <div align="right"><a href="#top">Up</a></div> |
|
379 <hr /><hr /> |
|
380 <a NAME="create" ID="create"></a> |
|
381 <h2>create</h2> |
|
382 <b>create</b>(<i>dlg</i>) |
|
383 <p> |
|
384 Module function to create the configuration page. |
|
385 </p><dl> |
|
386 <dt><i>dlg</i></dt> |
|
387 <dd> |
|
388 reference to the configuration dialog |
|
389 </dd> |
|
390 </dl><dl> |
|
391 <dt>Returns:</dt> |
|
392 <dd> |
|
393 reference to the instantiated page (ConfigurationPageBase) |
|
394 </dd> |
|
395 </dl> |
|
396 <div align="right"><a href="#top">Up</a></div> |
|
397 <hr /> |
|
398 </body></html> |