def __init__(self, comboMsg, fieldNames, layerName): QDialog.__init__(self) # Set up the user interface from Designer. self.ui = Ui_XyFields() self.ui.setupUi(self) # fill dropdowns fieldNames.insert(0, comboMsg) self.ui.cmbXcoord.clear() self.ui.cmbYcoord.clear() self.ui.cmbXcoord.addItems(fieldNames) self.ui.cmbYcoord.addItems(fieldNames) self.ui.groupxy.setTitle("Current layer: '" + layerName + "'")
def __init__(self, comboMsg, fieldNames, layerName): QDialog.__init__(self) # Set up the user interface from Designer. self.ui = Ui_XyFields() self.ui.setupUi(self) # fill dropdowns fieldNames.insert(0, comboMsg) self.ui.cmbXcoord.clear() self.ui.cmbYcoord.clear() self.ui.cmbXcoord.addItems(fieldNames) self.ui.cmbYcoord.addItems(fieldNames) self.ui.groupxy.setTitle("Current layer: '" + layerName + "'")
class XyFieldsDialog(QDialog): def __init__(self, comboMsg, fieldNames, layerName): QDialog.__init__(self) # Set up the user interface from Designer. self.ui = Ui_XyFields() self.ui.setupUi(self) # fill dropdowns fieldNames.insert(0, comboMsg) self.ui.cmbXcoord.clear() self.ui.cmbYcoord.clear() self.ui.cmbXcoord.addItems(fieldNames) self.ui.cmbYcoord.addItems(fieldNames) self.ui.groupxy.setTitle("Current layer: '" + layerName + "'") def getXindex(self): # because first one is caption return self.ui.cmbXcoord.currentIndex() - 1 def getYindex(self): # because first one is caption return self.ui.cmbYcoord.currentIndex() - 1
class XyFieldsDialog(QDialog): def __init__(self, comboMsg, fieldNames, layerName): QDialog.__init__(self) # Set up the user interface from Designer. self.ui = Ui_XyFields() self.ui.setupUi(self) # fill dropdowns fieldNames.insert(0, comboMsg) self.ui.cmbXcoord.clear() self.ui.cmbYcoord.clear() self.ui.cmbXcoord.addItems(fieldNames) self.ui.cmbYcoord.addItems(fieldNames) self.ui.groupxy.setTitle("Current layer: '" + layerName + "'") def getXindex(self): # because first one is caption return self.ui.cmbXcoord.currentIndex() - 1 def getYindex(self): # because first one is caption return self.ui.cmbYcoord.currentIndex() - 1