def __init__(self, param, depth): param.opts[u'value'] = param.opts[u'default'] self.targetValue = None self.values = param.opts.get(u'values', []) self.valuesDict = {} for (a, b) in self.values: self.valuesDict[a] = b WidgetParameterItem.__init__(self, param, depth) self.widget.sigChanged.connect(self.widgetValueChanged)
def __init__(self, param, depth): WidgetParameterItem.__init__(self, param, depth) layout = self.layoutWidget.layout() if depth == 1: # color defaults to red if not set in opts color = param.opts['color'] if 'color' in param.opts else (255, 0, 0, 255) self.colorBtn = pg.ColorButton(self.treeWidget(), color) layout.insertWidget(0, self.colorBtn) self.colorBtn.clicked.disconnect() self.colorBtn.clicked.connect(self.colorChange) self.colorBtn.setMaximumWidth(30)
def __init__(self, param, depth): WidgetParameterItem.__init__(self, param, depth) self.displayLabel = QtGui.QLabel() # redefine the layout for default button layout = QtGui.QHBoxLayout() layout.setContentsMargins(0, 0, 0, 0) layout.setSpacing(2) layout.addWidget(self.widget) layout.addWidget(self.displayLabel) # layout.addWidget(self.defaultBtn) self.layoutWidget = QtGui.QWidget() self.layoutWidget.setLayout(layout)
def __init__(self, param, depth): self.targetValue = None WidgetParameterItem.__init__(self, param, depth)
def __init__(self, param, depth): self.targetValue = None self.oldbackgrounds = [] WidgetParameterItem.__init__(self, param, depth) self.hideWidget = False
def __init__(self, param, depth): self.dimension = param.dimension WidgetParameterItem.__init__(self, param, depth) self.hideWidget = False