def __init__(self, max_bytes=-1): QValidator.__init__(self) self.max_bytes = max_bytes if max_bytes == 0: self.re_acceptable = QRegExp('') self.re_intermediate = QRegExp('') elif max_bytes > 0: self.re_acceptable = QRegExp('([0-9A-Fa-f]{2} ){0,%d}[0-9A-Fa-f]{2}' % (max_bytes - 1)) self.re_intermediate = QRegExp('[ ]*|([ ]*[0-9A-Fa-f][ ]*){1,%d}' % (max_bytes * 2)) else: self.re_acceptable = QRegExp('([0-9A-Fa-f]{2} )*[0-9A-Fa-f]{2}') self.re_intermediate = QRegExp('[ ]*|([ ]*[0-9A-Fa-f][ ]*)+')
def __init__(self, max_bytes=-1): QValidator.__init__(self) self.max_bytes = max_bytes if max_bytes == 0: self.re_acceptable = QRegExp('') self.re_intermediate = QRegExp('') elif max_bytes > 0: self.re_acceptable = QRegExp( '([0-9A-Fa-f]{2} ){0,%d}[0-9A-Fa-f]{2}' % (max_bytes - 1)) self.re_intermediate = QRegExp('[ ]*|([ ]*[0-9A-Fa-f][ ]*){1,%d}' % (max_bytes * 2)) else: self.re_acceptable = QRegExp('([0-9A-Fa-f]{2} )*[0-9A-Fa-f]{2}') self.re_intermediate = QRegExp('[ ]*|([ ]*[0-9A-Fa-f][ ]*)+')
def __init__(self, widget): QValidator.__init__(self, widget) self.model = widget.model()
def __init__(self, codec): QValidator.__init__(self) self.codec = codec
def __init__(self): QValidator.__init__(self) self._qvalidator = QDoubleValidator()
def __init__(self): QValidator.__init__(self)
def __init__(self, formatter, codec): QValidator.__init__(self) self.formatter = formatter self.codec = codec