class SemiAutomaticClassificationPluginDialog(QtGui.QDialog): def __init__(self): QtGui.QDialog.__init__(self) self.setWindowFlags(Qt.Window) # initialize plugin directory self.plgnDir = QFileInfo(QgsApplication.qgisUserDbFilePath()).path() + "/python/plugins/SemiAutomaticClassificationPlugin" # locale name self.lclNm = QSettings().value("locale/userLocale")[0:2] # path to locale lclPth = "" if QFileInfo(self.plgnDir).exists(): lclPth = self.plgnDir + "/i18n/semiautomaticclassificationplugin_" + self.lclNm + ".qm" if QFileInfo(lclPth).exists(): self.trnsltr = QTranslator() self.trnsltr.load(lclPth) if qVersion() > '4.3.3': QCoreApplication.installTranslator(self.trnsltr) # Set up the user interface from Designer. self.ui = Ui_SemiAutomaticClassificationPlugin() self.ui.setupUi(self) def shape_layer_combo(self, shape): self.ui.shape_name_combo.addItem(shape) def shape_clip_combo(self, shape): self.ui.shapefile_comboBox.addItem(shape) def classification_layer_combo(self, layer): self.ui.classification_name_combo.addItem(layer) def classification_report_combo(self, layer): self.ui.classification_report_name_combo.addItem(layer) def classification_to_vector_combo(self, layer): self.ui.classification_vector_name_combo.addItem(layer) def reclassification_combo(self, layer): self.ui.reclassification_name_combo.addItem(layer) def reference_layer_combo(self, shape): self.ui.reference_name_combo.addItem(shape) def classification_reference_layer_combo(self, layer): self.ui.classification_reference_name_combo.addItem(layer) def new_classification_layer_combo(self, layer): self.ui.new_classification_name_combo.addItem(layer) def raster_layer_combo(self, layer): self.ui.raster_name_combo.addItem(layer) def raster_extent_combo(self, layer): self.ui.raster_extent_combo.addItem(layer) def raster_data_type_combo(self, dataType): self.ui.raster_precision_combo.addItem(dataType) def class_field_combo(self, field): self.ui.class_field_comboBox.addItem(field)
class SemiAutomaticClassificationPluginDialog(QtGui.QDialog): def __init__(self): QtGui.QDialog.__init__(self) self.setWindowFlags(Qt.Window) # initialize plugin directory self.plgnDir = QFileInfo(QgsApplication.qgisUserDbFilePath()).path( ) + "/python/plugins/SemiAutomaticClassificationPlugin" # locale name self.lclNm = QSettings().value("locale/userLocale")[0:2] # path to locale lclPth = "" if QFileInfo(self.plgnDir).exists(): lclPth = self.plgnDir + "/i18n/semiautomaticclassificationplugin_" + self.lclNm + ".qm" if QFileInfo(lclPth).exists(): self.trnsltr = QTranslator() self.trnsltr.load(lclPth) if qVersion() > '4.3.3': QCoreApplication.installTranslator(self.trnsltr) # Set up the user interface from Designer. self.ui = Ui_SemiAutomaticClassificationPlugin() self.ui.setupUi(self) def shape_layer_combo(self, shape): self.ui.shape_name_combo.addItem(shape) def shape_clip_combo(self, shape): self.ui.shapefile_comboBox.addItem(shape) def classification_layer_combo(self, layer): self.ui.classification_name_combo.addItem(layer) def classification_report_combo(self, layer): self.ui.classification_report_name_combo.addItem(layer) def classification_to_vector_combo(self, layer): self.ui.classification_vector_name_combo.addItem(layer) def reclassification_combo(self, layer): self.ui.reclassification_name_combo.addItem(layer) def reference_layer_combo(self, shape): self.ui.reference_name_combo.addItem(shape) def classification_reference_layer_combo(self, layer): self.ui.classification_reference_name_combo.addItem(layer) def new_classification_layer_combo(self, layer): self.ui.new_classification_name_combo.addItem(layer) def raster_layer_combo(self, layer): self.ui.raster_name_combo.addItem(layer) def raster_extent_combo(self, layer): self.ui.raster_extent_combo.addItem(layer) def raster_data_type_combo(self, dataType): self.ui.raster_precision_combo.addItem(dataType) def class_field_combo(self, field): self.ui.class_field_comboBox.addItem(field)
def __init__(self): QtGui.QDialog.__init__(self) self.setWindowFlags(Qt.Window) # initialize plugin directory self.plgnDir = QFileInfo(QgsApplication.qgisUserDbFilePath()).path( ) + "/python/plugins/SemiAutomaticClassificationPlugin" # locale name self.lclNm = QSettings().value("locale/userLocale")[0:2] # path to locale lclPth = "" if QFileInfo(self.plgnDir).exists(): lclPth = self.plgnDir + "/i18n/semiautomaticclassificationplugin_" + self.lclNm + ".qm" if QFileInfo(lclPth).exists(): self.trnsltr = QTranslator() self.trnsltr.load(lclPth) if qVersion() > '4.3.3': QCoreApplication.installTranslator(self.trnsltr) # Set up the user interface from Designer. self.ui = Ui_SemiAutomaticClassificationPlugin() self.ui.setupUi(self)
def __init__(self): QtGui.QDialog.__init__(self) self.setWindowFlags(Qt.Window) # initialize plugin directory self.plgnDir = QFileInfo(QgsApplication.qgisUserDbFilePath()).path() + "/python/plugins/SemiAutomaticClassificationPlugin" # locale name self.lclNm = QSettings().value("locale/userLocale")[0:2] # path to locale lclPth = "" if QFileInfo(self.plgnDir).exists(): lclPth = self.plgnDir + "/i18n/semiautomaticclassificationplugin_" + self.lclNm + ".qm" if QFileInfo(lclPth).exists(): self.trnsltr = QTranslator() self.trnsltr.load(lclPth) if qVersion() > '4.3.3': QCoreApplication.installTranslator(self.trnsltr) # Set up the user interface from Designer. self.ui = Ui_SemiAutomaticClassificationPlugin() self.ui.setupUi(self)