def __init__(self, mc): self.mc = mc Qt.QTreeWidgetItem.__init__(self) self.paramCombo = pg.ComboBox() self.convolutionCombo = pg.ComboBox( items=["Gaussian convolution", "interpolation"], default="Gaussian convolution") #self.convolutionCombo.addItems(["Gaussian convolution", "interpolation"]) self.sigmaSpin = pg.SpinBox(value=45e-6, siPrefix=True, suffix='m', dec=True, step=0.1) self.modeCombo = pg.ComboBox(items=['nearest', 'linear', 'cubic'], default='nearest') #self.modeCombo.addItems(['nearest', 'linear', 'cubic']) self.modeCombo.setEnabled(False) self.remBtn = Qt.QPushButton('Remove') self.remBtn.clicked.connect(self.delete) self.paramCombo.currentIndexChanged.connect(self.mc.fieldsChanged) self.convolutionCombo.currentIndexChanged.connect(self.methodChanged) self.paramCombo.currentIndexChanged.connect(self.itemChanged) self.sigmaSpin.sigValueChanged.connect(self.itemChanged) self.modeCombo.currentIndexChanged.connect(self.itemChanged)
def setWidgets(self, columns): self.widgets = { 'Seal': pg.ComboBox(items=['', 'GS', 'LS', 'NS', 'TF', 'NA']), 'Reporter': pg.ComboBox(items=['', 'red', 'green', 'yellow', '-', 'NA']), 'Nucleus': pg.ComboBox(items=['', '+', '-']), 'End Seal': pg.QtGui.QCheckBox(''), 'Tube ID': pg.QtGui.QLineEdit(), } for name, w in self.widgets.items(): col = columns[name] self.setWidget(col, w) self.widget_group = pg.WidgetGroup(self.widgets)
def __init__(self, cm): self.cm = cm Qt.QTreeWidgetItem.__init__(self) self.argCombo = pg.ComboBox() self.opCombo = pg.ComboBox() self.minSpin = SpinBox(value=0.0, dec=True, step=1) self.maxSpin = SpinBox(value=1.0, dec=True, step=1) self.gradient = GradientWidget() self.updateArgList() self.opCombo.addItem('+') self.opCombo.addItem('*') self.remBtn = Qt.QPushButton('Remove') self.remBtn.clicked.connect(self.delete) self.minSpin.sigValueChanged.connect(self.emitChanged) self.maxSpin.sigValueChanged.connect(self.emitChanged) self.opCombo.currentIndexChanged.connect(self.emitChanged) self.argCombo.currentIndexChanged.connect(self.emitChanged) self.gradient.sigGradientChangeFinished.connect(self.emitChanged)
def __init__(self, cp, parentImage=None): self.cp = cp QtGui.QTreeWidgetItem.__init__(self) self.paramCombo = pg.ComboBox() self.thresholdSpin = pg.SpinBox(value=0.98, dec=True, step=0.1) self.maxCheck = QtGui.QCheckBox() self.colorBtn = ColorButton(color=(255, 255, 255)) self.remBtn = QtGui.QPushButton('Remove') self.curveItem = pg.IsocurveItem() self.curveItem.setParentItem(parentImage) self.paramCombo.currentIndexChanged.connect(self.emitChanged) self.thresholdSpin.valueChanged.connect(self.emitChanged) self.maxCheck.stateChanged.connect(self.emitChanged) self.colorBtn.sigColorChanged.connect(self.setPen) self.remBtn.clicked.connect(self.delete)