4 # |
4 # |
5 |
5 |
6 """ |
6 """ |
7 Module implementing a special QextScintilla lexer to handle the preferences. |
7 Module implementing a special QextScintilla lexer to handle the preferences. |
8 """ |
8 """ |
|
9 |
|
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
9 |
11 |
10 from PyQt4.QtGui import QColor, QFont, QApplication |
12 from PyQt4.QtGui import QColor, QFont, QApplication |
11 from PyQt4.Qsci import QsciLexer |
13 from PyQt4.Qsci import QsciLexer |
12 |
14 |
13 import Preferences |
15 import Preferences |
66 Constructor |
68 Constructor |
67 |
69 |
68 @param language The lexer language. (string) |
70 @param language The lexer language. (string) |
69 @param parent The parent widget of this lexer. (QextScintilla) |
71 @param parent The parent widget of this lexer. (QextScintilla) |
70 """ |
72 """ |
71 super().__init__(parent) |
73 super(PreferencesLexer, self).__init__(parent) |
72 |
74 |
73 # These default font families are taken from QScintilla |
75 # These default font families are taken from QScintilla |
74 if Globals.isWindowsPlatform(): |
76 if Globals.isWindowsPlatform(): |
75 self.__defaultFontFamily = "Courier New" |
77 self.__defaultFontFamily = "Courier New" |
76 elif Globals.isMacPlatform(): |
78 elif Globals.isMacPlatform(): |