Пример #1
0
 def openModeler(self):
     dlg = ModelerDialog()
     dlg.show()
     dlg.exec_()
     if dlg.update:
         Processing.updateAlgsList()
         self.toolbox.updateProvider('model')
Пример #2
0
 def execute(self):
     alg = self.itemData
     ok, msg = alg.canExecute()
     if not ok:
         iface.messageBar().pushMessage(QCoreApplication.translate('EditModelAction', 'Cannot edit model: {}').format(msg), level=Qgis.Warning)
     else:
         dlg = ModelerDialog(alg)
         dlg.update_model.connect(self.updateModel)
         dlg.show()
Пример #3
0
    def execute(self):
        settings = QgsSettings()
        lastDir = settings.value('Processing/lastModelsDir', '')
        filename, selected_filter = QFileDialog.getOpenFileName(self.toolbox,
                                                                self.tr('Open Model', 'AddModelFromFileAction'), lastDir,
                                                                self.tr('Processing models (*.model3 *.MODEL3)', 'AddModelFromFileAction'))
        if filename:
            settings.setValue('Processing/lastModelsDir',
                              QFileInfo(filename).absoluteDir().absolutePath())

            dlg = ModelerDialog()
            dlg.loadModel(filename)
            dlg.show()
Пример #4
0
 def execute(self):
     dlg = ModelerDialog()
     dlg.show()
     dlg.exec_()
     if dlg.update:
         self.toolbox.updateProvider('model')
Пример #5
0
 def openModeler(self):
     dlg = ModelerDialog()
     dlg.update_model.connect(self.updateModel)
     dlg.show()
Пример #6
0
 def editModel(self):
     dlg = ModelerDialog()
     dlg.loadModel(self.path())
     dlg.show()
Пример #7
0
 def execute(self):
     dlg = ModelerDialog()
     dlg.update_model.connect(self.updateModel)
     dlg.show()
Пример #8
0
 def execute(self):
     alg = self.itemData
     dlg = ModelerDialog(alg)
     dlg.update_model.connect(self.updateModel)
     dlg.show()
Пример #9
0
 def execute(self):
     dlg = ModelerDialog(self.itemData.getCopy())
     dlg.update_model.connect(self.updateModel)
     dlg.show()
Пример #10
0
 def execute(self):
     dlg = ModelerDialog()
     dlg.update_model.connect(self.updateModel)
     dlg.show()
Пример #11
0
 def execute(self):
     alg = self.itemData
     dlg = ModelerDialog(alg)
     dlg.update_model.connect(self.updateModel)
     dlg.show()
Пример #12
0
 def openModeler(self):
     dlg = ModelerDialog()
     dlg.update_model.connect(self.updateModel)
     dlg.show()
Пример #13
0
 def editModel(self):
     dlg = ModelerDialog()
     dlg.loadModel(self.path())
     dlg.show()
Пример #14
0
 def execute(self):
     dlg = ModelerDialog(self.itemData.getCopy())
     dlg.update_model.connect(self.updateModel)
     dlg.show()