Documentation/Source/eric6.Preferences.ConfigurationPages.EditorHighlightingStylesPage.html

branch
sub_styles
changeset 6866
b792455b35cd
parent 4698
61c0aef6a570
child 6884
2a34f22cdbc1
equal deleted inserted replaced
6865:a65349424cb7 6866:b792455b35cd
49 </p> 49 </p>
50 <h3>Derived from</h3> 50 <h3>Derived from</h3>
51 ConfigurationPageBase, Ui_EditorHighlightingStylesPage 51 ConfigurationPageBase, Ui_EditorHighlightingStylesPage
52 <h3>Class Attributes</h3> 52 <h3>Class Attributes</h3>
53 <table> 53 <table>
54 <tr><td>FAMILYANDSIZE</td></tr><tr><td>FAMILYONLY</td></tr><tr><td>FONT</td></tr><tr><td>SIZEONLY</td></tr> 54 <tr><td>FAMILYANDSIZE</td></tr><tr><td>FAMILYONLY</td></tr><tr><td>FONT</td></tr><tr><td>SIZEONLY</td></tr><tr><td>StyleRole</td></tr><tr><td>SubstyleRole</td></tr>
55 </table> 55 </table>
56 <h3>Class Methods</h3> 56 <h3>Class Methods</h3>
57 <table> 57 <table>
58 <tr><td>None</td></tr> 58 <tr><td>None</td></tr>
59 </table> 59 </table>
67 <td>Private slot used to change the font of all styles of a selected lexer.</td> 67 <td>Private slot used to change the font of all styles of a selected lexer.</td>
68 </tr><tr> 68 </tr><tr>
69 <td><a href="#EditorHighlightingStylesPage.__changeFont">__changeFont</a></td> 69 <td><a href="#EditorHighlightingStylesPage.__changeFont">__changeFont</a></td>
70 <td>Private slot to change the highlighter font.</td> 70 <td>Private slot to change the highlighter font.</td>
71 </tr><tr> 71 </tr><tr>
72 <td><a href="#EditorHighlightingStylesPage.__currentStyles">__currentStyles</a></td>
73 <td>Private method to get the styles of the current item.</td>
74 </tr><tr>
72 <td><a href="#EditorHighlightingStylesPage.__exportStyles">__exportStyles</a></td> 75 <td><a href="#EditorHighlightingStylesPage.__exportStyles">__exportStyles</a></td>
73 <td>Private method to export the styles of the given lexers.</td> 76 <td>Private method to export the styles of the given lexers.</td>
74 </tr><tr> 77 </tr><tr>
75 <td><a href="#EditorHighlightingStylesPage.__fontButtonMenuTriggered">__fontButtonMenuTriggered</a></td> 78 <td><a href="#EditorHighlightingStylesPage.__fontButtonMenuTriggered">__fontButtonMenuTriggered</a></td>
76 <td>Private slot used to select the font of the selected style and lexer.</td> 79 <td>Private slot used to select the font of the selected style and lexer.</td>
82 <td>Private method to set a specific style to its default values.</td> 85 <td>Private method to set a specific style to its default values.</td>
83 </tr><tr> 86 </tr><tr>
84 <td><a href="#EditorHighlightingStylesPage.__styleAllItems">__styleAllItems</a></td> 87 <td><a href="#EditorHighlightingStylesPage.__styleAllItems">__styleAllItems</a></td>
85 <td>Private method to style all items of the style element list.</td> 88 <td>Private method to style all items of the style element list.</td>
86 </tr><tr> 89 </tr><tr>
90 <td><a href="#EditorHighlightingStylesPage.__styleOneItem">__styleOneItem</a></td>
91 <td>Private method to style one item of the style element list.</td>
92 </tr><tr>
93 <td><a href="#EditorHighlightingStylesPage.__stylesForItem">__stylesForItem</a></td>
94 <td>Private method to get the style and sub-style number of the given item.</td>
95 </tr><tr>
96 <td><a href="#EditorHighlightingStylesPage.on_addSubstyleButton_clicked">on_addSubstyleButton_clicked</a></td>
97 <td>Private slot to add a new sub-style.</td>
98 </tr><tr>
87 <td><a href="#EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked">on_allBackgroundColoursButton_clicked</a></td> 99 <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> 100 <td>Private method used to select the background colour of all styles of a selected lexer.</td>
89 </tr><tr> 101 </tr><tr>
90 <td><a href="#EditorHighlightingStylesPage.on_allDefaultButton_clicked">on_allDefaultButton_clicked</a></td> 102 <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> 103 <td>Private method to set all styles to their default values.</td>
94 <td>Private method used to set the eolfill for all styles of a selected lexer.</td> 106 <td>Private method used to set the eolfill for all styles of a selected lexer.</td>
95 </tr><tr> 107 </tr><tr>
96 <td><a href="#EditorHighlightingStylesPage.on_backgroundButton_clicked">on_backgroundButton_clicked</a></td> 108 <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> 109 <td>Private method used to select the background colour of the selected style and lexer.</td>
98 </tr><tr> 110 </tr><tr>
111 <td><a href="#EditorHighlightingStylesPage.on_copySubstyleButton_clicked">on_copySubstyleButton_clicked</a></td>
112 <td>Private slot to copy the selected sub-style.</td>
113 </tr><tr>
99 <td><a href="#EditorHighlightingStylesPage.on_defaultButton_clicked">on_defaultButton_clicked</a></td> 114 <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> 115 <td>Private method to set the current style to its default values.</td>
101 </tr><tr> 116 </tr><tr>
102 <td><a href="#EditorHighlightingStylesPage.on_eolfillCheckBox_toggled">on_eolfillCheckBox_toggled</a></td> 117 <td><a href="#EditorHighlightingStylesPage.on_deleteSubstyleButton_clicked">on_deleteSubstyleButton_clicked</a></td>
118 <td>Private slot to delete the selected sub-style.</td>
119 </tr><tr>
120 <td><a href="#EditorHighlightingStylesPage.on_editSubstyleButton_clicked">on_editSubstyleButton_clicked</a></td>
121 <td>Private slot to edit the selected sub-style entry.</td>
122 </tr><tr>
123 <td><a href="#EditorHighlightingStylesPage.on_eolfillCheckBox_clicked">on_eolfillCheckBox_clicked</a></td>
103 <td>Private method used to set the eolfill for the selected style and lexer.</td> 124 <td>Private method used to set the eolfill for the selected style and lexer.</td>
104 </tr><tr> 125 </tr><tr>
105 <td><a href="#EditorHighlightingStylesPage.on_exportAllButton_clicked">on_exportAllButton_clicked</a></td> 126 <td><a href="#EditorHighlightingStylesPage.on_exportAllButton_clicked">on_exportAllButton_clicked</a></td>
106 <td>Private slot to export the styles of all lexers.</td> 127 <td>Private slot to export the styles of all lexers.</td>
107 </tr><tr> 128 </tr><tr>
118 <td>Private slot to import the styles of the current lexer.</td> 139 <td>Private slot to import the styles of the current lexer.</td>
119 </tr><tr> 140 </tr><tr>
120 <td><a href="#EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated">on_lexerLanguageComboBox_activated</a></td> 141 <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> 142 <td>Private slot to fill the style combo of the source page.</td>
122 </tr><tr> 143 </tr><tr>
123 <td><a href="#EditorHighlightingStylesPage.on_styleElementList_currentRowChanged">on_styleElementList_currentRowChanged</a></td> 144 <td><a href="#EditorHighlightingStylesPage.on_styleElementList_currentItemChanged">on_styleElementList_currentItemChanged</a></td>
124 <td>Private method to set up the style element part of the source page.</td> 145 <td>Private method to handle a change of the current row.</td>
125 </tr><tr> 146 </tr><tr>
126 <td><a href="#EditorHighlightingStylesPage.save">save</a></td> 147 <td><a href="#EditorHighlightingStylesPage.save">save</a></td>
127 <td>Public slot to save the Editor Highlighting Styles configuration.</td> 148 <td>Public slot to save the Editor Highlighting Styles configuration.</td>
128 </tr><tr> 149 </tr><tr>
129 <td><a href="#EditorHighlightingStylesPage.saveState">saveState</a></td> 150 <td><a href="#EditorHighlightingStylesPage.saveState">saveState</a></td>
178 flag indicating to set the font family only (boolean) 199 flag indicating to set the font family only (boolean)
179 </dd><dt><i>sizeOnly</i></dt> 200 </dd><dt><i>sizeOnly</i></dt>
180 <dd> 201 <dd>
181 flag indicating to set the font size only (boolean 202 flag indicating to set the font size only (boolean
182 </dd> 203 </dd>
204 </dl><a NAME="EditorHighlightingStylesPage.__currentStyles" ID="EditorHighlightingStylesPage.__currentStyles"></a>
205 <h4>EditorHighlightingStylesPage.__currentStyles</h4>
206 <b>__currentStyles</b>(<i></i>)
207 <p>
208 Private method to get the styles of the current item.
209 </p><dl>
210 <dt>Returns:</dt>
211 <dd>
212 tuple containing the style and sub-style numbers
213 </dd>
214 </dl><dl>
215 <dt>Return Type:</dt>
216 <dd>
217 tuple of (int, int)
218 </dd>
183 </dl><a NAME="EditorHighlightingStylesPage.__exportStyles" ID="EditorHighlightingStylesPage.__exportStyles"></a> 219 </dl><a NAME="EditorHighlightingStylesPage.__exportStyles" ID="EditorHighlightingStylesPage.__exportStyles"></a>
184 <h4>EditorHighlightingStylesPage.__exportStyles</h4> 220 <h4>EditorHighlightingStylesPage.__exportStyles</h4>
185 <b>__exportStyles</b>(<i>lexers</i>) 221 <b>__exportStyles</b>(<i>lexers</i>)
186 <p> 222 <p>
187 Private method to export the styles of the given lexers. 223 Private method to export the styles of the given lexers.
211 dictionary of lexer objects for which to import the 247 dictionary of lexer objects for which to import the
212 styles 248 styles
213 </dd> 249 </dd>
214 </dl><a NAME="EditorHighlightingStylesPage.__setToDefault" ID="EditorHighlightingStylesPage.__setToDefault"></a> 250 </dl><a NAME="EditorHighlightingStylesPage.__setToDefault" ID="EditorHighlightingStylesPage.__setToDefault"></a>
215 <h4>EditorHighlightingStylesPage.__setToDefault</h4> 251 <h4>EditorHighlightingStylesPage.__setToDefault</h4>
216 <b>__setToDefault</b>(<i>style</i>) 252 <b>__setToDefault</b>(<i>style, substyle</i>)
217 <p> 253 <p>
218 Private method to set a specific style to its default values. 254 Private method to set a specific style to its default values.
219 </p><dl> 255 </p><dl>
220 <dt><i>style</i></dt> 256 <dt><i>style</i> (int)</dt>
221 <dd> 257 <dd>
222 style to be reset (integer) 258 style number
259 </dd><dt><i>substyle</i> (int)</dt>
260 <dd>
261 sub-style number
223 </dd> 262 </dd>
224 </dl><a NAME="EditorHighlightingStylesPage.__styleAllItems" ID="EditorHighlightingStylesPage.__styleAllItems"></a> 263 </dl><a NAME="EditorHighlightingStylesPage.__styleAllItems" ID="EditorHighlightingStylesPage.__styleAllItems"></a>
225 <h4>EditorHighlightingStylesPage.__styleAllItems</h4> 264 <h4>EditorHighlightingStylesPage.__styleAllItems</h4>
226 <b>__styleAllItems</b>(<i></i>) 265 <b>__styleAllItems</b>(<i></i>)
227 <p> 266 <p>
228 Private method to style all items of the style element list. 267 Private method to style all items of the style element list.
268 </p><a NAME="EditorHighlightingStylesPage.__styleOneItem" ID="EditorHighlightingStylesPage.__styleOneItem"></a>
269 <h4>EditorHighlightingStylesPage.__styleOneItem</h4>
270 <b>__styleOneItem</b>(<i>item, style, substyle</i>)
271 <p>
272 Private method to style one item of the style element list.
273 </p><dl>
274 <dt><i>item</i> (QTreeWidgetItem)</dt>
275 <dd>
276 reference to the item to be styled
277 </dd><dt><i>style</i> (int)</dt>
278 <dd>
279 base style number
280 </dd><dt><i>substyle</i> (int)</dt>
281 <dd>
282 sub-style number
283 </dd>
284 </dl><a NAME="EditorHighlightingStylesPage.__stylesForItem" ID="EditorHighlightingStylesPage.__stylesForItem"></a>
285 <h4>EditorHighlightingStylesPage.__stylesForItem</h4>
286 <b>__stylesForItem</b>(<i>itm</i>)
287 <p>
288 Private method to get the style and sub-style number of the given item.
289 </p><dl>
290 <dt><i>itm</i> (QTreeWidgetItem)</dt>
291 <dd>
292 reference to the item to extract the styles from
293 </dd>
294 </dl><dl>
295 <dt>Returns:</dt>
296 <dd>
297 tuple containing the style and sub-style numbers
298 </dd>
299 </dl><dl>
300 <dt>Return Type:</dt>
301 <dd>
302 tuple of (int, int)
303 </dd>
304 </dl><a NAME="EditorHighlightingStylesPage.on_addSubstyleButton_clicked" ID="EditorHighlightingStylesPage.on_addSubstyleButton_clicked"></a>
305 <h4>EditorHighlightingStylesPage.on_addSubstyleButton_clicked</h4>
306 <b>on_addSubstyleButton_clicked</b>(<i></i>)
307 <p>
308 Private slot to add a new sub-style.
229 </p><a NAME="EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked" ID="EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked"></a> 309 </p><a NAME="EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked" ID="EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked"></a>
230 <h4>EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked</h4> 310 <h4>EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked</h4>
231 <b>on_allBackgroundColoursButton_clicked</b>(<i></i>) 311 <b>on_allBackgroundColoursButton_clicked</b>(<i></i>)
232 <p> 312 <p>
233 Private method used to select the background colour of all styles of a 313 Private method used to select the background colour of all styles of a
247 <h4>EditorHighlightingStylesPage.on_backgroundButton_clicked</h4> 327 <h4>EditorHighlightingStylesPage.on_backgroundButton_clicked</h4>
248 <b>on_backgroundButton_clicked</b>(<i></i>) 328 <b>on_backgroundButton_clicked</b>(<i></i>)
249 <p> 329 <p>
250 Private method used to select the background colour of the selected 330 Private method used to select the background colour of the selected
251 style and lexer. 331 style and lexer.
332 </p><a NAME="EditorHighlightingStylesPage.on_copySubstyleButton_clicked" ID="EditorHighlightingStylesPage.on_copySubstyleButton_clicked"></a>
333 <h4>EditorHighlightingStylesPage.on_copySubstyleButton_clicked</h4>
334 <b>on_copySubstyleButton_clicked</b>(<i></i>)
335 <p>
336 Private slot to copy the selected sub-style.
252 </p><a NAME="EditorHighlightingStylesPage.on_defaultButton_clicked" ID="EditorHighlightingStylesPage.on_defaultButton_clicked"></a> 337 </p><a NAME="EditorHighlightingStylesPage.on_defaultButton_clicked" ID="EditorHighlightingStylesPage.on_defaultButton_clicked"></a>
253 <h4>EditorHighlightingStylesPage.on_defaultButton_clicked</h4> 338 <h4>EditorHighlightingStylesPage.on_defaultButton_clicked</h4>
254 <b>on_defaultButton_clicked</b>(<i></i>) 339 <b>on_defaultButton_clicked</b>(<i></i>)
255 <p> 340 <p>
256 Private method to set the current style to its default values. 341 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> 342 </p><a NAME="EditorHighlightingStylesPage.on_deleteSubstyleButton_clicked" ID="EditorHighlightingStylesPage.on_deleteSubstyleButton_clicked"></a>
258 <h4>EditorHighlightingStylesPage.on_eolfillCheckBox_toggled</h4> 343 <h4>EditorHighlightingStylesPage.on_deleteSubstyleButton_clicked</h4>
259 <b>on_eolfillCheckBox_toggled</b>(<i>on</i>) 344 <b>on_deleteSubstyleButton_clicked</b>(<i></i>)
345 <p>
346 Private slot to delete the selected sub-style.
347 </p><a NAME="EditorHighlightingStylesPage.on_editSubstyleButton_clicked" ID="EditorHighlightingStylesPage.on_editSubstyleButton_clicked"></a>
348 <h4>EditorHighlightingStylesPage.on_editSubstyleButton_clicked</h4>
349 <b>on_editSubstyleButton_clicked</b>(<i></i>)
350 <p>
351 Private slot to edit the selected sub-style entry.
352 </p><a NAME="EditorHighlightingStylesPage.on_eolfillCheckBox_clicked" ID="EditorHighlightingStylesPage.on_eolfillCheckBox_clicked"></a>
353 <h4>EditorHighlightingStylesPage.on_eolfillCheckBox_clicked</h4>
354 <b>on_eolfillCheckBox_clicked</b>(<i>on</i>)
260 <p> 355 <p>
261 Private method used to set the eolfill for the selected style and 356 Private method used to set the eolfill for the selected style and
262 lexer. 357 lexer.
263 </p><dl> 358 </p><dl>
264 <dt><i>on</i></dt> 359 <dt><i>on</i></dt>
299 </p><dl> 394 </p><dl>
300 <dt><i>language</i></dt> 395 <dt><i>language</i></dt>
301 <dd> 396 <dd>
302 The lexer language (string) 397 The lexer language (string)
303 </dd> 398 </dd>
304 </dl><a NAME="EditorHighlightingStylesPage.on_styleElementList_currentRowChanged" ID="EditorHighlightingStylesPage.on_styleElementList_currentRowChanged"></a> 399 </dl><a NAME="EditorHighlightingStylesPage.on_styleElementList_currentItemChanged" ID="EditorHighlightingStylesPage.on_styleElementList_currentItemChanged"></a>
305 <h4>EditorHighlightingStylesPage.on_styleElementList_currentRowChanged</h4> 400 <h4>EditorHighlightingStylesPage.on_styleElementList_currentItemChanged</h4>
306 <b>on_styleElementList_currentRowChanged</b>(<i>index</i>) 401 <b>on_styleElementList_currentItemChanged</b>(<i>current, previous</i>)
307 <p> 402 <p>
308 Private method to set up the style element part of the source page. 403 Private method to handle a change of the current row.
309 </p><dl> 404 </p><dl>
310 <dt><i>index</i></dt> 405 <dt><i>current</i> (QTreeWidgetItem)</dt>
311 <dd> 406 <dd>
312 the style index. 407 reference to the current item
408 </dd><dt><i>previous</i> (QTreeWidgetItem)</dt>
409 <dd>
410 reference to the previous item
313 </dd> 411 </dd>
314 </dl><a NAME="EditorHighlightingStylesPage.save" ID="EditorHighlightingStylesPage.save"></a> 412 </dl><a NAME="EditorHighlightingStylesPage.save" ID="EditorHighlightingStylesPage.save"></a>
315 <h4>EditorHighlightingStylesPage.save</h4> 413 <h4>EditorHighlightingStylesPage.save</h4>
316 <b>save</b>(<i></i>) 414 <b>save</b>(<i></i>)
317 <p> 415 <p>
322 <p> 420 <p>
323 Public method to save the current state of the widget. 421 Public method to save the current state of the widget.
324 </p><dl> 422 </p><dl>
325 <dt>Returns:</dt> 423 <dt>Returns:</dt>
326 <dd> 424 <dd>
327 array containing the index of the selected lexer language 425 list containing the index of the selected lexer language
328 (integer) and the index of the selected lexer entry (integer) 426 and a tuple containing the index of the parent selected lexer
427 entry and the index of the selected entry
428 </dd>
429 </dl><dl>
430 <dt>Return Type:</dt>
431 <dd>
432 list of int and tuple of (int, int)
329 </dd> 433 </dd>
330 </dl><a NAME="EditorHighlightingStylesPage.setFont" ID="EditorHighlightingStylesPage.setFont"></a> 434 </dl><a NAME="EditorHighlightingStylesPage.setFont" ID="EditorHighlightingStylesPage.setFont"></a>
331 <h4>EditorHighlightingStylesPage.setFont</h4> 435 <h4>EditorHighlightingStylesPage.setFont</h4>
332 <b>setFont</b>(<i>style, familyOnly, sizeOnly</i>) 436 <b>setFont</b>(<i>style, substyle, familyOnly, sizeOnly</i>)
333 <p> 437 <p>
334 Local function to set the font. 438 Local function to set the font.
335 </p><dl> 439 </p><dl>
336 <dt><i>font</i></dt> 440 <dt><i>font</i> (QFont)</dt>
337 <dd> 441 <dd>
338 font to be set (QFont) 442 font to be set
339 </dd><dt><i>style</i></dt> 443 </dd><dt><i>style</i> (int)</dt>
340 <dd> 444 <dd>
341 style to set the font for (integer) 445 style number
342 </dd><dt><i>familyOnly</i></dt> 446 </dd><dt><i>substyle</i> (int)</dt>
447 <dd>
448 sub-style number
449 </dd><dt><i>familyOnly</i> (bool)</dt>
343 <dd> 450 <dd>
344 flag indicating to set the font family only 451 flag indicating to set the font family only
345 (boolean) 452 </dd><dt><i>sizeOnly</i> (bool)</dt>
346 </dd><dt><i>sizeOnly</i></dt> 453 <dd>
347 <dd> 454 flag indicating to set the font size only
348 flag indicating to set the font size only (boolean
349 </dd> 455 </dd>
350 </dl><a NAME="EditorHighlightingStylesPage.setSampleFont" ID="EditorHighlightingStylesPage.setSampleFont"></a> 456 </dl><a NAME="EditorHighlightingStylesPage.setSampleFont" ID="EditorHighlightingStylesPage.setSampleFont"></a>
351 <h4>EditorHighlightingStylesPage.setSampleFont</h4> 457 <h4>EditorHighlightingStylesPage.setSampleFont</h4>
352 <b>setSampleFont</b>(<i>familyOnly, sizeOnly</i>) 458 <b>setSampleFont</b>(<i>familyOnly, sizeOnly</i>)
353 <p> 459 <p>

eric ide

mercurial