--- a/Documentation/Source/eric6.Preferences.ConfigurationPages.EditorHighlightingStylesPage.html Sat Mar 16 20:12:03 2019 +0100 +++ b/Documentation/Source/eric6.Preferences.ConfigurationPages.EditorHighlightingStylesPage.html Sat Mar 16 20:14:21 2019 +0100 @@ -51,7 +51,7 @@ ConfigurationPageBase, Ui_EditorHighlightingStylesPage <h3>Class Attributes</h3> <table> -<tr><td>FAMILYANDSIZE</td></tr><tr><td>FAMILYONLY</td></tr><tr><td>FONT</td></tr><tr><td>SIZEONLY</td></tr> +<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> </table> <h3>Class Methods</h3> <table> @@ -69,6 +69,9 @@ <td><a href="#EditorHighlightingStylesPage.__changeFont">__changeFont</a></td> <td>Private slot to change the highlighter font.</td> </tr><tr> +<td><a href="#EditorHighlightingStylesPage.__currentStyles">__currentStyles</a></td> +<td>Private method to get the styles of the current item.</td> +</tr><tr> <td><a href="#EditorHighlightingStylesPage.__exportStyles">__exportStyles</a></td> <td>Private method to export the styles of the given lexers.</td> </tr><tr> @@ -84,6 +87,15 @@ <td><a href="#EditorHighlightingStylesPage.__styleAllItems">__styleAllItems</a></td> <td>Private method to style all items of the style element list.</td> </tr><tr> +<td><a href="#EditorHighlightingStylesPage.__styleOneItem">__styleOneItem</a></td> +<td>Private method to style one item of the style element list.</td> +</tr><tr> +<td><a href="#EditorHighlightingStylesPage.__stylesForItem">__stylesForItem</a></td> +<td>Private method to get the style and sub-style number of the given item.</td> +</tr><tr> +<td><a href="#EditorHighlightingStylesPage.on_addSubstyleButton_clicked">on_addSubstyleButton_clicked</a></td> +<td>Private slot to add a new sub-style.</td> +</tr><tr> <td><a href="#EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked">on_allBackgroundColoursButton_clicked</a></td> <td>Private method used to select the background colour of all styles of a selected lexer.</td> </tr><tr> @@ -96,10 +108,19 @@ <td><a href="#EditorHighlightingStylesPage.on_backgroundButton_clicked">on_backgroundButton_clicked</a></td> <td>Private method used to select the background colour of the selected style and lexer.</td> </tr><tr> +<td><a href="#EditorHighlightingStylesPage.on_copySubstyleButton_clicked">on_copySubstyleButton_clicked</a></td> +<td>Private slot to copy the selected sub-style.</td> +</tr><tr> <td><a href="#EditorHighlightingStylesPage.on_defaultButton_clicked">on_defaultButton_clicked</a></td> <td>Private method to set the current style to its default values.</td> </tr><tr> -<td><a href="#EditorHighlightingStylesPage.on_eolfillCheckBox_toggled">on_eolfillCheckBox_toggled</a></td> +<td><a href="#EditorHighlightingStylesPage.on_deleteSubstyleButton_clicked">on_deleteSubstyleButton_clicked</a></td> +<td>Private slot to delete the selected sub-style.</td> +</tr><tr> +<td><a href="#EditorHighlightingStylesPage.on_editSubstyleButton_clicked">on_editSubstyleButton_clicked</a></td> +<td>Private slot to edit the selected sub-style entry.</td> +</tr><tr> +<td><a href="#EditorHighlightingStylesPage.on_eolfillCheckBox_clicked">on_eolfillCheckBox_clicked</a></td> <td>Private method used to set the eolfill for the selected style and lexer.</td> </tr><tr> <td><a href="#EditorHighlightingStylesPage.on_exportAllButton_clicked">on_exportAllButton_clicked</a></td> @@ -120,8 +141,8 @@ <td><a href="#EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated">on_lexerLanguageComboBox_activated</a></td> <td>Private slot to fill the style combo of the source page.</td> </tr><tr> -<td><a href="#EditorHighlightingStylesPage.on_styleElementList_currentRowChanged">on_styleElementList_currentRowChanged</a></td> -<td>Private method to set up the style element part of the source page.</td> +<td><a href="#EditorHighlightingStylesPage.on_styleElementList_currentItemChanged">on_styleElementList_currentItemChanged</a></td> +<td>Private method to handle a change of the current row.</td> </tr><tr> <td><a href="#EditorHighlightingStylesPage.save">save</a></td> <td>Public slot to save the Editor Highlighting Styles configuration.</td> @@ -180,6 +201,21 @@ <dd> flag indicating to set the font size only (boolean </dd> +</dl><a NAME="EditorHighlightingStylesPage.__currentStyles" ID="EditorHighlightingStylesPage.__currentStyles"></a> +<h4>EditorHighlightingStylesPage.__currentStyles</h4> +<b>__currentStyles</b>(<i></i>) +<p> + Private method to get the styles of the current item. +</p><dl> +<dt>Returns:</dt> +<dd> +tuple containing the style and sub-style numbers +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +tuple of (int, int) +</dd> </dl><a NAME="EditorHighlightingStylesPage.__exportStyles" ID="EditorHighlightingStylesPage.__exportStyles"></a> <h4>EditorHighlightingStylesPage.__exportStyles</h4> <b>__exportStyles</b>(<i>lexers</i>) @@ -213,19 +249,63 @@ </dd> </dl><a NAME="EditorHighlightingStylesPage.__setToDefault" ID="EditorHighlightingStylesPage.__setToDefault"></a> <h4>EditorHighlightingStylesPage.__setToDefault</h4> -<b>__setToDefault</b>(<i>style</i>) +<b>__setToDefault</b>(<i>style, substyle</i>) <p> Private method to set a specific style to its default values. </p><dl> -<dt><i>style</i></dt> +<dt><i>style</i> (int)</dt> <dd> -style to be reset (integer) +style number +</dd><dt><i>substyle</i> (int)</dt> +<dd> +sub-style number </dd> </dl><a NAME="EditorHighlightingStylesPage.__styleAllItems" ID="EditorHighlightingStylesPage.__styleAllItems"></a> <h4>EditorHighlightingStylesPage.__styleAllItems</h4> <b>__styleAllItems</b>(<i></i>) <p> Private method to style all items of the style element list. +</p><a NAME="EditorHighlightingStylesPage.__styleOneItem" ID="EditorHighlightingStylesPage.__styleOneItem"></a> +<h4>EditorHighlightingStylesPage.__styleOneItem</h4> +<b>__styleOneItem</b>(<i>item, style, substyle</i>) +<p> + Private method to style one item of the style element list. +</p><dl> +<dt><i>item</i> (QTreeWidgetItem)</dt> +<dd> +reference to the item to be styled +</dd><dt><i>style</i> (int)</dt> +<dd> +base style number +</dd><dt><i>substyle</i> (int)</dt> +<dd> +sub-style number +</dd> +</dl><a NAME="EditorHighlightingStylesPage.__stylesForItem" ID="EditorHighlightingStylesPage.__stylesForItem"></a> +<h4>EditorHighlightingStylesPage.__stylesForItem</h4> +<b>__stylesForItem</b>(<i>itm</i>) +<p> + Private method to get the style and sub-style number of the given item. +</p><dl> +<dt><i>itm</i> (QTreeWidgetItem)</dt> +<dd> +reference to the item to extract the styles from +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +tuple containing the style and sub-style numbers +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +tuple of (int, int) +</dd> +</dl><a NAME="EditorHighlightingStylesPage.on_addSubstyleButton_clicked" ID="EditorHighlightingStylesPage.on_addSubstyleButton_clicked"></a> +<h4>EditorHighlightingStylesPage.on_addSubstyleButton_clicked</h4> +<b>on_addSubstyleButton_clicked</b>(<i></i>) +<p> + Private slot to add a new sub-style. </p><a NAME="EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked" ID="EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked"></a> <h4>EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked</h4> <b>on_allBackgroundColoursButton_clicked</b>(<i></i>) @@ -249,14 +329,29 @@ <p> Private method used to select the background colour of the selected style and lexer. +</p><a NAME="EditorHighlightingStylesPage.on_copySubstyleButton_clicked" ID="EditorHighlightingStylesPage.on_copySubstyleButton_clicked"></a> +<h4>EditorHighlightingStylesPage.on_copySubstyleButton_clicked</h4> +<b>on_copySubstyleButton_clicked</b>(<i></i>) +<p> + Private slot to copy the selected sub-style. </p><a NAME="EditorHighlightingStylesPage.on_defaultButton_clicked" ID="EditorHighlightingStylesPage.on_defaultButton_clicked"></a> <h4>EditorHighlightingStylesPage.on_defaultButton_clicked</h4> <b>on_defaultButton_clicked</b>(<i></i>) <p> Private method to set the current style to its default values. -</p><a NAME="EditorHighlightingStylesPage.on_eolfillCheckBox_toggled" ID="EditorHighlightingStylesPage.on_eolfillCheckBox_toggled"></a> -<h4>EditorHighlightingStylesPage.on_eolfillCheckBox_toggled</h4> -<b>on_eolfillCheckBox_toggled</b>(<i>on</i>) +</p><a NAME="EditorHighlightingStylesPage.on_deleteSubstyleButton_clicked" ID="EditorHighlightingStylesPage.on_deleteSubstyleButton_clicked"></a> +<h4>EditorHighlightingStylesPage.on_deleteSubstyleButton_clicked</h4> +<b>on_deleteSubstyleButton_clicked</b>(<i></i>) +<p> + Private slot to delete the selected sub-style. +</p><a NAME="EditorHighlightingStylesPage.on_editSubstyleButton_clicked" ID="EditorHighlightingStylesPage.on_editSubstyleButton_clicked"></a> +<h4>EditorHighlightingStylesPage.on_editSubstyleButton_clicked</h4> +<b>on_editSubstyleButton_clicked</b>(<i></i>) +<p> + Private slot to edit the selected sub-style entry. +</p><a NAME="EditorHighlightingStylesPage.on_eolfillCheckBox_clicked" ID="EditorHighlightingStylesPage.on_eolfillCheckBox_clicked"></a> +<h4>EditorHighlightingStylesPage.on_eolfillCheckBox_clicked</h4> +<b>on_eolfillCheckBox_clicked</b>(<i>on</i>) <p> Private method used to set the eolfill for the selected style and lexer. @@ -301,15 +396,18 @@ <dd> The lexer language (string) </dd> -</dl><a NAME="EditorHighlightingStylesPage.on_styleElementList_currentRowChanged" ID="EditorHighlightingStylesPage.on_styleElementList_currentRowChanged"></a> -<h4>EditorHighlightingStylesPage.on_styleElementList_currentRowChanged</h4> -<b>on_styleElementList_currentRowChanged</b>(<i>index</i>) +</dl><a NAME="EditorHighlightingStylesPage.on_styleElementList_currentItemChanged" ID="EditorHighlightingStylesPage.on_styleElementList_currentItemChanged"></a> +<h4>EditorHighlightingStylesPage.on_styleElementList_currentItemChanged</h4> +<b>on_styleElementList_currentItemChanged</b>(<i>current, previous</i>) <p> - Private method to set up the style element part of the source page. + Private method to handle a change of the current row. </p><dl> -<dt><i>index</i></dt> +<dt><i>current</i> (QTreeWidgetItem)</dt> <dd> -the style index. +reference to the current item +</dd><dt><i>previous</i> (QTreeWidgetItem)</dt> +<dd> +reference to the previous item </dd> </dl><a NAME="EditorHighlightingStylesPage.save" ID="EditorHighlightingStylesPage.save"></a> <h4>EditorHighlightingStylesPage.save</h4> @@ -324,28 +422,36 @@ </p><dl> <dt>Returns:</dt> <dd> -array containing the index of the selected lexer language - (integer) and the index of the selected lexer entry (integer) +list containing the index of the selected lexer language + and a tuple containing the index of the parent selected lexer + entry and the index of the selected entry +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +list of int and tuple of (int, int) </dd> </dl><a NAME="EditorHighlightingStylesPage.setFont" ID="EditorHighlightingStylesPage.setFont"></a> <h4>EditorHighlightingStylesPage.setFont</h4> -<b>setFont</b>(<i>style, familyOnly, sizeOnly</i>) +<b>setFont</b>(<i>style, substyle, familyOnly, sizeOnly</i>) <p> Local function to set the font. </p><dl> -<dt><i>font</i></dt> +<dt><i>font</i> (QFont)</dt> +<dd> +font to be set +</dd><dt><i>style</i> (int)</dt> <dd> -font to be set (QFont) -</dd><dt><i>style</i></dt> +style number +</dd><dt><i>substyle</i> (int)</dt> <dd> -style to set the font for (integer) -</dd><dt><i>familyOnly</i></dt> +sub-style number +</dd><dt><i>familyOnly</i> (bool)</dt> <dd> flag indicating to set the font family only - (boolean) -</dd><dt><i>sizeOnly</i></dt> +</dd><dt><i>sizeOnly</i> (bool)</dt> <dd> -flag indicating to set the font size only (boolean +flag indicating to set the font size only </dd> </dl><a NAME="EditorHighlightingStylesPage.setSampleFont" ID="EditorHighlightingStylesPage.setSampleFont"></a> <h4>EditorHighlightingStylesPage.setSampleFont</h4>