Beispiel #1
0
 def getStationName(self):
     if PY3:
         data = utils.printable(
             self.getPML(pml.OID_FAX_STATION_NAME)[1].encode('utf-8'))
         return data.decode('utf-8')
     else:
         return utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1])
Beispiel #2
0
 def getPhoneNum(self):
     if PY3:
         data = utils.printable(
             self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1].encode('utf-8'))
         return data.decode('utf-8')
     else:
         return utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
Beispiel #3
0
    def validate(self, input, pos):
        input = to_unicode(input)

        try:
            input = input.encode('ascii')
        except UnicodeEncodeError:
            return QValidator.Invalid, pos

        if not input:
            return QValidator.Acceptable, pos
        # TODO: Find valid chars for this field
        elif input != utils.printable(input):
            return QValidator.Invalid, pos
        elif len(input) > 50:
            return QValidator.Invalid, pos
        else:
            return QValidator.Acceptable, pos
Beispiel #4
0
    def validate(self, input, pos):
        input = to_unicode(input)

        try:
            input = input.encode('ascii')
        except UnicodeEncodeError:
            return QValidator.Invalid, pos

        if not input:
            return QValidator.Acceptable, pos
        # TODO: Find valid chars for this field
        elif input != utils.printable(input):
            return QValidator.Invalid, pos
        elif len(input) > 50:
            return QValidator.Invalid, pos
        else:
            return QValidator.Acceptable, pos
Beispiel #5
0
 def getStationName(self):
     return utils.printable(str(self.getPML(pml.OID_FAX_STATION_NAME)[1]))
Beispiel #6
0
 def getPhoneNum(self):
     return utils.printable(str(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1]))
Beispiel #7
0
 def getStationName(self):
     if PY3:
         data = utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1])
         return data
     else:
         return utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1])
Beispiel #8
0
 def getPhoneNum(self):
     if PY3:
         data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
         return data
     else:
         return utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
Beispiel #9
0
 def getStationName(self):
     return utils.printable(str(self.getPML(pml.OID_FAX_STATION_NAME)[1]))
Beispiel #10
0
 def getPhoneNum(self):
     return utils.printable(str(
         self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1]))
Beispiel #11
0
 def getStationName(self):
     if PY3:
         data = utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1].encode('utf-8'))
         return data.decode('utf-8')
     else:
         return utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1])
Beispiel #12
0
 def getPhoneNum(self):
     if PY3:
         data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1].encode('utf-8'))
         return data.decode('utf-8')
     else:
         return utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
Beispiel #13
0
 def getStationName(self):
     if PY3:
         data = utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1])
         return data
     else:
         return utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1])
Beispiel #14
0
 def getPhoneNum(self):
     if PY3:
         data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
         return data
     else:
         return utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])