def decrease_font(self): self.set_lineheight( self.lineheight() - 3 ) self.set_charwidth( self.charwidth() - 2 ) self.fonts = { 'sequence': ('Monospace', self.fonts['sequence'][1] - 2 ), 'label': QtGui.QFont('Monospace', self.fonts['label'].pointSize() - 2 ) }
def __init__(self, typeface='Monospace', fontsize=6, charwidth=8, lineheight=12): self.typeface = typeface self.fontsize = fontsize self.charwidth = charwidth self.lineheight = lineheight self.font = QtGui.QFont(typeface, fontsize) self.fontmetrics = QtGui.QFontMetrics(self.font)
def __init__(self): # for A, C, G, T, N self.base_colors = [ QtGui.QColor(x) for x in ('forestgreen', 'blue', ' black', 'red', 'grey') ] self.trace_pens = [ QtGui.QPen(x, 1) for x in self.base_colors ] self.quality_pens = [ QtGui.QPen( QtGui.QColor(*x), 5, QtCore.Qt.SolidLine, QtCore.Qt.FlatCap ) for x in ( (255,20,255), (255,25,25), (20,155,20) ) ] self.ruler_pen = QtGui.QPen( QtGui.QColor('black')) self.ruler_font = QtGui.QFont('Monospace', 8) self.ruler_fontmetrics = QtGui.QFontMetrics( self.ruler_font ) self.ruler_fontmetrics_halfwidth = self.ruler_fontmetrics.width('A')/2 self._show = [ True, True, True, True ]
def __init__(self): super(IEnv, self).__init__() self._lineheight = LINEHEIGHT # global lineheight self._charwidth = CHARWIDTH # global charwidth self._nascheme = EasyNA() # default NA scheme self._aascheme = AESSN3() # default AA scheme self._header = True self._footer = False self._split = 1 self._panesplit = 1 self._activeview = None self._tracesplit = 4 # basic preference self.fonts = { 'sequence': ('Monospace', 7 ), 'label': QtGui.QFont('Monospace', 8 ) } # colors self.colors = { 'general-background': QtGui.QColor( 244, 244, 232 ), 'sequence-selection': QtGui.QColor( 191, 191, 191, 64 ), 'trace-selection': QtGui.QColor( 'lightblue' ), } # brush self.brushes = { 'sequence-selection': QtGui.QBrush( self.colors['sequence-selection'] ), 'trace-selection': QtGui.QBrush( self.colors['trace-selection'] ), } # pens self.pens = { 'sequence-selection': QtGui.QPen( self.brushes['sequence-selection'], 0 ) }
def __init__(self, pane, parent=None): super().__init__(pane, parent) self._font = QtGui.QFont('Monospace', 4) self._fontmetrics = QtGui.QFontMetrics(self._font)
def __init__(self, pane, parent=None): super(RulerView, self).__init__(pane, parent) self.setFocusPolicy(QtCore.Qt.StrongFocus) self._font = QtGui.QFont('Monospace', 7) self._fontmetrics = QtGui.QFontMetrics(self._font)