944:1b59c4ba121e | 945:8cd4d08fa9f6 |
---|---|
14 | 14 |
15 import QScintilla.Lexers | 15 import QScintilla.Lexers |
16 | 16 |
17 import Preferences | 17 import Preferences |
18 | 18 |
19 | |
19 class EditorKeywordsPage(ConfigurationPageBase, Ui_EditorKeywordsPage): | 20 class EditorKeywordsPage(ConfigurationPageBase, Ui_EditorKeywordsPage): |
20 """ | 21 """ |
21 Class implementing the editor highlighter keywords configuration page. | 22 Class implementing the editor highlighter keywords configuration page. |
22 """ | 23 """ |
23 def __init__(self): | 24 def __init__(self): |
28 self.setupUi(self) | 29 self.setupUi(self) |
29 self.setObjectName("EditorKeywordsPage") | 30 self.setObjectName("EditorKeywordsPage") |
30 | 31 |
31 # set initial values | 32 # set initial values |
32 self.__keywords = { | 33 self.__keywords = { |
33 "" : ["", "", "", "", "", "", "", "", "", ""] | 34 "": ["", "", "", "", "", "", "", "", "", ""] |
34 } | 35 } |
35 languages = sorted([''] + \ | 36 languages = sorted([''] + \ |
36 list(QScintilla.Lexers.getSupportedLanguages().keys())) | 37 list(QScintilla.Lexers.getSupportedLanguages().keys())) |
37 for lang in languages: | 38 for lang in languages: |
38 if lang != "Guessed": | 39 if lang != "Guessed": |
109 | 110 |
110 self.currentApiLanguage = language | 111 self.currentApiLanguage = language |
111 self.currentSet = kwSet | 112 self.currentSet = kwSet |
112 self.keywordsEdit.setPlainText(self.__keywords[language][kwSet]) | 113 self.keywordsEdit.setPlainText(self.__keywords[language][kwSet]) |
113 | 114 |
115 | |
114 def create(dlg): | 116 def create(dlg): |
115 """ | 117 """ |
116 Module function to create the configuration page. | 118 Module function to create the configuration page. |
117 | 119 |
118 @param dlg reference to the configuration dialog | 120 @param dlg reference to the configuration dialog |