当前位置: 首页>>代码示例>>Python>>正文


Python Qsci.QsciLexerCustom类代码示例

本文整理汇总了Python中PyQt4.Qsci.QsciLexerCustom的典型用法代码示例。如果您正苦于以下问题:Python QsciLexerCustom类的具体用法?Python QsciLexerCustom怎么用?Python QsciLexerCustom使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了QsciLexerCustom类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self, parent=None):
     QsciLexerCustom.__init__(self, parent)
     self._styles = {
         0: 'Default',
         1: 'Function',
         }
     for key, value in self._styles.iteritems():
         setattr(self, value, key)
开发者ID:g-sherman,项目名称:qgiscommand,代码行数:8,代码来源:qgiscommand.py

示例2: __init__

 def __init__(self, parent):
     QsciLexerCustom.__init__(self, parent)
     self._styles = {
         0: 'Default',
         1: 'Comment',
         2: 'Section',
         3: 'Key',
         4: 'Assignment',def defaultText(self,text):
    print text
         5: 'Value',
         }
开发者ID:pingf,项目名称:toys,代码行数:11,代码来源:customLexer2.py

示例3: __init__

 def __init__(self, parent):
     QsciLexerCustom.__init__(self, parent)
     self._styles = { 
         0: 'Default',
         1: 'FirstLevelTitle',
         2: 'SecundLevelTitle',
         3: 'Green',
         4: 'Digits'
         }
     for key,value in self._styles.iteritems():
         setattr(self, value, key)
开发者ID:pingf,项目名称:toys,代码行数:11,代码来源:customLexer3.py

示例4: __init__

    def __init__(self, parent=None):
        QsciLexerCustom.__init__(self, parent)

        self._styles = {
            0: 'Default',
            1: 'NewText',
            2: 'DeletedText',
            3: 'ReplacedText',
            4: 'LineNumber'
        }
        for key in self._styles:
            setattr(self, self._styles[key], key)
开发者ID:takluyver,项目名称:Pcode,代码行数:12,代码来源:Diff.py

示例5: __init__

    def __init__(self, parent=None):
        QsciLexerCustom.__init__(self, parent)

        self._styles = {
            0: 'Default',
            1: 'ErrorInfo',
            2: 'OutputInfo',
            3: 'ExitInfo',
            4: 'Start'
            }
        for key in self._styles:
            setattr(self, self._styles[key], key)
开发者ID:fortharris,项目名称:Pcode,代码行数:12,代码来源:RunWidget.py

示例6: __init__

 def __init__(self, parent):
     QsciLexerCustom.__init__(self, parent)
     self._styles = {
         0: 'Default',
         1: 'Comment',
         2: 'Section',
         3: 'Key',
         4: 'Assignment',
         5: 'Value',
         }
     for key,value in self._styles.iteritems():
         setattr(self, value, key)
     self._foldcompact = True
开发者ID:jvb,项目名称:infobiotics-dashboard,代码行数:13,代码来源:lexer2.py

示例7: __init__

 def __init__(self, parent):
     QsciLexerCustom.__init__(self, parent)
     self._styles = {
         0: 'Default',
         1: 'MultiLinesComment_Start',
         2: 'MultiLinesComment',
         3: 'MultiLinesComment_End',
         4: 'SingleLineComment'
         }
     for key,value in self._styles.iteritems():
         setattr(self, value, key)
     self._foldcompact = True
     self.__comment = [self.MultiLinesComment,
                       self.MultiLinesComment_End,
                       self.MultiLinesComment_Start,
                       self.SingleLineComment]
开发者ID:jvb,项目名称:infobiotics-dashboard,代码行数:16,代码来源:lexer3.py

示例8: defaultPaper

 def defaultPaper(self, style):
     # Here we change the color of the background.
     # We want that colorize all the background of the line.
     # This is done by using the following method defaultEolFill() .
     if style == self.Comment or style == self.Comment_End or style == self.Comment_Start:
         return QColor("#FFEECC")
     return QsciLexerCustom.defaultPaper(self, style)
