def __init__(self, indicator, parent=None, **kwargs): if qt_min_version(5): super().__init__(indicator=indicator, parent=parent, **kwargs) else: QtGui.QLineEdit.__init__(self, parent=parent, **kwargs) Display.__init__(self, indicator) self.setReadOnly(True)
def __init__(self, indicator, parent=None, **kwargs): if qt_min_version(5): super().__init__(indicator=indicator, parent=parent, **kwargs) else: QtGui.QDoubleSpinBox.__init__(self, parent=parent, **kwargs) Display.__init__(self, indicator) self.setButtonSymbols(QtGui.QAbstractSpinBox.NoButtons) self.setDecimals(12) self.setMaximum(10**indicator.precision) self.setMinimum(-10**indicator.precision)
def __init__(self, parameter, parent=None, horizontal=False, **kwargs): if not self.labels: self.labels = [""] * parameter._length self.horizontal = horizontal self._setup_ui() if qt_min_version(5): super().__init__(parameter=parameter, parent=parent, **kwargs) else: QtGui.QWidget.__init__(self, parent=parent, **kwargs) inputs.Input.__init__(self, parameter) self._layout()
def __init__(self, parameter, parent=None, **kwargs): if parameter._length == 3: self._populate_off_resonance = False elif parameter._length == 6: self._populate_off_resonance = True else: raise ValueError( "Vector parameter must have a length of 3 or 6 to use the " "Noise Input UI") self._setup_ui() if qt_min_version(5): super().__init__(parameter=parameter, parent=parent, **kwargs) else: QtGui.QWidget.__init__(self, parent=parent, **kwargs) inputs.Input.__init__(self, parameter) self._layout()