Beispiel #1
0
def DVar(chKeyRS):
    colors = [
        QtGui.QColor('red').name(),
        QtGui.QColor('blue').name(),
        QtGui.QColor('green').name(),
        QtGui.QColor('magenta').name(),
        QtGui.QColor('orange').name(),
        QtGui.QColor('cyan').name()
    ]
    dVar = {}
    dVar
    dVar['lineVisible'] = {}
    dVar['lineColor'] = {}
    dVar['lineStyle'] = {}
    dVar['lineMarker'] = {}
    dVar['lineWidth'] = {}

    for i in range(len(chKeyRS)):
        key = chKeyRS[i]
        dVar['lineColor'][key] = colors[i]
        dVar['lineVisible'][key] = True
        dVar['lineStyle'][key] = '-'
        dVar['lineMarker'][key] = ''
        dVar['lineWidth'][key] = 1

    dVar['widthP'] = 100
    dVar['heightP'] = 100
    dVar['zoomP'] = 100
    dVar['left'] = 0.01
    dVar['right'] = 0.99
    dVar['top'] = 0.99
    dVar['bottom'] = 0.05

    dVar['maxLength'] = 0

    #
    dVar['isDoneSeqAlign'] = False
    dVar['isDoneSeqAlignRef'] = False
    dVar['isDoneReactivity'] = False

    ## CONTROL FLAGS
    dVar['flag'] = {}
    dVar['flag']['isDrawStad'] = False
    dVar['flag']['isSeqAlign'] = False
    dVar['flag']['isDrawLine'] = False
    dVar['flag']['isDrawGauss'] = False

    dVar['flag']['isSatd'] = False
    dVar['flag']['isScale'] = False
    dVar['flag']['isPeakMatchModify'] = False
    dVar['flag']['isPeakLinkRefModify'] = False
    dVar['flag']['isDrawRef'] = False

    return dVar
Beispiel #2
0
        self.dVar['heightP'] = self.spinBoxHeight.value()
        self.dVar['zoomP'] = self.spinBoxR.value()
        self.dVar['isDrawSatd'] = self.checkBoxSatd.isChecked()
        for key in self.keySubs:
            self.dVar[key] = self.spinBoxSubs[key].value()


if __name__ == "__main__":
    import sys
    dLineVisible = {
        'RX': True,
        'BG': True,
        'RXS1': True,
        'BGS1': True,
        'RXS2': False,
        'BGS2': False
    }
    dLineColor = {
        'RX': (QtGui.QColor('red').name()),
        'BG': (QtGui.QColor('blue').name()),
        'RXS1': str(QtGui.QColor('green').name()),
        'BGS1': str(QtGui.QColor('magenta').name()),
        'RXS2': str(QtGui.QColor('yellow').name()),
        'BGS2': str(QtGui.QColor('cyan').name())
    }
    app = QtGui.QApplication(sys.argv)
    from Functions import DVar
    form = DlgFigureSet(DVar(dLineVisible.keys()), dLineVisible.keys())
    form.show()
    app.exec_()