def edit_attribute(self, ilayer, ifeature): stackWidget = SW.oivStackWidget() self.iface.addDockWidget(QH.getWidgetType(), stackWidget) stackWidget.parentWidget = self stackWidget.open_feature_form(ilayer, ifeature) self.close() stackWidget.show() self.selectTool.geomSelected.disconnect(self.edit_attribute)
def run_create_grid(self): gridWidget = GW.oivGridWidget(self) gridWidget.object_id.setText(self.object_id.text()) gridWidget.canvas = self.canvas gridWidget.iface = self.iface self.iface.addDockWidget(QH.getWidgetType(), gridWidget) gridWidget.show() self.close()
def run_edit_bouwlagen(self, ilayer, ifeature): """edit attribute form of floor feature""" stackWidget = SW.oivStackWidget() self.iface.addDockWidget(QH.getWidgetType(), stackWidget) stackWidget.update() stackWidget.parentWidget = self stackWidget.open_feature_form(ilayer, ifeature) self.close() stackWidget.show()
def run_object(self, ifeature, objectId): """start repressief object widget""" self.init_repressief_object_widget(ifeature, objectId) self.iface.addDockWidget(QT.getWidgetType(), self.repressiefobjectwidget) self.iface.actionPan().trigger() self.repressiefobjectwidget.show() self.close() self.repressiefobjectwidget.initActions()
def run_bouwlagen(self, objectId): """start objectgegevens widget""" self.init_pandwidget(objectId) self.iface.addDockWidget(QT.getWidgetType(), self.pandwidget) self.iface.actionPan().trigger() self.pandwidget.show() self.close() self.pandwidget.initUI() self.pandwidget.initActions()
def edit_attribute(self, ilayer, ifeature): """open het formulier van een feature in een dockwidget, zodat de attributen kunnen worden bewerkt""" stackWidget = SW.oivStackWidget() self.iface.addDockWidget(QH.getWidgetType(), stackWidget) stackWidget.parentWidget = self stackWidget.open_feature_form(ilayer, ifeature) self.close() stackWidget.show() try: self.selectTool.geomSelected.disconnect(self.edit_attribute) except: # pylint: disable=bare-except pass
def run_objectgegevens(self, formeleNaam, objectId): """continue to existing object woth the newly created feature and already searched address""" self.objectwidget.drawLayer = UC.getlayer_byname( PC.OBJECT["objectlayername"]) self.objectwidget.object_id.setText(str(objectId)) self.objectwidget.formelenaam.setText(formeleNaam) self.iface.addDockWidget(QH.getWidgetType(), self.objectwidget) self.objectwidget.initActions() self.objectwidget.show() self.iface.actionPan().trigger() self.close() del self.objectwidget del self
def run_new_object(self, objectId, bron, bron_tbl): """tart new object widget, eventhough passing trough the tools to objectgegevens widget""" self.objectnieuwwidget = OON.oivObjectNieuwWidget() self.init_repressief_object_widget(None, None) self.objectnieuwwidget.basewidget = self self.objectnieuwwidget.objectwidget = self.repressiefobjectwidget self.iface.addDockWidget(QT.getWidgetType(), self.objectnieuwwidget) self.objectnieuwwidget.canvas = self.canvas self.objectnieuwwidget.pointTool = self.pinTool self.objectnieuwwidget.identificatienummer.setText(str(objectId)) self.objectnieuwwidget.bron.setText(str(bron)) self.objectnieuwwidget.bron_table.setText(str(bron_tbl)) self.iface.actionPan().trigger() self.objectnieuwwidget.show() self.close()
def run_bouwlaag(self): while True: bouwlaag, bouwlaagMax, ok = BouwlaagDialog.getBouwlagen() if (bouwlaag != 0 and bouwlaagMax >= bouwlaag and ok is True): self.close() bouwlaagwidget = oivBouwlaagWidget(self) self.iface.addDockWidget(QH.getWidgetType(), bouwlaagwidget) bouwlaagwidget.canvas = self.canvas bouwlaagwidget.iface = self.iface bouwlaagwidget.bouwlaagList = self.sortedList bouwlaagwidget.teken_bouwlaag.setText(str(bouwlaag) + ' t/m ' + str(bouwlaagMax)) bouwlaagwidget.bouwlaag_min.setText(str(bouwlaag)) bouwlaagwidget.bouwlaag_max.setText(str(bouwlaagMax)) bouwlaagwidget.teken_bouwlaag.setEnabled(False) subString = "bouwlaag = " + str(bouwlaag) UG.set_layer_substring(subString) bouwlaagwidget.show() break elif bouwlaagMax < bouwlaag: MSG.showMsgBox('bouwlaagvolgorde') elif ok is False: break
def run(self): """run the plugin, if project is not OIV object, deactivate plugin when clicked on icon""" project = QC.QgsProject.instance() projectTest = str( QC.QgsExpressionContextUtils.projectScope(project).variable( 'project_title')) dbVersion = CH.get_app_version() if 'Objecten' not in projectTest: self.toolbar.setEnabled(False) self.action.setEnabled(False) elif PC.PLUGIN["compatibleDbVersion"][1] > dbVersion < PC.PLUGIN[ "compatibleDbVersion"][0]: MSG.showMsgBox('invaliddatabaseversion') self.toolbar.setEnabled(False) self.action.setEnabled(False) else: #always start from floor 1 self.basewidget = OB.oivBaseWidget() subString = "bouwlaag = 1" UG.set_layer_substring(subString) self.basewidget.oiv = self self.basewidget.iface = self.iface self.basewidget.canvas = self.canvas self.basewidget.pinTool = self.pinTool self.basewidget.pointTool = self.pointTool self.basewidget.selectTool = self.selectTool self.basewidget.identifyTool = self.identifyTool self.basewidget.drawTool = self.drawTool self.basewidget.moveTool = self.moveTool index = self.projCombo.findText('1', PQtC.Qt.MatchFixedString) if index >= 0: self.projCombo.setCurrentIndex(index) self.iface.addDockWidget(QT.getWidgetType(), self.basewidget) self.basewidget.show() self.toolbar.setEnabled(False) self.projCombo.setEnabled(False) self.checkVisibility = True
def run_import(self): """initiate import widget""" importwidget = oivImportFileWidget(self) self.iface.addDockWidget(QH.getWidgetType(), importwidget) self.close() importwidget.show()
def run_object_symbolen_tekenen(self): tekenWidget = OTW.oivObjectTekenWidget(self) self.iface.addDockWidget(QH.getWidgetType(), tekenWidget) tekenWidget.show() self.close()