예제 #1
0
 def run_bouwlagen(self, objectId):
     """start objectgegevens widget"""
     pandwidget = OPG.oivPandWidget(self, objectId)
     self.iface.addDockWidget(QT.getWidgetType(), pandwidget)
     self.iface.actionPan().trigger()
     pandwidget.show()
     self.close()
예제 #2
0
 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'))
     try:
         layer = UC.getlayer_byname('applicatie')
         request = QC.QgsFeatureRequest().setFilterExpression('"id" = 1')
         dbVersion = next(layer.getFeatures(request))["db_versie"]
     except:
         dbVersion = 0
     if 'Objecten' not in projectTest:
         self.toolbar.setEnabled(False)
         self.action.setEnabled(False)
     elif PLUGIN["compatibleDbVersion"]["max"] < dbVersion < PLUGIN[
             "compatibleDbVersion"]["min"]:
         MSG.showMsgBox('invaliddatabaseversion')
         self.toolbar.setEnabled(False)
         self.action.setEnabled(False)
     else:
         # always start from floor 1
         self.basewidget = OB.oivBaseWidget(self)
         subString = "bouwlaag = 1"
         UG.set_layer_substring(subString)
         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
예제 #3
0
 def run_new_object(self, objectId, bron, bron_tbl):
     """start new object widget, eventhough passing trough the tools to objectgegevens widget"""
     objectNieuwWidget = OON.oivObjectNieuwWidget(self, objectId, bron,
                                                  bron_tbl)
     self.iface.addDockWidget(QT.getWidgetType(), objectNieuwWidget)
     self.iface.actionPan().trigger()
     objectNieuwWidget.show()
     self.close()
예제 #4
0
 def run_object(self, formeleNaam, objectId):
     """start repressief object widget"""
     repressiefObjectWidget = ORO.oivRepressiefObjectWidget(
         self, objectId, formeleNaam)
     self.iface.addDockWidget(QT.getWidgetType(), repressiefObjectWidget)
     self.iface.actionPan().trigger()
     repressiefObjectWidget.show()
     self.close()
예제 #5
0
 def edit_attribute(self, ilayer, ifeature):
     stackWidget = SW.oivStackWidget()
     self.iface.addDockWidget(QT.getWidgetType(), stackWidget)
     stackWidget.parentWidget = self
     stackWidget.open_feature_form(ilayer, ifeature)
     self.close()
     stackWidget.show()
     self.selectTool.geomSelected.disconnect(self.edit_attribute)
예제 #6
0
 def run_edit_bouwlagen(self, ilayer, ifeature):
     """edit attribute form of floor feature"""
     stackWidget = SW.oivStackWidget()
     self.iface.addDockWidget(QT.getWidgetType(), stackWidget)
     stackWidget.update()
     stackWidget.parentWidget = self
     stackWidget.open_feature_form(ilayer, ifeature)
     self.close()
     stackWidget.show()
예제 #7
0
 def run_bouwlaag(self):
     while True:
         bouwlaag, bouwlaagMax, ok = BouwlaagDialog.getBouwlagen()
         if (bouwlaag != 0 and bouwlaagMax >= bouwlaag and ok is True):
             bouwlaagwidget = oivBouwlaagWidget(self, bouwlaag, bouwlaagMax)
             self.iface.addDockWidget(QT.getWidgetType(), bouwlaagwidget)
             subString = "bouwlaag = " + str(bouwlaag)
             UG.set_layer_substring(subString)
             bouwlaagwidget.show()
             self.close()
             break
         elif bouwlaagMax < bouwlaag:
             MSG.showMsgBox('bouwlaagvolgorde')
         elif ok is False:
             break
 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(QT.getWidgetType(), stackWidget)
     stackWidget.parentWidget = self
     stackWidget.open_feature_form(ilayer, ifeature)
     self.close()
     layerNames = PC.OBJECT["nogeotables"]
     for name in layerNames:
         layer = UC.getlayer_byname(name)
         layer.updateExtents()
     stackWidget.show()
     try:
         self.selectTool.geomSelected.disconnect(self.edit_attribute)
     except: # pylint: disable=bare-except
         pass
 def run_import(self):
     """initiate import widget"""
     importwidget = IFW.oivImportFileWidget(self)
     self.iface.addDockWidget(QT.getWidgetType(), importwidget)
     self.close()
     importwidget.show()
 def run_object_symbolen_tekenen(self):
     tekenWidget = OTW.oivObjectTekenWidget(self)
     self.iface.addDockWidget(QT.getWidgetType(), tekenWidget)
     tekenWidget.show()
     self.close()
 def run_create_grid(self):
     gridWidget = GW.oivGridWidget(self)
     gridWidget.object_id.setText(self.object_id.text())
     self.iface.addDockWidget(QT.getWidgetType(), gridWidget)
     gridWidget.show()
     self.close()
예제 #12
0
 def run_config(self):
     configWidget = OC.oivConfigWidget(self)
     self.iface.addDockWidget(QT.getWidgetType(), configWidget)
     configWidget.show()