12 |
12 |
13 from .ConfigurationPageBase import ConfigurationPageBase |
13 from .ConfigurationPageBase import ConfigurationPageBase |
14 from .Ui_TemplatesPage import Ui_TemplatesPage |
14 from .Ui_TemplatesPage import Ui_TemplatesPage |
15 |
15 |
16 import Preferences |
16 import Preferences |
17 |
|
18 try: |
|
19 MonospacedFontsOption = QFontDialog.FontDialogOption.MonospacedFonts |
|
20 except AttributeError: |
|
21 MonospacedFontsOption = QFontDialog.FontDialogOptions(0x10) |
|
22 |
17 |
23 |
18 |
24 class TemplatesPage(ConfigurationPageBase, Ui_TemplatesPage): |
19 class TemplatesPage(ConfigurationPageBase, Ui_TemplatesPage): |
25 """ |
20 """ |
26 Class implementing the Templates configuration page. |
21 Class implementing the Templates configuration page. |
70 """ |
65 """ |
71 Private method used to select the font to be used by the code editor. |
66 Private method used to select the font to be used by the code editor. |
72 """ |
67 """ |
73 self.editorFont = self.selectFont( |
68 self.editorFont = self.selectFont( |
74 self.editorFontSample, self.editorFont, |
69 self.editorFontSample, self.editorFont, |
75 options=MonospacedFontsOption) |
70 options=QFontDialog.FontDialogOption.MonospacedFonts) |
76 |
71 |
77 |
72 |
78 def create(dlg): |
73 def create(dlg): |
79 """ |
74 """ |
80 Module function to create the configuration page. |
75 Module function to create the configuration page. |