|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric4.Preferences.ConfigurationPages.EditorHighlightingStylesPage</title> |
|
6 <style> |
|
7 body { |
|
8 background:white; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #4FA4FF; } |
|
14 h2 { color: white; background: #4FA4FF; } |
|
15 h3 { color: white; background: #00557F; } |
|
16 h4 { color: white; background: #00557F; } |
|
17 |
|
18 a { color: #AA5500; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric4.Preferences.ConfigurationPages.EditorHighlightingStylesPage</h1> |
|
24 <p> |
|
25 Module implementing the Editor Highlighting Styles configuration page. |
|
26 </p> |
|
27 <h3>Global Attributes</h3> |
|
28 <table> |
|
29 <tr><td>None</td></tr> |
|
30 </table> |
|
31 <h3>Classes</h3> |
|
32 <table> |
|
33 <tr> |
|
34 <td><a href="#EditorHighlightingStylesPage">EditorHighlightingStylesPage</a></td> |
|
35 <td>Class implementing the Editor Highlighting Styles configuration page.</td> |
|
36 </tr> |
|
37 </table> |
|
38 <h3>Functions</h3> |
|
39 <table> |
|
40 <tr> |
|
41 <td><a href="#create">create</a></td> |
|
42 <td>Module function to create the configuration page.</td> |
|
43 </tr> |
|
44 </table> |
|
45 <hr /><hr /> |
|
46 <a NAME="EditorHighlightingStylesPage" ID="EditorHighlightingStylesPage"></a> |
|
47 <h2>EditorHighlightingStylesPage</h2> |
|
48 <p> |
|
49 Class implementing the Editor Highlighting Styles configuration page. |
|
50 </p> |
|
51 <h3>Derived from</h3> |
|
52 ConfigurationPageBase, Ui_EditorHighlightingStylesPage |
|
53 <h3>Class Attributes</h3> |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Methods</h3> |
|
58 <table> |
|
59 <tr> |
|
60 <td><a href="#EditorHighlightingStylesPage.__init__">EditorHighlightingStylesPage</a></td> |
|
61 <td>Constructor</td> |
|
62 </tr><tr> |
|
63 <td><a href="#EditorHighlightingStylesPage.__exportStyles">__exportStyles</a></td> |
|
64 <td>Private method to export the styles of the given lexers.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#EditorHighlightingStylesPage.__importStyles">__importStyles</a></td> |
|
67 <td>Private method to import the styles of the given lexers.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#EditorHighlightingStylesPage.__setToDefault">__setToDefault</a></td> |
|
70 <td>Private method to set a specific style to it's default values.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked">on_allBackgroundColoursButton_clicked</a></td> |
|
73 <td>Private method used to select the background colour of all styles of a selected lexer.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#EditorHighlightingStylesPage.on_allDefaultButton_clicked">on_allDefaultButton_clicked</a></td> |
|
76 <td>Private method to set all styles to their default values.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#EditorHighlightingStylesPage.on_allEolFillButton_clicked">on_allEolFillButton_clicked</a></td> |
|
79 <td>Private method used to set the eolfill for all styles of a selected lexer.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#EditorHighlightingStylesPage.on_allFontsButton_clicked">on_allFontsButton_clicked</a></td> |
|
82 <td>Private method used to change the font of all styles of a selected lexer.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#EditorHighlightingStylesPage.on_backgroundButton_clicked">on_backgroundButton_clicked</a></td> |
|
85 <td>Private method used to select the background colour of the selected style and lexer.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#EditorHighlightingStylesPage.on_defaultButton_clicked">on_defaultButton_clicked</a></td> |
|
88 <td>Private method to set the current style to it's default values.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#EditorHighlightingStylesPage.on_eolfillCheckBox_toggled">on_eolfillCheckBox_toggled</a></td> |
|
91 <td>Private method used to set the eolfill for the selected style and lexer.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#EditorHighlightingStylesPage.on_exportAllButton_clicked">on_exportAllButton_clicked</a></td> |
|
94 <td>Private slot to export the styles of all lexers.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#EditorHighlightingStylesPage.on_exportCurrentButton_clicked">on_exportCurrentButton_clicked</a></td> |
|
97 <td>Private slot to export the styles of the current lexer.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#EditorHighlightingStylesPage.on_fontButton_clicked">on_fontButton_clicked</a></td> |
|
100 <td>Private method used to select the font of the selected style and lexer.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#EditorHighlightingStylesPage.on_foregroundButton_clicked">on_foregroundButton_clicked</a></td> |
|
103 <td>Private method used to select the foreground colour of the selected style and lexer.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#EditorHighlightingStylesPage.on_importAllButton_clicked">on_importAllButton_clicked</a></td> |
|
106 <td>Private slot to import the styles of all lexers.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#EditorHighlightingStylesPage.on_importCurrentButton_clicked">on_importCurrentButton_clicked</a></td> |
|
109 <td>Private slot to import the styles of the current lexer.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated">on_lexerLanguageComboBox_activated</a></td> |
|
112 <td>Private slot to fill the style combo of the source page.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#EditorHighlightingStylesPage.on_styleElementList_currentRowChanged">on_styleElementList_currentRowChanged</a></td> |
|
115 <td>Private method to set up the style element part of the source page.</td> |
|
116 </tr><tr> |
|
117 <td><a href="#EditorHighlightingStylesPage.save">save</a></td> |
|
118 <td>Public slot to save the Editor Highlighting Styles configuration.</td> |
|
119 </tr><tr> |
|
120 <td><a href="#EditorHighlightingStylesPage.saveState">saveState</a></td> |
|
121 <td>Public method to save the current state of the widget.</td> |
|
122 </tr><tr> |
|
123 <td><a href="#EditorHighlightingStylesPage.setState">setState</a></td> |
|
124 <td>Public method to set the state of the widget.</td> |
|
125 </tr> |
|
126 </table> |
|
127 <a NAME="EditorHighlightingStylesPage.__init__" ID="EditorHighlightingStylesPage.__init__"></a> |
|
128 <h4>EditorHighlightingStylesPage (Constructor)</h4> |
|
129 <b>EditorHighlightingStylesPage</b>(<i>lexers</i>) |
|
130 <p> |
|
131 Constructor |
|
132 </p><dl> |
|
133 <dt><i>lexers</i></dt> |
|
134 <dd> |
|
135 reference to the lexers dictionary |
|
136 </dd> |
|
137 </dl><a NAME="EditorHighlightingStylesPage.__exportStyles" ID="EditorHighlightingStylesPage.__exportStyles"></a> |
|
138 <h4>EditorHighlightingStylesPage.__exportStyles</h4> |
|
139 <b>__exportStyles</b>(<i>lexers</i>) |
|
140 <p> |
|
141 Private method to export the styles of the given lexers. |
|
142 </p><dl> |
|
143 <dt><i>lexers</i></dt> |
|
144 <dd> |
|
145 list of lexer objects for which to export the styles |
|
146 </dd> |
|
147 </dl><a NAME="EditorHighlightingStylesPage.__importStyles" ID="EditorHighlightingStylesPage.__importStyles"></a> |
|
148 <h4>EditorHighlightingStylesPage.__importStyles</h4> |
|
149 <b>__importStyles</b>(<i>lexers</i>) |
|
150 <p> |
|
151 Private method to import the styles of the given lexers. |
|
152 </p><dl> |
|
153 <dt><i>lexers</i></dt> |
|
154 <dd> |
|
155 dictionary of lexer objects for which to import the styles |
|
156 </dd> |
|
157 </dl><a NAME="EditorHighlightingStylesPage.__setToDefault" ID="EditorHighlightingStylesPage.__setToDefault"></a> |
|
158 <h4>EditorHighlightingStylesPage.__setToDefault</h4> |
|
159 <b>__setToDefault</b>(<i>style</i>) |
|
160 <p> |
|
161 Private method to set a specific style to it's default values. |
|
162 </p><dl> |
|
163 <dt><i>style</i></dt> |
|
164 <dd> |
|
165 style to be reset (integer) |
|
166 </dd> |
|
167 </dl><a NAME="EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked" ID="EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked"></a> |
|
168 <h4>EditorHighlightingStylesPage.on_allBackgroundColoursButton_clicked</h4> |
|
169 <b>on_allBackgroundColoursButton_clicked</b>(<i></i>) |
|
170 <p> |
|
171 Private method used to select the background colour of all styles of a |
|
172 selected lexer. |
|
173 </p><a NAME="EditorHighlightingStylesPage.on_allDefaultButton_clicked" ID="EditorHighlightingStylesPage.on_allDefaultButton_clicked"></a> |
|
174 <h4>EditorHighlightingStylesPage.on_allDefaultButton_clicked</h4> |
|
175 <b>on_allDefaultButton_clicked</b>(<i></i>) |
|
176 <p> |
|
177 Private method to set all styles to their default values. |
|
178 </p><a NAME="EditorHighlightingStylesPage.on_allEolFillButton_clicked" ID="EditorHighlightingStylesPage.on_allEolFillButton_clicked"></a> |
|
179 <h4>EditorHighlightingStylesPage.on_allEolFillButton_clicked</h4> |
|
180 <b>on_allEolFillButton_clicked</b>(<i></i>) |
|
181 <p> |
|
182 Private method used to set the eolfill for all styles of a selected lexer. |
|
183 </p><a NAME="EditorHighlightingStylesPage.on_allFontsButton_clicked" ID="EditorHighlightingStylesPage.on_allFontsButton_clicked"></a> |
|
184 <h4>EditorHighlightingStylesPage.on_allFontsButton_clicked</h4> |
|
185 <b>on_allFontsButton_clicked</b>(<i></i>) |
|
186 <p> |
|
187 Private method used to change the font of all styles of a selected lexer. |
|
188 </p><a NAME="EditorHighlightingStylesPage.on_backgroundButton_clicked" ID="EditorHighlightingStylesPage.on_backgroundButton_clicked"></a> |
|
189 <h4>EditorHighlightingStylesPage.on_backgroundButton_clicked</h4> |
|
190 <b>on_backgroundButton_clicked</b>(<i></i>) |
|
191 <p> |
|
192 Private method used to select the background colour of the selected style |
|
193 and lexer. |
|
194 </p><a NAME="EditorHighlightingStylesPage.on_defaultButton_clicked" ID="EditorHighlightingStylesPage.on_defaultButton_clicked"></a> |
|
195 <h4>EditorHighlightingStylesPage.on_defaultButton_clicked</h4> |
|
196 <b>on_defaultButton_clicked</b>(<i></i>) |
|
197 <p> |
|
198 Private method to set the current style to it's default values. |
|
199 </p><a NAME="EditorHighlightingStylesPage.on_eolfillCheckBox_toggled" ID="EditorHighlightingStylesPage.on_eolfillCheckBox_toggled"></a> |
|
200 <h4>EditorHighlightingStylesPage.on_eolfillCheckBox_toggled</h4> |
|
201 <b>on_eolfillCheckBox_toggled</b>(<i>b</i>) |
|
202 <p> |
|
203 Private method used to set the eolfill for the selected style and lexer. |
|
204 </p><dl> |
|
205 <dt><i>b</i></dt> |
|
206 <dd> |
|
207 Flag indicating enabled or disabled state. |
|
208 </dd> |
|
209 </dl><a NAME="EditorHighlightingStylesPage.on_exportAllButton_clicked" ID="EditorHighlightingStylesPage.on_exportAllButton_clicked"></a> |
|
210 <h4>EditorHighlightingStylesPage.on_exportAllButton_clicked</h4> |
|
211 <b>on_exportAllButton_clicked</b>(<i></i>) |
|
212 <p> |
|
213 Private slot to export the styles of all lexers. |
|
214 </p><a NAME="EditorHighlightingStylesPage.on_exportCurrentButton_clicked" ID="EditorHighlightingStylesPage.on_exportCurrentButton_clicked"></a> |
|
215 <h4>EditorHighlightingStylesPage.on_exportCurrentButton_clicked</h4> |
|
216 <b>on_exportCurrentButton_clicked</b>(<i></i>) |
|
217 <p> |
|
218 Private slot to export the styles of the current lexer. |
|
219 </p><a NAME="EditorHighlightingStylesPage.on_fontButton_clicked" ID="EditorHighlightingStylesPage.on_fontButton_clicked"></a> |
|
220 <h4>EditorHighlightingStylesPage.on_fontButton_clicked</h4> |
|
221 <b>on_fontButton_clicked</b>(<i></i>) |
|
222 <p> |
|
223 Private method used to select the font of the selected style and lexer. |
|
224 </p><a NAME="EditorHighlightingStylesPage.on_foregroundButton_clicked" ID="EditorHighlightingStylesPage.on_foregroundButton_clicked"></a> |
|
225 <h4>EditorHighlightingStylesPage.on_foregroundButton_clicked</h4> |
|
226 <b>on_foregroundButton_clicked</b>(<i></i>) |
|
227 <p> |
|
228 Private method used to select the foreground colour of the selected style |
|
229 and lexer. |
|
230 </p><a NAME="EditorHighlightingStylesPage.on_importAllButton_clicked" ID="EditorHighlightingStylesPage.on_importAllButton_clicked"></a> |
|
231 <h4>EditorHighlightingStylesPage.on_importAllButton_clicked</h4> |
|
232 <b>on_importAllButton_clicked</b>(<i></i>) |
|
233 <p> |
|
234 Private slot to import the styles of all lexers. |
|
235 </p><a NAME="EditorHighlightingStylesPage.on_importCurrentButton_clicked" ID="EditorHighlightingStylesPage.on_importCurrentButton_clicked"></a> |
|
236 <h4>EditorHighlightingStylesPage.on_importCurrentButton_clicked</h4> |
|
237 <b>on_importCurrentButton_clicked</b>(<i></i>) |
|
238 <p> |
|
239 Private slot to import the styles of the current lexer. |
|
240 </p><a NAME="EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated" ID="EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated"></a> |
|
241 <h4>EditorHighlightingStylesPage.on_lexerLanguageComboBox_activated</h4> |
|
242 <b>on_lexerLanguageComboBox_activated</b>(<i>language</i>) |
|
243 <p> |
|
244 Private slot to fill the style combo of the source page. |
|
245 </p><dl> |
|
246 <dt><i>language</i></dt> |
|
247 <dd> |
|
248 The lexer language (string) |
|
249 </dd> |
|
250 </dl><a NAME="EditorHighlightingStylesPage.on_styleElementList_currentRowChanged" ID="EditorHighlightingStylesPage.on_styleElementList_currentRowChanged"></a> |
|
251 <h4>EditorHighlightingStylesPage.on_styleElementList_currentRowChanged</h4> |
|
252 <b>on_styleElementList_currentRowChanged</b>(<i>index</i>) |
|
253 <p> |
|
254 Private method to set up the style element part of the source page. |
|
255 </p><dl> |
|
256 <dt><i>index</i></dt> |
|
257 <dd> |
|
258 the style index. |
|
259 </dd> |
|
260 </dl><a NAME="EditorHighlightingStylesPage.save" ID="EditorHighlightingStylesPage.save"></a> |
|
261 <h4>EditorHighlightingStylesPage.save</h4> |
|
262 <b>save</b>(<i></i>) |
|
263 <p> |
|
264 Public slot to save the Editor Highlighting Styles configuration. |
|
265 </p><a NAME="EditorHighlightingStylesPage.saveState" ID="EditorHighlightingStylesPage.saveState"></a> |
|
266 <h4>EditorHighlightingStylesPage.saveState</h4> |
|
267 <b>saveState</b>(<i></i>) |
|
268 <p> |
|
269 Public method to save the current state of the widget. |
|
270 </p><dl> |
|
271 <dt>Returns:</dt> |
|
272 <dd> |
|
273 array containing the index of the selected lexer language (integer) |
|
274 and the index of the selected lexer entry (integer) |
|
275 </dd> |
|
276 </dl><a NAME="EditorHighlightingStylesPage.setState" ID="EditorHighlightingStylesPage.setState"></a> |
|
277 <h4>EditorHighlightingStylesPage.setState</h4> |
|
278 <b>setState</b>(<i>state</i>) |
|
279 <p> |
|
280 Public method to set the state of the widget. |
|
281 </p><dl> |
|
282 <dt><i>state</i></dt> |
|
283 <dd> |
|
284 state data generated by saveState |
|
285 </dd> |
|
286 </dl> |
|
287 <div align="right"><a href="#top">Up</a></div> |
|
288 <hr /><hr /> |
|
289 <a NAME="create" ID="create"></a> |
|
290 <h2>create</h2> |
|
291 <b>create</b>(<i>dlg</i>) |
|
292 <p> |
|
293 Module function to create the configuration page. |
|
294 </p><dl> |
|
295 <dt><i>dlg</i></dt> |
|
296 <dd> |
|
297 reference to the configuration dialog |
|
298 </dd> |
|
299 </dl> |
|
300 <div align="right"><a href="#top">Up</a></div> |
|
301 <hr /> |
|
302 </body></html> |