开发者ID:averrin,项目名称:demesne_old,代码行数:7,代码来源:lexer_test.py

示例9: defaultPaper

 def defaultPaper(self, style):
     # Here we change the color of the background.
     # We want to colorize all the background of the line.
     # This is done by using the following method defaultEolFill() .
     if style in self.__comment:
         return QColor('#FFEECC')
     return QsciLexerCustom.defaultPaper(self, style)
开发者ID:jvb,项目名称:infobiotics-dashboard,代码行数:7,代码来源:lpp_editor.py

示例10: defaultColor

    def defaultColor(self, style):
        """QsciLexerCustom method implmentation. See QScintlla docs
        """
        pygStyle = self._getPygStyle(style)
        if not pygStyle or not pygStyle['color']:
            return QsciLexerCustom.defaultColor(self, style)

        return self._toQColor(pygStyle['color'])
开发者ID:daffodil,项目名称:enki,代码行数:8,代码来源:lexerpygments.py

示例11: defaultFont

    def defaultFont(self, style):
        font = QsciLexerCustom.defaultFont(self, style)

        if style == self.FirstLevelTitle or style == self.SecundLevelTitle:
            font.setBold(True)
        elif style == self.Green:
            font.setBold(True)
            font.setUnderline(True)
            
        return font
开发者ID:pingf,项目名称:toys,代码行数:10,代码来源:customLexer3.py

示例12: defaultPaper

    def defaultPaper(self, style):
# Here we change the color of the background.
# We want to colorize all the background of the line.
# This is done by using the following method defaultEolFill() .
        if style == self.SecundLevelTitle:
            return QColor('#FFFF99')
        elif style == self.Digits:
            return QColor('#FFCC66')

        return QsciLexerCustom.defaultPaper(self, style)
开发者ID:pingf,项目名称:toys,代码行数:10,代码来源:customLexer3.py

示例13: __init__

 def __init__(self, parent = None, language = None):
     """language is language name as recognized by pygments
     """
     QsciLexerCustom.__init__(self, parent)
     self._lexer = None
     self._tokenCache = None
     self._lastBusyId = -1
     
     self._language = 'Scheme'
     
     if parent is not None:
         self._lexer = self._guessLexer(parent.text())
     
     self._style = pygments.styles.get_style_by_name('default')
     
     self.TOKEN_TO_QSTYLE = dict([(token, self._getNextStyleId()) for token in pygments.token.STANDARD_TYPES])
     self.QSTYLE_TO_TOKEN = dict([(v, k) for k, v in self.TOKEN_TO_QSTYLE.items()])
     
     if parent is not None:
         parent.textChanged.connect(self._onTextChanged)
开发者ID:daffodil,项目名称:enki,代码行数:20,代码来源:lexerpygments.py

示例14: defaultFont

    def defaultFont(self, style):
#        if style in self.__comment:
#            if sys.platform in ('win32', 'cygwin'):
#                return QFont('Comic Sans MS', 9, QFont.Bold)
#            return QFont('Bitstream Vera Serif', 9, QFont.Bold)
#        return QsciLexerCustom.defaultFont(self, style)
        font = QsciLexerCustom.defaultFont(self, style)
        if style == self.Digits:
            font.setBold(True)
#        print 'defaultFont', style
        return font
开发者ID:jvb,项目名称:infobiotics-dashboard,代码行数:11,代码来源:lpp_editor2.py

示例15: defaultFont

 def defaultFont(self, style):
     if style == self.Default:
         return Global.getDefaultFont()
     elif style == self.NewText:
         return Global.getDefaultFont()
     elif style == self.DeletedText:
         return Global.getDefaultFont()
     elif style == self.ReplacedText:
         return Global.getDefaultFont()
     elif style == self.LineNumber:
         return Global.getDefaultFont()
     return QsciLexerCustom.defaultFont(self, style)
开发者ID:takluyver,项目名称:Pcode,代码行数:12,代码来源:Diff.py


注:本文中的PyQt4.Qsci.QsciLexerCustom类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。