def __init__(self, parent=None, default_value=0): QSpinBox.__init__(self, parent) self.validator = QRegExpValidator(QRegExp("[0-9A-Fa-f]{1,2}"), self) self.setRange(0, 255) self.setValue(default_value)
def __init__(self, observed, prop, parent=None): QSpinBox.__init__(self, parent) self.getter = lambda: prop.fget(observed) self.setter = lambda x: prop.fset(observed, x) observed.register(self.update) self.setValue(self.getter()) self.connect(self, SIGNAL('valueChanged(int)'), self.setter)
def __init__(self, values, parent=None): QSpinBox.__init__(self, parent) self.setKeyboardTracking(False) self._values = [] """ :type: list[int]""" self.set_index_values(values) self.setMinimum(0)
def __init__(self, items): QSpinBox.__init__(self) self.setMinimumWidth(75) self.__string_converter = str self.__items = items self.setRange(0, len(items) - 1) self.setValue(len(items) - 1)
def __init__(self, parent=None): QSpinBox.__init__(self, parent) self._app = QApplication.instance().window self.setRange(0, 0) self.setValue(0) self._waveViews = {}
def __init__(self, client, arg, value, compatibility=None): QSpinBox.__init__(self) ArgFilterBase.__init__(self, client, arg, value, compatibility=compatibility) self.setMinimum(0) self.setMaximum(2147483647) # 2^31-1 self.connect(self, SIGNAL('valueChanged( int )'), self.newValue) try: self.setValue(int(value)) except (TypeError, ValueError): # this is not an integer pass
def __init__(self, *args): QSpinBox.__init__(self, *args) self.setFocusPolicy(Qt.NoFocus) self.setMinimumSize(QSize(70, 40)) self.setMaximumSize(QSize(90, 60)) tmpFont = QFont() tmpFont.setPointSize(23) self.setFont(tmpFont) tmpLE = QLineEdit() tmpLE.setReadOnly(True) tmpLE.setFocusPolicy(Qt.NoFocus) self.setLineEdit(tmpLE) self.connect(self, SIGNAL("valueChanged(int)"), self.onSpinBoxValueChanged, Qt.QueuedConnection)
def __init__(self, items): QSpinBox.__init__(self) self.setMinimumWidth(75) self.__string_converter = str self.__items = items list = [] for item in self.__items: assert isinstance(item, CTime) date = item.date() list.append(self.convertToString(date)) model = QStringListModel() model.setStringList(list) self.setRange(0, len(items) - 1) self.setValue(len(items) - 1) line_edit = QLineEdit() self.setLineEdit(line_edit)
def __init__(self, value): QSpinBox.__init__(self) self._value = value if value.default: self.setValue(int(value.default))
def __init__(self, parent): QSpinBox.__init__(self, parent) self._processChangeSignals = 0 self._model = None
def __init__(self, parties, parent=None): QSpinBox.__init__(self, parent) self.parties = parties self.prevValue = None
def __init__(self, parent=None, default_value=0): QSpinBox.__init__(self, parent) self.validator = QRegExpValidator( QRegExp('^([ ]*[0-9A-Fa-f][ ]*){1,8}$'), self) self.setValue(default_value)
def __init__(self, parent=None, default_value=0): QSpinBox.__init__(self, parent) self.validator = QRegExpValidator(QRegExp('^([ ]*[0-9A-Fa-f][ ]*){1,8}$'), self) self.setValue(default_value)