First, we need to change a bit GUI for dialog:
for comboBoxCoordSeparator add new item 'User defined'
new QLineEdit: lineEditUserSeparator
new QCheckBox: checkBoxReomveBlanks
Method that sets separator between latitude and longitude has to be changed, so it will takes user defined separator:
def set_latlon_separator(self): if self.dlg.comboBoxCoordSeparator.currentIndex() == 0: self.dlg.lineEditUserSeparator.setEnabled(False) self.latlon_separator = None elif self.dlg.comboBoxCoordSeparator.currentIndex() == 1: # Null separator self.dlg.lineEditUserSeparator.setEnabled(False) self.latlon_separator = cet.SEP_NULL elif self.dlg.comboBoxCoordSeparator.currentIndex() == 2: # Space self.dlg.lineEditUserSeparator.setEnabled(False) self.latlon_separator = cet.SEP_SPACE elif self.dlg.comboBoxCoordSeparator.currentIndex() == 3: # Hyphen self.dlg.lineEditUserSeparator.setEnabled(False) self.latlon_separator = cet.SEP_HYPHEN elif self.dlg.comboBoxCoordSeparator.currentIndex() == 4: self.dlg.lineEditUserSeparator.setEnabled(False) self.latlon_separator = cet.SEP_SLASH elif self.dlg.comboBoxCoordSeparator.currentIndex() == 5: self.dlg.lineEditUserSeparator.setEnabled(False) self.latlon_separator = '\\' elif self.dlg.comboBoxCoordSeparator.currentIndex() == 6: self.dlg.lineEditUserSeparator.setEnabled(True) self.latlon_separator = self.dlg.lineEditUserSeparator.text()
No comments:
Post a Comment