Exemplo n.º 1
0
    def __init__(self, label_pane, label_font, offset_x=0):

        self._label_pane = label_pane
        self._font = label_font
        self._fontmetrics = QtGui.QFontMetrics(label_font)
        self._offset_x = offset_x or self._fontmetrics.width('0000: ')
        self._margin = 5
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
    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 ]
Exemplo n.º 4
0
    def __init__(self, pane, parent=None):
        super().__init__(pane, parent)

        self._font = QtGui.QFont('Monospace', 4)
        self._fontmetrics = QtGui.QFontMetrics(self._font)
Exemplo n.º 5
0
    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)