def getSampleRow( self, i ):
        table = self.tableWidget
        sampleRow = Sample() #ISPyBSample() 

        sampleRow.enable = table.cellWidget( i, self.ENABLE_COLUMN ).isChecked()
        sampleRow.type = str( table.cellWidget( i, self.SAMPLETYPE_COLUMN ).currentText() )
        sampleRow.typen = table.cellWidget( i, self.SAMPLETYPE_COLUMN ).currentIndex()
        sampleRow.plate = str( table.cellWidget( i, self.PLATE_COLUMN ).currentText() )
        #sampleRow.row            =  str(table.cellWidget(i, self.ROW_COLUMN).currentText())   
        rowtxt = str( table.cellWidget( i, self.ROW_COLUMN ).currentText() )
        sampleRow.row = rowletters.index( rowtxt ) + 1
        sampleRow.well = str( table.cellWidget( i, self.WELL_COLUMN ).currentText() )
        sampleRow.concentration = table.cellWidget( i, self.CONCENTRATION_COLUMN ).value()
        sampleRow.comments = str( table.cellWidget( i, self.COMMENTS_COLUMN ).text() )
        sampleRow.code = str( table.cellWidget( i, self.CODE_COLUMN ).text() )
        sampleRow.viscosity = str( table.cellWidget( i, self.VISCOSITY_COLUMN ).currentText() )
        sampleRow.buffername = str( table.cellWidget( i, self.BUFFERNAME_COLUMN ).currentText() )
        sampleRow.transmission = table.cellWidget( i, self.TRANSMISSION_COLUMN ).value()
        sampleRow.volume = table.cellWidget( i, self.VOLUME_COLUMN ).value()
        sampleRow.flow = table.cellWidget( i, self.FLOW_COLUMN ).isChecked()
        sampleRow.recuperate = table.cellWidget( i, self.RECUPERATE_COLUMN ).isChecked()
        if sampleRow.type == 'Sample':
            sampleRow.SEUtemperature = table.cellWidget( i, self.TEMPERATURE_COLUMN ).value()
            sampleRow.waittime = table.cellWidget( i, self.WAITTIME_COLUMN ).value()
        else:
            sampleRow.SEUtemperature = 4.0
            sampleRow.waittime = 0.0
        sampleRow.title = sampleRow.getTitle()

        return sampleRow
Example #2
0
    def getSampleRow(self, i):
        table = self.tableWidget
        sampleRow = Sample()

        sampleRow.enable = table.cellWidget(i, self.ENABLE_COLUMN).isChecked()
        sampleRow.type = str(
            table.cellWidget(i, self.SAMPLETYPE_COLUMN).currentText())
        sampleRow.typen = table.cellWidget(
            i, self.SAMPLETYPE_COLUMN).currentIndex()
        sampleRow.plate = str(
            table.cellWidget(i, self.PLATE_COLUMN).currentText())
        #sampleRow.row            =  str(table.cellWidget(i, self.ROW_COLUMN).currentText())
        rowtxt = str(table.cellWidget(i, self.ROW_COLUMN).currentText())
        sampleRow.row = rowletters.index(rowtxt) + 1
        sampleRow.well = str(
            table.cellWidget(i, self.WELL_COLUMN).currentText())
        sampleRow.concentration = table.cellWidget(
            i, self.CONCENTRATION_COLUMN).value()
        sampleRow.comments = str(
            table.cellWidget(i, self.COMMENTS_COLUMN).text())
        sampleRow.macromolecule = str(
            table.cellWidget(i, self.MACROMOLECULE_COLUMN).text())
        sampleRow.code = str(table.cellWidget(i, self.CODE_COLUMN).text())
        sampleRow.viscosity = str(
            table.cellWidget(i, self.VISCOSITY_COLUMN).currentText())
        sampleRow.buffername = str(
            table.cellWidget(i, self.BUFFERNAME_COLUMN).currentText())
        sampleRow.transmission = table.cellWidget(
            i, self.TRANSMISSION_COLUMN).value()
        sampleRow.volume = table.cellWidget(i, self.VOLUME_COLUMN).value()
        sampleRow.flow = table.cellWidget(i, self.FLOW_COLUMN).isChecked()
        sampleRow.recuperate = table.cellWidget(
            i, self.RECUPERATE_COLUMN).isChecked()
        if sampleRow.type == 'Sample':
            sampleRow.SEUtemperature = table.cellWidget(
                i, self.TEMPERATURE_COLUMN).value()
            sampleRow.waittime = table.cellWidget(
                i, self.WAITTIME_COLUMN).value()
        else:
            sampleRow.SEUtemperature = 4.0
            sampleRow.waittime = 0.0
        sampleRow.title = sampleRow.getTitle()

        return sampleRow