def loadFields(self, vectorFile = QString()): if vectorFile == None: return try: (fields, names) = Utils.getVectorFields(vectorFile) except Exception, e: QErrorMessage(self).showMessage( str(e) )
def loadFields(self, vectorFile=QString()): self.zfieldCombo.clear() if vectorFile.isEmpty(): return try: (fields, names) = Utils.getVectorFields(vectorFile) except Utils.UnsupportedOGRFormat, e: QErrorMessage(self).showMessage(e.args[0]) self.inSelector.setLayer(None) return
def loadFields(self, vectorFile=''): self.zfieldCombo.clear() if not vectorFile: return try: (fields, names) = Utils.getVectorFields(vectorFile) except Utils.UnsupportedOGRFormat, e: QErrorMessage(self).showMessage( e.args[0] ) self.inSelector.setLayer( None ) return
def loadFields(self, vectorFile): self.attributeComboBox.clear() if vectorFile.isEmpty(): return try: (fields, names) = Utils.getVectorFields(vectorFile) except Utils.UnsupportedOGRFormat, e: QErrorMessage(self).showMessage( e.args[0] ) self.inSelector.setLayer( None ) return
def loadFields(self, vectorFile): self.attributeComboBox.clear() if not vectorFile: return try: (fields, names) = Utils.getVectorFields(vectorFile) except Utils.UnsupportedOGRFormat, e: QErrorMessage(self).showMessage(e.args[0]) self.inSelector.setLayer(None) return
def loadFields(self, vectorFile = QString()): self.zfieldCombo.clear() if vectorFile.isEmpty(): return try: (fields, names) = Utils.getVectorFields(vectorFile) except Exception, e: QErrorMessage(self).showMessage( str(e) ) self.inputLayerCombo.clearEditText() self.inputLayerCombo.setCurrentIndex(-1) return
def loadFields(self, vectorFile): self.attributeComboBox.clear() if not vectorFile: return try: (fields, names) = Utils.getVectorFields(vectorFile) except Utils.UnsupportedOGRFormat as e: QErrorMessage(self).showMessage(e.args[0]) self.inSelector.setLayer(None) return ncodec = QTextCodec.codecForName(self.lastEncoding) for name in names: self.attributeComboBox.addItem(ncodec.toUnicode(name))
def loadFields(self, vectorFile=''): self.zfieldCombo.clear() if not vectorFile: return try: (fields, names) = Utils.getVectorFields(vectorFile) except Utils.UnsupportedOGRFormat as e: QErrorMessage(self).showMessage(e.args[0]) self.inSelector.setLayer(None) return ncodec = QTextCodec.codecForName(self.lastEncoding) for name in names: self.zfieldCombo.addItem(ncodec.toUnicode(name))