Fri, 03 Nov 2023 19:36:14 +0100
Editor
- Added code to show annotations of type 'Info'.
<!DOCTYPE html> <html><head> <title>eric7.Preferences.ConfigurationPages.EditorStylesPage</title> <meta charset="UTF-8"> <link rel="stylesheet" href="styles.css"> </head> <body> <a NAME="top" ID="top"></a> <h1>eric7.Preferences.ConfigurationPages.EditorStylesPage</h1> <p> Module implementing the Editor Styles configuration page. </p> <h3>Global Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#EditorStylesPage">EditorStylesPage</a></td> <td>Class implementing the Editor Styles configuration page.</td> </tr> </table> <h3>Functions</h3> <table> <tr> <td><a href="#create">create</a></td> <td>Module function to create the configuration page.</td> </tr> </table> <hr /> <hr /> <a NAME="EditorStylesPage" ID="EditorStylesPage"></a> <h2>EditorStylesPage</h2> <p> Class implementing the Editor Styles configuration page. </p> <h3>Derived from</h3> ConfigurationPageBase, Ui_EditorStylesPage <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#EditorStylesPage.__init__">EditorStylesPage</a></td> <td>Constructor</td> </tr> <tr> <td><a href="#EditorStylesPage.__selectAnnotationColor">__selectAnnotationColor</a></td> <td>Private method to select an annotation color and update the sample.</td> </tr> <tr> <td><a href="#EditorStylesPage.__setSampleStyleSheet">__setSampleStyleSheet</a></td> <td>Private method to colorize a sample with given foreground and background colors.</td> </tr> <tr> <td><a href="#EditorStylesPage.on_annotationsErrorBgButton_clicked">on_annotationsErrorBgButton_clicked</a></td> <td>Private slot to set the background colour of the error annotations.</td> </tr> <tr> <td><a href="#EditorStylesPage.on_annotationsErrorFgButton_clicked">on_annotationsErrorFgButton_clicked</a></td> <td>Private slot to set the foreground colour of the error annotations.</td> </tr> <tr> <td><a href="#EditorStylesPage.on_annotationsInformationBgButton_clicked">on_annotationsInformationBgButton_clicked</a></td> <td>Private slot to set the background colour of the information annotations.</td> </tr> <tr> <td><a href="#EditorStylesPage.on_annotationsInformationFgButton_clicked">on_annotationsInformationFgButton_clicked</a></td> <td>Private slot to set the foreground colour of the information annotations.</td> </tr> <tr> <td><a href="#EditorStylesPage.on_annotationsStyleWarningBgButton_clicked">on_annotationsStyleWarningBgButton_clicked</a></td> <td>Private slot to set the background colour of the style annotations.</td> </tr> <tr> <td><a href="#EditorStylesPage.on_annotationsStyleWarningFgButton_clicked">on_annotationsStyleWarningFgButton_clicked</a></td> <td>Private slot to set the foreground colour of the style annotations.</td> </tr> <tr> <td><a href="#EditorStylesPage.on_annotationsWarningBgButton_clicked">on_annotationsWarningBgButton_clicked</a></td> <td>Private slot to set the background colour of the warning annotations.</td> </tr> <tr> <td><a href="#EditorStylesPage.on_annotationsWarningFgButton_clicked">on_annotationsWarningFgButton_clicked</a></td> <td>Private slot to set the foreground colour of the warning annotations.</td> </tr> <tr> <td><a href="#EditorStylesPage.on_defaultFontButton_clicked">on_defaultFontButton_clicked</a></td> <td>Private method used to select the default font for the editor.</td> </tr> <tr> <td><a href="#EditorStylesPage.on_linenumbersFontButton_clicked">on_linenumbersFontButton_clicked</a></td> <td>Private method used to select the font for the editor margins.</td> </tr> <tr> <td><a href="#EditorStylesPage.on_monospacedFontButton_clicked">on_monospacedFontButton_clicked</a></td> <td>Private method used to select the font to be used as the monospaced font.</td> </tr> <tr> <td><a href="#EditorStylesPage.polishPage">polishPage</a></td> <td>Public slot to perform some polishing actions.</td> </tr> <tr> <td><a href="#EditorStylesPage.save">save</a></td> <td>Public slot to save the Editor Styles configuration.</td> </tr> <tr> <td><a href="#EditorStylesPage.setMode">setMode</a></td> <td>Public method to perform mode dependent setups.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="EditorStylesPage.__init__" ID="EditorStylesPage.__init__"></a> <h4>EditorStylesPage (Constructor)</h4> <b>EditorStylesPage</b>(<i></i>) <p> Constructor </p> <a NAME="EditorStylesPage.__selectAnnotationColor" ID="EditorStylesPage.__selectAnnotationColor"></a> <h4>EditorStylesPage.__selectAnnotationColor</h4> <b>__selectAnnotationColor</b>(<i>annotationType, isBackground, annotationSample</i>) <p> Private method to select an annotation color and update the sample. </p> <dl> <dt><i>annotationType</i> (str)</dt> <dd> type of the annotation </dd> <dt><i>isBackground</i> (bool)</dt> <dd> flag indicating the background color </dd> <dt><i>annotationSample</i> (QLineEdit)</dt> <dd> reference to the annotation sample widget </dd> </dl> <a NAME="EditorStylesPage.__setSampleStyleSheet" ID="EditorStylesPage.__setSampleStyleSheet"></a> <h4>EditorStylesPage.__setSampleStyleSheet</h4> <b>__setSampleStyleSheet</b>(<i>sampleLineEdit, color, background</i>) <p> Private method to colorize a sample with given foreground and background colors. </p> <dl> <dt><i>sampleLineEdit</i> (QLineEdit)</dt> <dd> line edit element to be colorized </dd> <dt><i>color</i> (QColor)</dt> <dd> text color to be shown </dd> <dt><i>background</i> (QColor)</dt> <dd> background color to be shown </dd> </dl> <a NAME="EditorStylesPage.on_annotationsErrorBgButton_clicked" ID="EditorStylesPage.on_annotationsErrorBgButton_clicked"></a> <h4>EditorStylesPage.on_annotationsErrorBgButton_clicked</h4> <b>on_annotationsErrorBgButton_clicked</b>(<i></i>) <p> Private slot to set the background colour of the error annotations. </p> <a NAME="EditorStylesPage.on_annotationsErrorFgButton_clicked" ID="EditorStylesPage.on_annotationsErrorFgButton_clicked"></a> <h4>EditorStylesPage.on_annotationsErrorFgButton_clicked</h4> <b>on_annotationsErrorFgButton_clicked</b>(<i></i>) <p> Private slot to set the foreground colour of the error annotations. </p> <a NAME="EditorStylesPage.on_annotationsInformationBgButton_clicked" ID="EditorStylesPage.on_annotationsInformationBgButton_clicked"></a> <h4>EditorStylesPage.on_annotationsInformationBgButton_clicked</h4> <b>on_annotationsInformationBgButton_clicked</b>(<i></i>) <p> Private slot to set the background colour of the information annotations. </p> <a NAME="EditorStylesPage.on_annotationsInformationFgButton_clicked" ID="EditorStylesPage.on_annotationsInformationFgButton_clicked"></a> <h4>EditorStylesPage.on_annotationsInformationFgButton_clicked</h4> <b>on_annotationsInformationFgButton_clicked</b>(<i></i>) <p> Private slot to set the foreground colour of the information annotations. </p> <a NAME="EditorStylesPage.on_annotationsStyleWarningBgButton_clicked" ID="EditorStylesPage.on_annotationsStyleWarningBgButton_clicked"></a> <h4>EditorStylesPage.on_annotationsStyleWarningBgButton_clicked</h4> <b>on_annotationsStyleWarningBgButton_clicked</b>(<i></i>) <p> Private slot to set the background colour of the style annotations. </p> <a NAME="EditorStylesPage.on_annotationsStyleWarningFgButton_clicked" ID="EditorStylesPage.on_annotationsStyleWarningFgButton_clicked"></a> <h4>EditorStylesPage.on_annotationsStyleWarningFgButton_clicked</h4> <b>on_annotationsStyleWarningFgButton_clicked</b>(<i></i>) <p> Private slot to set the foreground colour of the style annotations. </p> <a NAME="EditorStylesPage.on_annotationsWarningBgButton_clicked" ID="EditorStylesPage.on_annotationsWarningBgButton_clicked"></a> <h4>EditorStylesPage.on_annotationsWarningBgButton_clicked</h4> <b>on_annotationsWarningBgButton_clicked</b>(<i></i>) <p> Private slot to set the background colour of the warning annotations. </p> <a NAME="EditorStylesPage.on_annotationsWarningFgButton_clicked" ID="EditorStylesPage.on_annotationsWarningFgButton_clicked"></a> <h4>EditorStylesPage.on_annotationsWarningFgButton_clicked</h4> <b>on_annotationsWarningFgButton_clicked</b>(<i></i>) <p> Private slot to set the foreground colour of the warning annotations. </p> <a NAME="EditorStylesPage.on_defaultFontButton_clicked" ID="EditorStylesPage.on_defaultFontButton_clicked"></a> <h4>EditorStylesPage.on_defaultFontButton_clicked</h4> <b>on_defaultFontButton_clicked</b>(<i></i>) <p> Private method used to select the default font for the editor. </p> <a NAME="EditorStylesPage.on_linenumbersFontButton_clicked" ID="EditorStylesPage.on_linenumbersFontButton_clicked"></a> <h4>EditorStylesPage.on_linenumbersFontButton_clicked</h4> <b>on_linenumbersFontButton_clicked</b>(<i></i>) <p> Private method used to select the font for the editor margins. </p> <a NAME="EditorStylesPage.on_monospacedFontButton_clicked" ID="EditorStylesPage.on_monospacedFontButton_clicked"></a> <h4>EditorStylesPage.on_monospacedFontButton_clicked</h4> <b>on_monospacedFontButton_clicked</b>(<i></i>) <p> Private method used to select the font to be used as the monospaced font. </p> <a NAME="EditorStylesPage.polishPage" ID="EditorStylesPage.polishPage"></a> <h4>EditorStylesPage.polishPage</h4> <b>polishPage</b>(<i></i>) <p> Public slot to perform some polishing actions. </p> <a NAME="EditorStylesPage.save" ID="EditorStylesPage.save"></a> <h4>EditorStylesPage.save</h4> <b>save</b>(<i></i>) <p> Public slot to save the Editor Styles configuration. </p> <a NAME="EditorStylesPage.setMode" ID="EditorStylesPage.setMode"></a> <h4>EditorStylesPage.setMode</h4> <b>setMode</b>(<i>displayMode</i>) <p> Public method to perform mode dependent setups. </p> <dl> <dt><i>displayMode</i> (ConfigurationMode)</dt> <dd> mode of the configuration dialog </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="create" ID="create"></a> <h2>create</h2> <b>create</b>(<i>dlg</i>) <p> Module function to create the configuration page. </p> <dl> <dt><i>dlg</i></dt> <dd> reference to the configuration dialog </dd> </dl> <dl> <dt>Return:</dt> <dd> reference to the instantiated page (ConfigurationPageBase) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>