7 Module implementing a compatability interface class to QsciScintilla. |
7 Module implementing a compatability interface class to QsciScintilla. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt4.QtCore import pyqtSignal, Qt |
10 from PyQt4.QtCore import pyqtSignal, Qt |
11 from PyQt4.QtGui import QPalette, QColor, QApplication |
11 from PyQt4.QtGui import QPalette, QColor, QApplication |
12 from PyQt4.Qsci import QsciScintilla, \ |
12 from PyQt4.Qsci import QsciScintillaBase, QsciScintilla, \ |
13 QSCINTILLA_VERSION as QSCIQSCINTILLA_VERSION, QSCINTILLA_VERSION_STR, \ |
13 QSCINTILLA_VERSION as QSCIQSCINTILLA_VERSION |
14 QsciScintillaBase |
|
15 |
14 |
16 ############################################################################### |
15 ############################################################################### |
17 |
16 |
18 |
17 |
19 def QSCINTILLA_VERSION(): |
18 def QSCINTILLA_VERSION(): |
20 """ |
19 """ |
21 Module function to return the QScintilla version. |
20 Module function to return the QScintilla version. |
22 |
21 |
23 If the installed QScintilla is a snapshot version, then assume it is |
|
24 of the latest release and return a version number of 0x99999. |
|
25 |
|
26 @return QScintilla version (integer) |
22 @return QScintilla version (integer) |
27 """ |
23 """ |
28 if '-snapshot-' in QSCINTILLA_VERSION_STR: |
24 return QSCIQSCINTILLA_VERSION |
29 return 0x99999 |
|
30 else: |
|
31 return QSCIQSCINTILLA_VERSION |
|
32 |
25 |
33 ############################################################################### |
26 ############################################################################### |
34 |
27 |
35 |
28 |
36 class QsciScintillaCompat(QsciScintilla): |
29 class QsciScintillaCompat(QsciScintilla): |