Пример #1
0
 def run_bag_overnemen(self):
     """copy polygon of bag feature"""
     UG.set_lengte_oppervlakte_visibility(self, False, False, False, False)
     layerName = PC.PAND["bagpandlayername"]
     ilayer = UC.getlayer_byname(layerName)
     request = QC.QgsFeatureRequest().setFilterExpression(
         '"identificatie" = ' + "'{}'".format(self.objectId))
     ifeature = next(ilayer.getFeatures(request))
     self.copy_bag_bouwlaag(ilayer, ifeature)
Пример #2
0
 def run_terrein_toevoegen(self):
     objectId = self.object_id.text()
     possibleSnapFeatures = UC.get_possible_snapFeatures_object(self.snapLayerNames, objectId)
     self.drawTool.parent = self
     self.drawTool.layer = UC.getlayer_byname(PC.OBJECT["terreinlayername"])
     UG.set_lengte_oppervlakte_visibility(self, True, True, True, True)
     self.drawTool.possibleSnapFeatures = possibleSnapFeatures
     self.drawTool.canvas = self.canvas
     self.drawTool.onGeometryAdded = self.place_object_terrein
     self.drawTool.captureMode = 2
     self.canvas.setMapTool(self.drawTool)
Пример #3
0
 def initUI(self):
     """intitiate the UI elemets on the widget"""
     UG.set_lengte_oppervlakte_visibility(self, False, False, False, False)
     self.object_id.setVisible(False)
     self.move.clicked.connect(self.run_move_point)
     self.identify.clicked.connect(self.run_edit_tool)
     self.select.clicked.connect(self.run_select_tool)
     self.delete_f.clicked.connect(self.run_delete_tool)
     self.pan.clicked.connect(self.activatePan)
     self.terug.clicked.connect(self.close_object_tekenen_show_base)
     actionList, self.editableLayerNames, self.moveLayerNames = UG.get_actions(PC.OBJECT["configtable"])
     self.initActions(actionList)
Пример #4
0
 def run_bouwlaag_tekenen(self):
     """draw a floor with the basic functionality of QGIS"""
     drawTool = self.parent.drawTool
     possibleSnapFeatures = UC.get_possible_snapFeatures_bouwlaag(
         self.snapLayerNames, self.objectId)
     layer = UC.getlayer_byname(PC.PAND["bouwlaaglayername"])
     drawTool.layer = layer
     drawTool.possibleSnapFeatures = possibleSnapFeatures
     drawTool.canvas = self.canvas
     drawTool.onGeometryAdded = self.draw_feature
     drawTool.captureMode = 2
     self.canvas.setMapTool(drawTool)
     UG.set_lengte_oppervlakte_visibility(self, True, True, True, True)
     drawTool.parent = self
Пример #5
0
 def run_bouwlaag_overnemen(self):
     """copy floor from another floor"""
     UG.set_lengte_oppervlakte_visibility(self, False, False, False, False)
     self.label1.setVisible(True)
     self.label2.setVisible(True)
     self.label3.setVisible(True)
     self.bouwlaag.setVisible(True)
     for var in vars(self):
         typeVar = type(vars(self)[var])
         if typeVar == PQtW.QCheckBox:
             vars(self)[var].setVisible(True)
     #append combobox with unique existing floors
     self.bouwlagen_to_combobox()
     self.copy.setVisible(True)
     #connect signal to slot
     self.bouwlaag.currentIndexChanged.connect(
         self.set_layer_subset_bouwlaag)
     self.parent.selectTool.geomSelected.connect(self.copy_bag_bouwlaag)
Пример #6
0
 def run_tekenen(self, _dummy, runLayer, featureId):
     #welke pictogram is aangeklikt en wat is de bijbehorende tekenlaag
     self.identifier = featureId
     self.drawLayer = UC.getlayer_byname(runLayer)
     self.drawLayerType = UC.check_layer_type(self.drawLayer)
     self.parentLayerName = CH.get_parentlayer_ob(runLayer)
     objectId = self.object_id.text()
     possibleSnapFeatures = UC.get_possible_snapFeatures_object(DH.ROSNAPLAYERS, objectId)
     if self.drawLayerType == "Point":
         pointTool = self.parent.pointTool
         pointTool.snapPt = None
         pointTool.snapping = False
         pointTool.startRotate = False
         pointTool.possibleSnapFeatures = possibleSnapFeatures
         if self.identifier in DH.ROSNAPSYMBOLS:
             pointTool.snapping = True
         pointTool.layer = self.drawLayer
         self.canvas.setMapTool(pointTool)
         UG.set_lengte_oppervlakte_visibility(self, False, False, False, False)
         pointTool.onGeometryAdded = self.place_feature
     else:
         drawTool = self.parent.drawTool
         if self.drawLayerType == "LineString":
             drawTool.captureMode = 1
             UG.set_lengte_oppervlakte_visibility(self, True, True, False, True)
         else:
             drawTool.captureMode = 2
             UG.set_lengte_oppervlakte_visibility(self, True, True, True, True)
         drawTool.layer = self.drawLayer
         drawTool.possibleSnapFeatures = possibleSnapFeatures
         drawTool.canvas = self.canvas
         drawTool.onGeometryAdded = self.place_feature
         self.canvas.setMapTool(drawTool)
         drawTool.parent = self
Пример #7
0
 def __init__(self, parent):
     """initialize dockwidget and connect slots and signals"""
     super(oivBouwlaagWidget, self).__init__(parent)
     self.setupUi(self)
     self.parent = parent
     self.objectId = self.parent.pand_id.text()
     self.bouwlaag_bag.clicked.connect(self.run_bag_overnemen)
     self.bouwlaag_tekenen.clicked.connect(self.run_bouwlaag_tekenen)
     self.bouwlaag_overnemen.clicked.connect(self.run_bouwlaag_overnemen)
     self.terug.clicked.connect(self.close_bouwlaag)
     self.copy.clicked.connect(self.run_select_bouwlaag)
     self.label1.setVisible(False)
     self.label2.setVisible(False)
     self.label3.setVisible(False)
     UG.set_lengte_oppervlakte_visibility(self, False, False, False, False)
     self.bouwlaag_max.setVisible(False)
     self.bouwlaag.setVisible(False)
     self.copy.setVisible(False)
     for var in vars(self):
         typeVar = type(vars(self)[var])
         if typeVar == PQtW.QCheckBox:
             vars(self)[var].setVisible(False)
Пример #8
0
 def __init__(self, parent=None):
     super(oivRepressiefObjectWidget, self).__init__(parent)
     self.setupUi(self)
     self.iface = QU.iface
     self.object_id.setVisible(False)
     UG.set_lengte_oppervlakte_visibility(self, False, False, False, False)