environment/lib/python2.7/site-packages/IPython/frontend/qt/console/ansi_code_processor.py
def get_format(self):
        """ Returns a QTextCharFormat that encodes the current style attributes.
        """
        format = QtGui.QTextCharFormat()

        # Set foreground color
        qcolor = self.get_color(self.foreground_color, self.intensity)
        if qcolor is not None:
            format.setForeground(qcolor)

        # Set background color
        qcolor = self.get_color(self.background_color, self.intensity)
        if qcolor is not None:
            format.setBackground(qcolor)

        # Set font weight/style options
        if self.bold:
            format.setFontWeight(QtGui.QFont.Bold)
        else:
            format.setFontWeight(QtGui.QFont.Normal)
        format.setFontItalic(self.italic)
        format.setFontUnderline(self.underline)

        return format
def get_format(self):
        format = QtGui.QTextCharFormat()

        # Set foreground color
        qcolor = self.get_color(self.foreground_color, self.intensity)
        if qcolor is not None:
            format.setForeground(qcolor)

        # Set background color
        qcolor = self.get_color(self.background_color, self.intensity)
        if qcolor is not None:
            format.setBackground(qcolor)

        # Set font weight/style options
        if self.bold:
            format.setFontWeight(QtGui.QFont.Bold)
        else:
            format.setFontWeight(QtGui.QFont.Normal)
        format.setFontItalic(self.italic)
        format.setFontUnderline(self.underline)

        return format
def get_format ( self ) : format = QtGui . QTextCharFormat ( ) # Set foreground color qcolor = self . get_color ( self . foreground_color , self . intensity ) if qcolor is not None : format . setForeground ( qcolor ) # Set background color qcolor = self . get_color ( self . background_color , self . intensity ) if qcolor is not None : format . setBackground ( qcolor ) # Set font weight/style options if self . bold : format . setFontWeight ( QtGui . QFont . Bold ) else : format . setFontWeight ( QtGui . QFont . Normal ) format . setFontItalic ( self . italic ) format . setFontUnderline ( self . underline ) return format
Returns a QTextCharFormat that encodes the current style attributes.
Returns a QTextCharFormat that encodes the current style attributes .