Exemplo n.º 1
0
 def on_cmbOperationType_editTextChanged(self, text):
     text = toNativeType(text)
     if text not in self._typesInfo.get('names', []):
         self.cmbOperationType.lineEdit().setStyleSheet(
             u'background-color: red')
     else:
         self.cmbOperationType.lineEdit().setStyleSheet(u'')
Exemplo n.º 2
0
    def _loadFromSqlRecord(sqlRecordInfo, record, destClass):
        result = destClass()

        for fieldName in sqlRecordInfo.keys():
            if not record.contains(fieldName):
                continue
            # получение значение поля через соответствующее свойство (указанное в _sqlRecordInfo)
            value = toNativeType(record.value(fieldName))
            sqlRecordInfo[fieldName][1].__set__(result, value)

        return result
Exemplo n.º 3
0
 def setOperator(self, operator):
     self._operator = toNativeType(operator)
Exemplo n.º 4
0
 def setCloseDatetime(self, closeDatetime):
     self._closeDatetime = toNativeType(closeDatetime)
Exemplo n.º 5
0
 def setCloseType(self, closeType):
     self._closeType = toNativeType(closeType)
Exemplo n.º 6
0
 def setCheckSumm(self, summ):
     self._checkSumm = toNativeType(summ)
Exemplo n.º 7
0
 def setOperationTypeId(self, typeId):
     self._operationTypeId = toNativeType(typeId)
Exemplo n.º 8
0
 def setCashFlowArticle(self, article):
     self._cashFlowArticle = toNativeType(article)
Exemplo n.º 9
0
 def setPersonNatural(self, isPersonNatural):
     isPersonNatural = toNativeType(isPersonNatural)
     if isinstance(isPersonNatural, basestring):
         isPersonNatural = forceInt(isPersonNatural)
     self._isPersonNatural = bool(isPersonNatural)
Exemplo n.º 10
0
 def setExpense(self, isExpense):
     isExpense = toNativeType(isExpense)
     if isinstance(isExpense, basestring):
         isExpense = forceInt(isExpense)
     self._isExpense = bool(isExpense)
Exemplo n.º 11
0
 def setSession(self, session):
     self._session = toNativeType(session)
Exemplo n.º 12
0
 def setPersonDocumentNumber(self, number):
     self._personDocumentNumber = toNativeType(number)
Exemplo n.º 13
0
 def setPersonDocumentSerial(self, serial):
     self._personDocumentSerial = toNativeType(serial)
Exemplo n.º 14
0
 def setPersonDocumentType(self, docType):
     self._personDocumentType = toNativeType(docType)
Exemplo n.º 15
0
 def setDescription(self, description):
     self._description = toNativeType(description)
Exemplo n.º 16
0
 def setSubstructure(self, substructure):
     self._substructure = toNativeType(substructure)
Exemplo n.º 17
0
 def setCheckType(self, checkType):
     self._checkType = toNativeType(checkType)
Exemplo n.º 18
0
 def setOperationTypeName(self, typeName):
     self._operationTypeName = toNativeType(typeName)
Exemplo n.º 19
0
 def setCheckNumber(self, number):
     self._checkNumber = toNativeType(number)
Exemplo n.º 20
0
 def setPersonName(self, name):
     self._personName = toNativeType(name)
Exemplo n.º 21
0
 def filterAcceptsRow(self, sourceRow, sourceParent):
     result = QtGui.QSortFilterProxyModel.filterAcceptsRow(self, sourceRow, sourceParent)
     if result and self._isFilterByValuesList:
         value = toNativeType(self.sourceModel().index(sourceRow, self.filterKeyColumn()).data(self.filterRole()))
         result &= value in self._valuesList
     return result