本文整理匯總了Python中pyqtcore.QList.last方法的典型用法代碼示例。如果您正苦於以下問題:Python QList.last方法的具體用法?Python QList.last怎麽用?Python QList.last使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pyqtcore.QList
的用法示例。
在下文中一共展示了QList.last方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: AutoMapper
# 需要導入模塊: from pyqtcore import QList [as 別名]
# 或者: from pyqtcore.QList import last [as 別名]
#.........這裏部分代碼省略.........
continue
self.mInputRules.names.insert(name)
if (not self.mInputRules.indexes.contains(index)):
self.mInputRules.indexes.insert(index)
self.mInputRules.insert(index, InputIndex())
if (not self.mInputRules[index].names.contains(name)):
self.mInputRules[index].names.insert(name)
self.mInputRules[index].insert(name, InputIndexName())
if (isNotList):
self.mInputRules[index][name].listNo.append(layer.asTileLayer())
else:
self.mInputRules[index][name].listYes.append(layer.asTileLayer())
continue
if layerName.lower().startswith("output"):
if (layer.isTileLayer()):
self.mTouchedTileLayers.insert(name)
else:
self.mTouchedObjectGroups.insert(name)
type = layer.layerType()
layerIndex = self.mMapWork.indexOfLayer(name, type)
found = False
for translationTable in self.mLayerList:
if (translationTable.index == index):
translationTable.insert(layer, layerIndex)
found = True
break
if (not found):
self.mLayerList.append(RuleOutput())
self.mLayerList.last().insert(layer, layerIndex)
self.mLayerList.last().index = index
continue
error += self.tr("Layer '%s' is not recognized as a valid layer for Automapping.\n"%layerName)
if (not self.mLayerInputRegions):
error += self.tr("No 'regions' or 'regions_input' layer found.\n")
if (not self.mLayerOutputRegions):
error += self.tr("No 'regions' or 'regions_output' layer found.\n")
if (self.mInputRules.isEmpty()):
error += self.tr("No input_<name> layer found!\n")
# no need to check for mInputNotRules.size() == 0 here.
# these layers are not necessary.
if error != '':
error = self.mRulePath + '\n' + error
self.mError += error
return False
return True
##
# Checks if all needed layers in the working map are there.
# If not, add them in the correct order.
##
def setupMissingLayers(self):
# make sure all needed layers are there:
for name in self.mTouchedTileLayers:
if (self.mMapWork.indexOfLayer(name, Layer.TileLayerType) != -1):
continue
index = self.mMapWork.layerCount()
tilelayer = TileLayer(name, 0, 0, self.mMapWork.width(), self.mMapWork.height())