当前位置: 首页>>代码示例>>Python>>正文


Python QadHighlight.hide方法代码示例

本文整理汇总了Python中qad_highlight.QadHighlight.hide方法的典型用法代码示例。如果您正苦于以下问题:Python QadHighlight.hide方法的具体用法?Python QadHighlight.hide怎么用?Python QadHighlight.hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在qad_highlight.QadHighlight的用法示例。


在下文中一共展示了QadHighlight.hide方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Qad_pedit_maptool

# 需要导入模块: from qad_highlight import QadHighlight [as 别名]
# 或者: from qad_highlight.QadHighlight import hide [as 别名]
class Qad_pedit_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)

      self.firstPt = None
      self.mode = None
                       
      self.layer = None
      self.linearObjectList = qad_utils.QadLinearObjectList()
      self.tolerance2ApproxCurve = None
      self.vertexAt = 0
      self.vertexPt = None
      self.after = True 
      self.basePt = None
      self.__highlight = QadHighlight(self.canvas)


   def hidePointMapToolMarkers(self):
      QadGetPoint.hidePointMapToolMarkers(self)
      self.__highlight.hide()

   def showPointMapToolMarkers(self):
      QadGetPoint.showPointMapToolMarkers(self)
      self.__highlight.show()
                             
   def clear(self):
      QadGetPoint.clear(self)
      self.__highlight.reset()
      self.mode = None
      if self.basePt is not None:
         del(self.basePt)
         self.basePt = None

   def setLinearObjectList(self, linearObjectList, layer):
      self.linearObjectList.set(linearObjectList)
      self.layer = layer
      self.tolerance2ApproxCurve = QadVariables.get(QadMsg.translate("Environment variables", "TOLERANCE2APPROXCURVE"))


   def setVertexAt(self, vertexAt, after = None):
      if vertexAt == self.linearObjectList.qty():
         self.firstPt = self.linearObjectList.getLinearObjectAt(-1).getEndPt()
      else:
         self.firstPt = self.linearObjectList.getLinearObjectAt(vertexAt).getStartPt()
      
      self.vertexPt = QgsPoint(self.firstPt)
      self.vertexAt = vertexAt
      self.after = after      
    
      
   def canvasMoveEvent(self, event):
      QadGetPoint.canvasMoveEvent(self, event)
      
      self.__highlight.reset()
      tmpLinearObjectList = None           
       
      # si richiede un nuovo vertice da inserire
      if self.mode == Qad_pedit_maptool_ModeEnum.ASK_FOR_NEW_VERTEX:
         if self.basePt is not None:
            offSetX = self.tmpPoint.x() - self.basePt.x()
            offSetY = self.tmpPoint.y() - self.basePt.y()
            newPt = QgsPoint(self.vertexPt.x() + offSetX, self.vertexPt.y() + offSetY)
         else:
            newPt = QgsPoint(self.tmpPoint)
            
         tmpLinearObjectList = qad_utils.QadLinearObjectList()
         tmpLinearObjectList.set(self.linearObjectList)
         if self.after: # dopo
            if self.vertexAt == tmpLinearObjectList.qty() and tmpLinearObjectList.isClosed():
               tmpLinearObjectList.insertPoint(0, newPt)
            else:
               tmpLinearObjectList.insertPoint(self.vertexAt, newPt)
         else: # prima
            if self.vertexAt == 0 and tmpLinearObjectList.isClosed():
               tmpLinearObjectList.insertPoint(tmpLinearObjectList.qty() - 1, newPt)
            else:
               tmpLinearObjectList.insertPoint(self.vertexAt - 1, newPt)
      elif self.mode == Qad_pedit_maptool_ModeEnum.ASK_FOR_MOVE_VERTEX:
         newPt = QgsPoint(self.tmpPoint)
         tmpLinearObjectList = qad_utils.QadLinearObjectList()
         tmpLinearObjectList.set(self.linearObjectList)         
         tmpLinearObjectList.movePoint(self.vertexAt, newPt)
      
      if tmpLinearObjectList is not None:
         pts = tmpLinearObjectList.asPolyline(self.tolerance2ApproxCurve) 
         if self.layer.geometryType() == QGis.Polygon:
            geom = QgsGeometry.fromPolygon([pts])
         else:
            geom = QgsGeometry.fromPolyline(pts)
            
         # trasformo la geometria nel crs del layer
         self.__highlight.addGeometry(self.mapToLayerCoordinates(self.layer, geom), self.layer)
      
    
   def activate(self):
      QadGetPoint.activate(self)
      self.__highlight.show()          

   def deactivate(self):
#.........这里部分代码省略.........
开发者ID:resistor4u,项目名称:QAD,代码行数:103,代码来源:qad_pedit_maptool.py

示例2: Qad_scale_maptool

# 需要导入模块: from qad_highlight import QadHighlight [as 别名]
# 或者: from qad_highlight.QadHighlight import hide [as 别名]
class Qad_scale_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)
                        
      self.basePt = None
      self.Pt1ReferenceLen = None
      self.ReferenceLen = 0
      self.Pt1NewLen = None
      self.entitySet = QadEntitySet()
      self.__highlight = QadHighlight(self.canvas)

   def hidePointMapToolMarkers(self):
      QadGetPoint.hidePointMapToolMarkers(self)
      self.__highlight.hide()

   def showPointMapToolMarkers(self):
      QadGetPoint.showPointMapToolMarkers(self)
      self.__highlight.show()
                             
   def clear(self):
      QadGetPoint.clear(self)
      self.__highlight.reset()
      self.mode = None    


   #============================================================================
   # scale
   #============================================================================
   def scale(self, f, basePt, scale, layerEntitySet, entitySet):
      # verifico se l'entità appartiene ad uno stile di quotatura
      dimEntity = QadDimStyles.getDimEntity(layerEntitySet.layer, f.id())
           
      if dimEntity is None:
         # scalo la feature e la rimuovo da entitySet (é la prima)
         f.setGeometry(qad_utils.scaleQgsGeometry(f.geometry(), basePt, scale))
         self.__highlight.addGeometry(f.geometry(), layerEntitySet.layer)
         del layerEntitySet.featureIds[0]
      else:
         # scalo la quota e la rimuovo da entitySet
         dimEntitySet = dimEntity.getEntitySet()
         dimEntity.scale(basePt, scale)
         self.__highlight.addGeometry(dimEntity.textualFeature.geometry(), dimEntity.getTextualLayer())
         self.__highlight.addGeometries(dimEntity.getLinearGeometryCollection(), dimEntity.getLinearLayer())
         self.__highlight.addGeometries(dimEntity.getSymbolGeometryCollection(), dimEntity.getSymbolLayer())
         entitySet.subtract(dimEntitySet)

   
   #============================================================================
   # addScaledGeometries
   #============================================================================
   def addScaledGeometries(self, scale):
      self.__highlight.reset()
      
      # copio entitySet
      entitySet = QadEntitySet(self.entitySet)
      
      if scale <= 0:
         return
      
      for layerEntitySet in entitySet.layerEntitySetList:
         layer = layerEntitySet.layer

         transformedBasePt = self.canvas.mapSettings().mapToLayerCoordinates(layer, self.basePt)

         while len(layerEntitySet.featureIds) > 0:
            featureId = layerEntitySet.featureIds[0]
            f = layerEntitySet.getFeature(featureId)        
            self.scale(f, transformedBasePt, scale, layerEntitySet, entitySet)
            
      
   def canvasMoveEvent(self, event):
      QadGetPoint.canvasMoveEvent(self, event)
                     
      # noto il punto base si richiede il secondo punto per la scala
      if self.mode == Qad_scale_maptool_ModeEnum.BASE_PT_KNOWN_ASK_FOR_SCALE_PT:
         scale = qad_utils.getDistance(self.basePt, self.tmpPoint)
         self.addScaledGeometries(scale)                           
      # noto il primo punto si richiede il secondo punto per la lunghezza di riferimento
      elif self.mode == Qad_scale_maptool_ModeEnum.BASE_PT_KNOWN_ASK_FOR_NEW_LEN_PT:
         len = qad_utils.getDistance(self.basePt, self.tmpPoint)
         scale = len / self.ReferenceLen
         self.addScaledGeometries(scale)                           
      # noto il primo punto si richiede il secondo punto per la nuova lunghezza
      elif self.mode == Qad_scale_maptool_ModeEnum.FIRST_PT_KNOWN_ASK_FOR_SECOND_NEW_LEN_PT:
         len = qad_utils.getDistance(self.Pt1NewLen, self.tmpPoint)
         scale = len / self.ReferenceLen
         self.addScaledGeometries(scale)                           
         
    
   def activate(self):
      QadGetPoint.activate(self)            
      self.__highlight.show()          

   def deactivate(self):
      try: # necessario perché se si chiude QGIS parte questo evento nonostante non ci sia più l'oggetto maptool !
         QadGetPoint.deactivate(self)
         self.__highlight.hide()
      except:
         pass
#.........这里部分代码省略.........
开发者ID:gam17,项目名称:QAD,代码行数:103,代码来源:qad_scale_maptool.py

示例3: Qad_gripLineToArcConvert_maptool

# 需要导入模块: from qad_highlight import QadHighlight [as 别名]
# 或者: from qad_highlight.QadHighlight import hide [as 别名]
class Qad_gripLineToArcConvert_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)

      self.firstPt = None
      self.mode = None
                       
      self.layer = None 
      self.linearObjectList = qad_utils.QadLinearObjectList()
      self.linearObject = None
      self.startPt = None
      self.endPt = None
      self.tolerance2ApproxCurve = None
      self.__highlight = QadHighlight(self.canvas)


   def hidePointMapToolMarkers(self):
      QadGetPoint.hidePointMapToolMarkers(self)
      self.__highlight.hide()

   def showPointMapToolMarkers(self):
      QadGetPoint.showPointMapToolMarkers(self)
      self.__highlight.show()
                             
   def clear(self):
      QadGetPoint.clear(self)
      self.__highlight.reset()
      self.mode = None

   def setLinearObjectList(self, linearObjectList, layer, partAt):
      self.linearObjectList.set(linearObjectList)
      self.layer = layer
      self.tolerance2ApproxCurve = QadVariables.get(QadMsg.translate("Environment variables", "TOLERANCE2APPROXCURVE"))                            
      self.linearObject = self.linearObjectList.getLinearObjectAt(partAt)
      self.firstPt = self.linearObject.getMiddlePt()
      self.startPt = self.linearObject.getStartPt()
      self.endPt = self.linearObject.getEndPt()
    
      
   def canvasMoveEvent(self, event):
      QadGetPoint.canvasMoveEvent(self, event)
      
      self.__highlight.reset()
      ok = False
       
      # noti il punto iniziale e finale dell'arco si richiede il punto intermedio
      if self.mode == Qad_gripLineToArcConvert_maptool_ModeEnum.START_END_PT_KNOWN_ASK_FOR_SECOND_PT:
         if self.linearObject is None:
            return
         arc = QadArc()
         if arc.fromStartSecondEndPts(self.startPt, self.tmpPoint, self.endPt) == False:
            return
         if qad_utils.ptNear(self.startPt, arc.getStartPt()):
            self.linearObject.setArc(arc, False) # arco non inverso
         else:
            self.linearObject.setArc(arc, True) # arco inverso
         ok = True
      
      if ok:
         pts = self.linearObjectList.asPolyline(self.tolerance2ApproxCurve)
         if self.layer.geometryType() == QGis.Polygon:
            geom = QgsGeometry.fromPolygon([pts])
         else:
            geom = QgsGeometry.fromPolyline(pts)
         # trasformo la geometria nel crs del layer
         self.__highlight.addGeometry(self.mapToLayerCoordinates(self.layer, geom), self.layer)
      
    
   def activate(self):
      QadGetPoint.activate(self)            
      self.__highlight.show()

   def deactivate(self):
      try: # necessario perché se si chiude QGIS parte questo evento nonostante non ci sia più l'oggetto maptool !
         QadGetPoint.deactivate(self)
         self.__highlight.hide()
      except:
         pass

   def setMode(self, mode):
      self.mode = mode
            
      # noti il punto iniziale e finale dell'arco si richiede il punto intermedio
      if self.mode == Qad_gripLineToArcConvert_maptool_ModeEnum.START_END_PT_KNOWN_ASK_FOR_SECOND_PT:
         self.setSelectionMode(QadGetPointSelectionModeEnum.POINT_SELECTION)   
         self.setDrawMode(QadGetPointDrawModeEnum.ELASTIC_LINE)
         self.setStartPoint(self.firstPt)
      # non si richiede niente
      elif self.mode == Qad_pedit_maptool_ModeEnum.NONE:
         self.setSelectionMode(QadGetPointSelectionModeEnum.POINT_SELECTION)   
         self.setDrawMode(QadGetPointDrawModeEnum.NONE)
开发者ID:resistor4u,项目名称:QAD,代码行数:94,代码来源:qad_pedit_maptool.py

示例4: Qad_gripChangeArcRadius_maptool

# 需要导入模块: from qad_highlight import QadHighlight [as 别名]
# 或者: from qad_highlight.QadHighlight import hide [as 别名]
class Qad_gripChangeArcRadius_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)
                        
      self.basePt = None
      self.entity = None
      self.arc = None 
      self.coordTransform = None
      self.__highlight = QadHighlight(self.canvas)

   def hidePointMapToolMarkers(self):
      QadGetPoint.hidePointMapToolMarkers(self)
      self.__highlight.hide()

   def showPointMapToolMarkers(self):
      QadGetPoint.showPointMapToolMarkers(self)
      self.__highlight.show()
                             
   def clear(self):
      QadGetPoint.clear(self)
      self.__highlight.reset()
      self.mode = None

   def setEntity(self, entity):
      self.entity = QadEntity(entity)
      self.arc = self.entity.getQadGeom() # arco in map coordinate
      self.basePt = self.arc.center
      self.coordTransform = QgsCoordinateTransform(self.canvas.mapRenderer().destinationCrs(), entity.layer.crs())


   #============================================================================
   # stretch
   #============================================================================
   def changeRadius(self, radius):
      self.__highlight.reset()
      # radius = nuovo raggio dell'arco
      # tolerance2ApproxCurve = tolleranza per ricreare le curve
      self.arc.radius = radius
      points = self.arc.asPolyline()
      if points is None:
         return False
      
      g = QgsGeometry.fromPolyline(points)
      # trasformo la geometria nel crs del layer
      g.transform(self.coordTransform)      
      self.__highlight.addGeometry(g, self.entity.layer)
            
      
   def canvasMoveEvent(self, event):
      QadGetPoint.canvasMoveEvent(self, event)

      # noto il punto base si richiede il secondo punto per il raggio
      if self.mode == Qad_gripChangeArcRadius_maptool_ModeEnum.BASE_PT_KNOWN_ASK_FOR_RADIUS_PT:
         radius = qad_utils.getDistance(self.basePt, self.tmpPoint)
         self.changeRadius(radius)                           
         
    
   def activate(self):
      QadGetPoint.activate(self)            
      self.__highlight.show()

   def deactivate(self):
      try: # necessario perché se si chiude QGIS parte questo evento nonostante non ci sia più l'oggetto maptool !
         QadGetPoint.deactivate(self)
         self.__highlight.hide()
      except:
         pass
      
      
   def setMode(self, mode):
      self.mode = mode
      # noto niente si richiede il punto base
      if self.mode == Qad_gripChangeArcRadius_maptool_ModeEnum.ASK_FOR_BASE_PT:
         self.clear()
         self.setDrawMode(QadGetPointDrawModeEnum.NONE)
         self.__highlight.reset()
      # noto il punto base si richiede il secondo punto per il raggio
      elif self.mode == Qad_gripChangeArcRadius_maptool_ModeEnum.BASE_PT_KNOWN_ASK_FOR_RADIUS_PT:
         self.setDrawMode(QadGetPointDrawModeEnum.ELASTIC_LINE)
         self.setStartPoint(self.basePt)
开发者ID:lao-tseu-is-alive,项目名称:QAD,代码行数:83,代码来源:qad_arc_maptool.py

示例5: Qad_mirror_maptool

# 需要导入模块: from qad_highlight import QadHighlight [as 别名]
# 或者: from qad_highlight.QadHighlight import hide [as 别名]
class Qad_mirror_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)
                        
      self.firstMirrorPt = None
      self.entitySet = QadEntitySet()
      self.__highlight = QadHighlight(self.canvas)

   def hidePointMapToolMarkers(self):
      QadGetPoint.hidePointMapToolMarkers(self)
      self.__highlight.hide()

   def showPointMapToolMarkers(self):
      QadGetPoint.showPointMapToolMarkers(self)
      self.__highlight.show()
                             
   def clear(self):
      QadGetPoint.clear(self)
      self.__highlight.reset()
      self.mode = None    
   

   #============================================================================
   # mirror
   #============================================================================
   def mirror(self, f, pt1, pt2, layerEntitySet, entitySet):
      # verifico se la feature appartiene ad una quotatura
      dimEntity = QadDimStyles.getDimEntity(layerEntitySet.layer, f.id())
      
      if dimEntity is None:
         # specchio la feature e la rimuovo da entitySet (é la prima)
         f.setGeometry(qad_utils.mirrorQgsGeometry(f.geometry(), pt1, pt2))
         self.__highlight.addGeometry(f.geometry(), layerEntitySet.layer)
         del layerEntitySet.featureIds[0]
      else:
         # specchio la quota e la rimuovo da entitySet
         dimEntitySet = dimEntity.getEntitySet()         
         dimEntity.mirror(pt1, qad_utils.getAngleBy2Pts(pt1, pt2))
         self.__highlight.addGeometry(dimEntity.textualFeature.geometry(), dimEntity.getTextualLayer())
         self.__highlight.addGeometries(dimEntity.getLinearGeometryCollection(), dimEntity.getLinearLayer())
         self.__highlight.addGeometries(dimEntity.getSymbolGeometryCollection(), dimEntity.getSymbolLayer())
         entitySet.subtract(dimEntitySet)
   
   
   def setMirroredGeometries(self, newPt):
      self.__highlight.reset()

      # copio entitySet
      entitySet = QadEntitySet(self.entitySet)
                
      for layerEntitySet in entitySet.layerEntitySetList:
         layer = layerEntitySet.layer

         transformedFirstMirrorPt = self.canvas.mapSettings().mapToLayerCoordinates(layer, self.firstMirrorPt)
         transformedNewPtMirrorPt = self.canvas.mapSettings().mapToLayerCoordinates(layer, newPt)

         while len(layerEntitySet.featureIds) > 0:
            featureId = layerEntitySet.featureIds[0]
            f = layerEntitySet.getFeature(featureId)
            self.mirror(f, transformedFirstMirrorPt, transformedNewPtMirrorPt, layerEntitySet, entitySet)
                     
      
   def canvasMoveEvent(self, event):
      QadGetPoint.canvasMoveEvent(self, event)
                     
      # noto il primo punto si richiede il secondo punto della linea speculare
      if self.mode == Qad_mirror_maptool_ModeEnum.FIRST_PT_KNOWN_ASK_FOR_SECOND_PT:
         self.setMirroredGeometries(self.tmpPoint)                           
         
    
   def activate(self):
      QadGetPoint.activate(self)  
      self.__highlight.show()          

   def deactivate(self):
      try: # necessario perché se si chiude QGIS parte questo evento nonostante non ci sia più l'oggetto maptool !
         QadGetPoint.deactivate(self)
         self.__highlight.hide()
      except:
         pass

   def setMode(self, mode):
      self.mode = mode
      # noto niente si richiede il primo punto della linea speculare
      if self.mode == Qad_mirror_maptool_ModeEnum.NONE_KNOWN_ASK_FOR_FIRST_PT:
         self.setDrawMode(QadGetPointDrawModeEnum.NONE)
         self.__highlight.reset()
      # noto il primo punto si richiede il secondo punto della linea speculare
      elif self.mode == Qad_mirror_maptool_ModeEnum.FIRST_PT_KNOWN_ASK_FOR_SECOND_PT:
         self.setDrawMode(QadGetPointDrawModeEnum.ELASTIC_LINE)
         self.setStartPoint(self.firstMirrorPt)
开发者ID:gam17,项目名称:QAD,代码行数:94,代码来源:qad_mirror_maptool.py

示例6: Qad_move_maptool

# 需要导入模块: from qad_highlight import QadHighlight [as 别名]
# 或者: from qad_highlight.QadHighlight import hide [as 别名]
class Qad_move_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)
                        
      self.basePt = None
      self.entitySet = QadEntitySet()
      self.__highlight = QadHighlight(self.canvas)

   def hidePointMapToolMarkers(self):
      QadGetPoint.hidePointMapToolMarkers(self)
      self.__highlight.hide()

   def showPointMapToolMarkers(self):
      QadGetPoint.showPointMapToolMarkers(self)
      self.__highlight.show()
                             
   def clear(self):
      QadGetPoint.clear(self)
      self.__highlight.reset()
      self.mode = None    

   
   #============================================================================
   # move
   #============================================================================
   def move(self, entity, offSetX, offSetY):
      # verifico se l'entità appartiene ad uno stile di quotatura
      if entity.whatIs() == "ENTITY":
         # sposto l'entità
         movedGeom = qad_utils.moveQgsGeometry(entity.getGeometry(), offSetX, offSetY)
         if movedGeom is not None:
            self.__highlight.addGeometry(movedGeom, entity.layer)
      else:
         # sposto la quota
         entity.move(offSetX, offSetY)
         self.__highlight.addGeometry(entity.textualFeature.geometry(), entity.getTextualLayer())
         self.__highlight.addGeometries(entity.getLinearGeometryCollection(), entity.getLinearLayer())
         self.__highlight.addGeometries(entity.getSymbolGeometryCollection(), entity.getSymbolLayer())

   
   def addMovedGeometries(self, newPt):
      self.__highlight.reset()            

      dimElaboratedList = [] # lista delle quotature già elaborate
      entity = QadEntity()
      
      for layerEntitySet in self.entitySet.layerEntitySetList:
         layer = layerEntitySet.layer
         
         transformedBasePt = self.canvas.mapRenderer().mapToLayerCoordinates(layer, self.basePt)
         transformedNewPt = self.canvas.mapRenderer().mapToLayerCoordinates(layer, newPt)
         offSetX = transformedNewPt.x() - transformedBasePt.x()
         offSetY = transformedNewPt.y() - transformedBasePt.y()

         for featureId in layerEntitySet.featureIds:
            # verifico se l'entità appartiene ad uno stile di quotatura
            dimEntity = QadDimStyles.getDimEntity(layer, featureId)  
            if dimEntity is None:
               entity.set(layer, featureId)
               f = layerEntitySet.getFeature(featureId)
               self.move(entity, offSetX, offSetY)
            else:            
               found = False
               for dimElaborated in dimElaboratedList:
                  if dimElaborated == dimEntity:
                     found = True
               if found == False: # quota non ancora elaborata
                  dimElaboratedList.append(dimEntity)
                  self.stretch(dimEntity, offSetX, offSetY)


   def canvasMoveEvent(self, event):
      QadGetPoint.canvasMoveEvent(self, event)
                     
      # noto il punto base si richiede il secondo punto
      if self.mode == Qad_move_maptool_ModeEnum.BASE_PT_KNOWN_ASK_FOR_MOVE_PT:
         self.addMovedGeometries(self.tmpPoint)                           
         
    
   def activate(self):
      QadGetPoint.activate(self)            
      self.__highlight.show()          

   def deactivate(self):
      try: # necessario perché se si chiude QGIS parte questo evento nonostante non ci sia più l'oggetto maptool !
         QadGetPoint.deactivate(self)
         self.__highlight.hide()
      except:
         pass

   def setMode(self, mode):
      self.mode = mode
      # noto niente si richiede il punto base
      if self.mode == Qad_move_maptool_ModeEnum.NONE_KNOWN_ASK_FOR_BASE_PT:
         self.setSelectionMode(QadGetPointSelectionModeEnum.POINT_SELECTION)
         self.setDrawMode(QadGetPointDrawModeEnum.NONE)
         self.__highlight.reset()
      # noto il punto base si richiede il secondo punto
      elif self.mode == Qad_move_maptool_ModeEnum.BASE_PT_KNOWN_ASK_FOR_MOVE_PT:
#.........这里部分代码省略.........
开发者ID:lao-tseu-is-alive,项目名称:QAD,代码行数:103,代码来源:qad_move_maptool.py

示例7: Qad_offset_maptool

# 需要导入模块: from qad_highlight import QadHighlight [as 别名]
# 或者: from qad_highlight.QadHighlight import hide [as 别名]
class Qad_offset_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)
                        
      self.firstPt = None
      self.layer = None
      self.subGeom = None
      self.offSet = 0
      self.lastOffSetOnLeftSide = 0
      self.lastOffSetOnRightSide = 0
      self.gapType = 0     
      self.__highlight = QadHighlight(self.canvas)

   def hidePointMapToolMarkers(self):
      QadGetPoint.hidePointMapToolMarkers(self)
      self.__highlight.hide()

   def showPointMapToolMarkers(self):
      QadGetPoint.showPointMapToolMarkers(self)
      self.__highlight.show()
                             
   def clear(self):
      QadGetPoint.clear(self)
      self.__highlight.reset()
      self.mode = None    
   
   def addOffSetGeometries(self, newPt):
      self.__highlight.reset()            
      
      # ritorna una tupla (<The squared cartesian distance>,
      #                    <minDistPoint>
      #                    <afterVertex>
      #                    <leftOf>)
      dummy = qad_utils.closestSegmentWithContext(newPt, self.subGeom)
      if self.offSet < 0:
         afterVertex = dummy[2]
         pt = qad_utils.getPerpendicularPointOnInfinityLine(self.subGeom.vertexAt(afterVertex - 1), \
                                                            self.subGeom.vertexAt(afterVertex), \
                                                            newPt)
         offSetDistance = qad_utils.getDistance(newPt, pt)
      else:           
         offSetDistance = self.offSet

         if dummy[3] < 0: # alla sinistra
            offSetDistance = offSetDistance + self.lastOffSetOnLeftSide
         else: # alla destra
            offSetDistance = offSetDistance + self.lastOffSetOnRightSide         
      
      tolerance2ApproxCurve = QadVariables.get(QadMsg.translate("Environment variables", "TOLERANCE2APPROXCURVE"))
      # uso il crs del canvas per lavorare con coordinate piane xy
      epsg = self.canvas.mapSettings().destinationCrs().authid()
      lines = qad_utils.offSetPolyline(self.subGeom.asPolyline(), epsg, \
                                       offSetDistance, \
                                       "left" if dummy[3] < 0 else "right", \
                                       self.gapType, \
                                       tolerance2ApproxCurve)

      for line in lines:
         if self.layer.geometryType() == QGis.Polygon:
            if line[0] == line[-1]: # se é una linea chiusa
               offsetGeom = QgsGeometry.fromPolygon([line])
            else:
               offsetGeom = QgsGeometry.fromPolyline(line)
         else:
            offsetGeom = QgsGeometry.fromPolyline(line)

         self.__highlight.addGeometry(self.mapToLayerCoordinates(self.layer, offsetGeom), self.layer)
            
      
   def canvasMoveEvent(self, event):
      QadGetPoint.canvasMoveEvent(self, event)
      
      # nota la distanza di offset si richiede il punto per stabilire da che parte
      if self.mode == Qad_offset_maptool_ModeEnum.OFFSET_KNOWN_ASK_FOR_SIDE_PT:
         self.addOffSetGeometries(self.tmpPoint)                           
      # si richiede il punto di passaggio per stabilire da che parte e a quale offset
      elif self.mode == Qad_offset_maptool_ModeEnum.ASK_FOR_PASSAGE_PT:
         self.addOffSetGeometries(self.tmpPoint)                           
         
    
   def activate(self):
      QadGetPoint.activate(self)            
      self.__highlight.show()          

   def deactivate(self):
      try: # necessario perché se si chiude QGIS parte questo evento nonostante non ci sia più l'oggetto maptool !
         QadGetPoint.deactivate(self)
         self.__highlight.hide()
      except:
         pass

   def setMode(self, mode):
      self.clear()
      self.mode = mode
      # si richiede il primo punto per calcolo offset
      if self.mode == Qad_offset_maptool_ModeEnum.ASK_FOR_FIRST_OFFSET_PT:
         self.setSelectionMode(QadGetPointSelectionModeEnum.POINT_SELECTION)
         self.setDrawMode(QadGetPointDrawModeEnum.NONE)
         self.onlyEditableLayers = False
#.........这里部分代码省略.........
开发者ID:gam17,项目名称:QAD,代码行数:103,代码来源:qad_offset_maptool.py

示例8: Qad_copy_maptool

# 需要导入模块: from qad_highlight import QadHighlight [as 别名]
# 或者: from qad_highlight.QadHighlight import hide [as 别名]
class Qad_copy_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)
                        
      self.basePt = None
      self.entitySet = QadEntitySet()
      self.seriesLen = 0
      self.adjust = False
      self.__highlight = QadHighlight(self.canvas)

   def hidePointMapToolMarkers(self):
      QadGetPoint.hidePointMapToolMarkers(self)
      self.__highlight.hide()

   def showPointMapToolMarkers(self):
      QadGetPoint.showPointMapToolMarkers(self)
      self.__highlight.show()
                             
   def clear(self):
      QadGetPoint.clear(self)
      self.__highlight.reset()
      self.mode = None    

   
   #============================================================================
   # move
   #============================================================================
   def move(self, f, offSetX, offSetY, layerEntitySet, entitySet, dimEntity):
      if dimEntity is None:
         # sposto la feature 
         f.setGeometry(qad_utils.moveQgsGeometry(f.geometry(), offSetX, offSetY))
         self.__highlight.addGeometry(f.geometry(), layerEntitySet.layer)
      else:
         # sposto la quota
         dimEntity.move(offSetX, offSetY)
         self.__highlight.addGeometry(dimEntity.textualFeature.geometry(), dimEntity.getTextualLayer())
         self.__highlight.addGeometries(dimEntity.getLinearGeometryCollection(), dimEntity.getLinearLayer())
         self.__highlight.addGeometries(dimEntity.getSymbolGeometryCollection(), dimEntity.getSymbolLayer())
   
   
   def setCopiedGeometries(self, newPt):
      self.__highlight.reset()            
      
      # copio entitySet
      entitySet = QadEntitySet(self.entitySet)
      
      for layerEntitySet in entitySet.layerEntitySetList:
         layer = layerEntitySet.layer

         transformedBasePt = self.canvas.mapRenderer().mapToLayerCoordinates(layer, self.basePt)
         transformedNewPt = self.canvas.mapRenderer().mapToLayerCoordinates(layer, newPt)
         offSetX = transformedNewPt.x() - transformedBasePt.x()
         offSetY = transformedNewPt.y() - transformedBasePt.y()
         entity = QadEntity()

         while len(layerEntitySet.featureIds) > 0:
            featureId = layerEntitySet.featureIds[0]
            f = layerEntitySet.getFeature(featureId)
            if f is None:
               del layerEntitySet.featureIds[0]
               continue

            # verifico se l'entità appartiene ad uno stile di quotatura
            dimEntity = QadDimStyles.getDimEntity(layer, f.id())

            if self.seriesLen > 0: # devo fare una serie              
               if self.adjust == True:
                  offSetX = offSetX / (self.seriesLen - 1)
                  offSetY = offSetY / (self.seriesLen - 1)
   
               deltaX = offSetX
               deltaY = offSetY
                  
               for i in xrange(1, self.seriesLen, 1):
                  self.move(f, deltaX, deltaY, layerEntitySet, entitySet, dimEntity)
                  deltaX = deltaX + offSetX
                  deltaY = deltaY + offSetY     
            else:
               self.move(f, offSetX, offSetY, layerEntitySet, entitySet, dimEntity)
            
            # la rimuovo da entitySet
            if dimEntity is None:
               del layerEntitySet.featureIds[0]
            else:
               dimEntitySet = dimEntity.getEntitySet()
               entitySet.subtract(dimEntitySet)
      
   def canvasMoveEvent(self, event):
      QadGetPoint.canvasMoveEvent(self, event)
      
      # noto il punto base si richiede il secondo punto
      if self.mode == Qad_copy_maptool_ModeEnum.BASE_PT_KNOWN_ASK_FOR_COPY_PT:
         self.setCopiedGeometries(self.tmpPoint)                           
         
    
   def activate(self):
      QadGetPoint.activate(self)            
      self.__highlight.show()          

#.........这里部分代码省略.........
开发者ID:lao-tseu-is-alive,项目名称:QAD,代码行数:103,代码来源:qad_copy_maptool.py

示例9: Qad_rotate_maptool

# 需要导入模块: from qad_highlight import QadHighlight [as 别名]
# 或者: from qad_highlight.QadHighlight import hide [as 别名]
class Qad_rotate_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)
                        
      self.basePt = None
      self.Pt1ReferenceAng = None
      self.ReferenceAng = 0
      self.Pt1NewAng = None
      self.entitySet = QadEntitySet()
      self.__highlight = QadHighlight(self.canvas)

   def hidePointMapToolMarkers(self):
      QadGetPoint.hidePointMapToolMarkers(self)
      self.__highlight.hide()

   def showPointMapToolMarkers(self):
      QadGetPoint.showPointMapToolMarkers(self)
      self.__highlight.show()
                             
   def clear(self):
      QadGetPoint.clear(self)
      self.__highlight.reset()
      self.mode = None    
   
   
   #============================================================================
   # rotate
   #============================================================================
   def rotate(self, entity, basePt, angle):
      # verifico se l'entità appartiene ad uno stile di quotatura
      if entity.whatIs() == "ENTITY":
         # ruoto l'entità
         rotatedGeom = qad_utils.rotateQgsGeometry(entity.getGeometry(), basePt, angle)
         if rotatedGeom is not None:
            self.__highlight.addGeometry(rotatedGeom, entity.layer)
      else:
         # ruoto la quota
         entity.rotate(basePt, angle)
         self.__highlight.addGeometry(entity.textualFeature.geometry(), entity.getTextualLayer())
         self.__highlight.addGeometries(entity.getLinearGeometryCollection(), entity.getLinearLayer())
         self.__highlight.addGeometries(entity.getSymbolGeometryCollection(), entity.getSymbolLayer())
   
   
   #============================================================================
   # addRotatedGeometries
   #============================================================================
   def addRotatedGeometries(self, angle):
      self.__highlight.reset()            
      
      dimElaboratedList = [] # lista delle quotature già elaborate
      entity = QadEntity()
      
      for layerEntitySet in self.entitySet.layerEntitySetList:
         layer = layerEntitySet.layer
         
         transformedBasePt = self.canvas.mapSettings().mapToLayerCoordinates(layer, self.basePt)

         for featureId in layerEntitySet.featureIds:
            # verifico se l'entità appartiene ad uno stile di quotatura
            dimEntity = QadDimStyles.getDimEntity(layer, featureId)  
            if dimEntity is None:
               entity.set(layer, featureId)
               self.rotate(entity, transformedBasePt, angle)
            else:            
               found = False
               for dimElaborated in dimElaboratedList:
                  if dimElaborated == dimEntity:
                     found = True
               if found == False: # quota non ancora elaborata
                  dimElaboratedList.append(dimEntity)
                  self.rotate(dimEntity, transformedBasePt, angle)


   def canvasMoveEvent(self, event):
      QadGetPoint.canvasMoveEvent(self, event)
                     
      # noto il punto base si richiede il secondo punto per l'angolo di rotazione
      if self.mode == Qad_rotate_maptool_ModeEnum.BASE_PT_KNOWN_ASK_FOR_ROTATION_PT:
         angle = qad_utils.getAngleBy2Pts(self.basePt, self.tmpPoint)
         self.addRotatedGeometries(angle)                           
      # noto il punto base si richiede il secondo punto per il nuovo angolo
      elif self.mode == Qad_rotate_maptool_ModeEnum.BASE_PT_KNOWN_ASK_FOR_NEW_ROTATION_PT:
         angle = qad_utils.getAngleBy2Pts(self.basePt, self.tmpPoint)
         diffAngle = angle - self.ReferenceAng
         self.addRotatedGeometries(diffAngle)                           
      # noto il primo punto si richiede il secondo punto per il nuovo angolo
      elif self.mode == Qad_rotate_maptool_ModeEnum.FIRST_PT_KNOWN_ASK_FOR_SECOND_NEW_ROTATION_PT:
         angle = qad_utils.getAngleBy2Pts(self.Pt1NewAng, self.tmpPoint)
         diffAngle = angle - self.ReferenceAng
         self.addRotatedGeometries(diffAngle)                           
         
    
   def activate(self):
      QadGetPoint.activate(self)            
      self.__highlight.show()          

   def deactivate(self):
      try: # necessario perché se si chiude QGIS parte questo evento nonostante non ci sia più l'oggetto maptool !
         QadGetPoint.deactivate(self)
#.........这里部分代码省略.........
开发者ID:geosim,项目名称:QAD,代码行数:103,代码来源:qad_rotate_maptool.py

示例10: Qad_array_maptool

# 需要导入模块: from qad_highlight import QadHighlight [as 别名]
# 或者: from qad_highlight.QadHighlight import hide [as 别名]
class Qad_array_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)
                        
      self.entitySet = None
      self.basePt = None
      self.arrayType = None
      self.distanceBetweenRows = None
      self.distanceBetweenCols = None
      self.itemsRotation = None

      # serie rettangolare
      self.rectangleAngle = None
      self.rectangleCols = None
      self.rectangleRows = None
      self.firstPt = None

      # serie traiettoria
      self.pathTangentDirection = None
      self.pathRows = None
      self.pathItemsNumber = None
      self.pathLinearObjectList = None

      # serie polare
      self.centerPt = None
      self.polarItemsNumber = None
      self.polarAngleBetween = None
      self.polarRows = None

      self.__highlight = QadHighlight(self.canvas)

   def hidePointMapToolMarkers(self):
      QadGetPoint.hidePointMapToolMarkers(self)
      self.__highlight.hide()

   def showPointMapToolMarkers(self):
      QadGetPoint.showPointMapToolMarkers(self)
      self.__highlight.show()
                             
   def clear(self):
      QadGetPoint.clear(self)
      self.__highlight.reset()
      self.mode = None    


   #============================================================================
   # doRectangleArray
   #============================================================================
   def doRectangleArray(self):
      self.__highlight.reset()

      entity = QadEntity()
      # copio entitySet
      entitySet = QadEntitySet(self.entitySet)
      
      for layerEntitySet in entitySet.layerEntitySetList:
         layer = layerEntitySet.layer
         
         while len(layerEntitySet.featureIds) > 0:
            featureId = layerEntitySet.featureIds[0]
            # verifico se l'entità appartiene ad uno stile di quotatura
            dimEntity = QadDimStyles.getDimEntity(layer, featureId)
            
            f = layerEntitySet.getFeature(featureId)
            if f is None:
               del layerEntitySet.featureIds[0]
               continue

            # verifico se l'entità appartiene ad uno stile di quotatura
            dimEntity = QadDimStyles.getDimEntity(layer, f.id())
            if dimEntity is None:
               entity.set(layer, f.id())
               if qad_array_fun.arrayRectangleEntity(self.plugIn, entity, self.basePt, self.rectangleRows, self.rectangleCols, \
                                                     self.distanceBetweenRows, self.distanceBetweenCols, self.rectangleAngle, self.itemsRotation,
                                                     False, self.__highlight) == False:
                  return
               del layerEntitySet.featureIds[0] # la rimuovo da entitySet
            else:
               if qad_array_fun.arrayRectangleEntity(self.plugIn, dimEntity, self.basePt, self.rectangleRows, self.rectangleCols, \
                                                     self.distanceBetweenRows, self.distanceBetweenCols, self.rectangleAngle, self.itemsRotation,
                                                     False, self.__highlight) == False:
                  return
               dimEntitySet = dimEntity.getEntitySet()
               entitySet.subtract(dimEntitySet) # la rimuovo da entitySet


   #============================================================================
   # doPathArray
   #============================================================================
   def doPathArray(self):
      self.__highlight.reset()

      entity = QadEntity()
      # copio entitySet
      entitySet = QadEntitySet(self.entitySet)
      
      for layerEntitySet in entitySet.layerEntitySetList:
         layer = layerEntitySet.layer
         
#.........这里部分代码省略.........
开发者ID:gam17,项目名称:QAD,代码行数:103,代码来源:qad_array_maptool.py

示例11: Qad_stretch_maptool

# 需要导入模块: from qad_highlight import QadHighlight [as 别名]
# 或者: from qad_highlight.QadHighlight import hide [as 别名]
class Qad_stretch_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)
                        
      self.basePt = None
      self.SSGeomList = [] # lista di entità da stirare con geom di selezione
      self.__highlight = QadHighlight(self.canvas)

   def hidePointMapToolMarkers(self):
      QadGetPoint.hidePointMapToolMarkers(self)
      self.__highlight.hide()

   def showPointMapToolMarkers(self):
      QadGetPoint.showPointMapToolMarkers(self)
      self.__highlight.show()
                             
   def clear(self):
      QadGetPoint.clear(self)
      self.__highlight.reset()
      self.mode = None    
   
   
   #============================================================================
   # stretch
   #============================================================================
   def stretch(self, entity, containerGeom, offSetX, offSetY, tolerance2ApproxCurve):
      # entity = entità da stirare
      # ptList = lista dei punti da stirare
      # offSetX, offSetY = spostamento da fare
      # tolerance2ApproxCurve = tolleranza per ricreare le curve
      # verifico se l'entità appartiene ad uno stile di quotatura
      if entity.whatIs() == "ENTITY":
         stretchedGeom = entity.getGeometry()
         # controllo inserito perchè con le quote, questa viene cancellata e ricreata quindi alcuni oggetti potrebbero non esistere più
         if stretchedGeom is None: # se non c'è lo salto senza errore
            return True
         # trasformo la geometria nel crs del canvas per lavorare con coordinate piane xy
         coordTransform = QgsCoordinateTransform(entity.layer.crs(), self.canvas.mapSettings().destinationCrs())
         stretchedGeom.transform(coordTransform)           
         # stiro la feature
         stretchedGeom = qad_stretch_fun.stretchQgsGeometry(stretchedGeom, containerGeom, \
                                                            offSetX, offSetY, \
                                                            tolerance2ApproxCurve)
         
         if stretchedGeom is not None:
            # trasformo la geometria nel crs del layer
            coordTransform = QgsCoordinateTransform(self.canvas.mapSettings().destinationCrs(), entity.layer.crs())
            stretchedGeom.transform(coordTransform)
            self.__highlight.addGeometry(stretchedGeom, entity.layer)

      elif entity.whatIs() == "DIMENTITY":
         newDimEntity = QadDimEntity(entity) # la copio
         # stiro la quota
         newDimEntity.stretch(containerGeom, offSetX, offSetY)
         self.__highlight.addGeometry(newDimEntity.textualFeature.geometry(), newDimEntity.getTextualLayer())
         self.__highlight.addGeometries(newDimEntity.getLinearGeometryCollection(), newDimEntity.getLinearLayer())
         self.__highlight.addGeometries(newDimEntity.getSymbolGeometryCollection(), newDimEntity.getSymbolLayer())
            
      return True


   #============================================================================
   # addStretchedGeometries
   #============================================================================
   def addStretchedGeometries(self, newPt):
      self.__highlight.reset()            

      dimElaboratedList = [] # lista delle quotature già elaborate

      tolerance2ApproxCurve = QadVariables.get(QadMsg.translate("Environment variables", "TOLERANCE2APPROXCURVE"))
      offSetX = newPt.x() - self.basePt.x()
      offSetY = newPt.y() - self.basePt.y()

      entity = QadEntity()
      for SSGeom in self.SSGeomList:
         # copio entitySet
         entitySet = QadEntitySet(SSGeom[0])
         geomSel = SSGeom[1]

         for layerEntitySet in entitySet.layerEntitySetList:
            layer = layerEntitySet.layer

            for featureId in layerEntitySet.featureIds:
               entity.set(layer, featureId)

               # verifico se l'entità appartiene ad uno stile di quotatura
               dimEntity = QadDimStyles.getDimEntity(entity)
               if dimEntity is None:                        
                  self.stretch(entity, geomSel, offSetX, offSetY, tolerance2ApproxCurve)
               else:
                  found = False
                  for dimElaborated in dimElaboratedList:
                     if dimElaborated == dimEntity:
                        found = True
                  
                  if found == False: # quota non ancora elaborata
                     dimElaboratedList.append(dimEntity)
                     self.stretch(dimEntity, geomSel, offSetX, offSetY, tolerance2ApproxCurve)

#.........这里部分代码省略.........
开发者ID:gam17,项目名称:QAD,代码行数:103,代码来源:qad_stretch_maptool.py

示例12: Qad_gripStretch_maptool

# 需要导入模块: from qad_highlight import QadHighlight [as 别名]
# 或者: from qad_highlight.QadHighlight import hide [as 别名]
class Qad_gripStretch_maptool(QadGetPoint):
    
   def __init__(self, plugIn):
      QadGetPoint.__init__(self, plugIn)
                        
      self.basePt = None
      self.selectedEntityGripPoints = [] # lista in cui ogni elemento è una entità + una lista di punti da stirare
      self.__highlight = QadHighlight(self.canvas)

   def hidePointMapToolMarkers(self):
      QadGetPoint.hidePointMapToolMarkers(self)
      self.__highlight.hide()

   def showPointMapToolMarkers(self):
      QadGetPoint.showPointMapToolMarkers(self)
      self.__highlight.show()
                             
   def clear(self):
      QadGetPoint.clear(self)
      self.__highlight.reset()
      self.mode = None


   #============================================================================
   # getSelectedEntityGripPointNdx
   #============================================================================
   def getSelectedEntityGripPointNdx(self, entity):
      # lista delle entityGripPoint con dei grip point selezionati
      # cerca la posizione di un'entità nella lista in cui ogni elemento è una entità + una lista di punti da stirare
      i = 0
      tot = len(self.selectedEntityGripPoints)
      while i < tot:
         selectedEntityGripPoint = self.selectedEntityGripPoints[i]
         if selectedEntityGripPoint[0] == entity:
            return i
         i = i + 1
      return -1
   
   
   #============================================================================
   # stretch
   #============================================================================
   def stretch(self, entity, ptList, offSetX, offSetY, tolerance2ApproxCurve):
      # entity = entità da stirare
      # ptList = lista dei punti da stirare
      # offSetX, offSetY = spostamento da fare
      # tolerance2ApproxCurve = tolleranza per ricreare le curve
      # entitySet = gruppo di selezione delle entità da stirare
      # verifico se l'entità appartiene ad uno stile di quotatura
      if entity.whatIs() == "ENTITY":
         stretchedGeom = entity.gripGeomStretch(self.basePt, ptList, offSetX, offSetY, tolerance2ApproxCurve)

         if stretchedGeom is not None:
            self.__highlight.addGeometry(stretchedGeom, entity.layer)
      elif entity.whatIs() == "DIMENTITY":
         # stiro la quota
         entity.stretch(ptList, offSetX, offSetY)
         self.__highlight.addGeometry(entity.textualFeature.geometry(), entity.getTextualLayer())
         self.__highlight.addGeometries(entity.getLinearGeometryCollection(), entity.getLinearLayer())
         self.__highlight.addGeometries(entity.getSymbolGeometryCollection(), entity.getSymbolLayer())

   
   #============================================================================
   # addStretchedGeometries
   #============================================================================
   def addStretchedGeometries(self, newPt):
      self.__highlight.reset()

      dimElaboratedList = [] # lista delle quotature già elaborate

      for selectedEntity in self.selectedEntityGripPoints:
         entity = selectedEntity[0]
         ptList = selectedEntity[1]
         layer = entity.layer

         tolerance2ApproxCurve = QadVariables.get(QadMsg.translate("Environment variables", "TOLERANCE2APPROXCURVE"))
         offSetX = newPt.x() - self.basePt.x()
         offSetY = newPt.y() - self.basePt.y()

         # verifico se l'entità appartiene ad uno stile di quotatura
         if entity.isDimensionComponent() == False:
            self.stretch(entity, ptList, offSetX, offSetY, tolerance2ApproxCurve)
         else:
            dimEntity = QadDimEntity()
            if dimEntity.initByDimId(entity.dimStyle, entity.dimId):
               found = False
               for dimElaborated in dimElaboratedList:
                  if dimElaborated == dimEntity:
                     found = True
               if found == False: # quota non ancora elaborata
                  dimEntitySet = dimEntity.getEntitySet()
                  # creo un'unica lista contenente i grip points di tutti i componenti della quota
                  dimPtlist = []
                  for layerEntitySet in dimEntitySet.layerEntitySetList:
                     for featureId in layerEntitySet.featureIds:
                        componentDim = QadEntity()
                        componentDim.set(layerEntitySet.layer, featureId)
                        i = self.getSelectedEntityGripPointNdx(componentDim)
                        if i >= 0:
                           dimPtlist.extend(self.selectedEntityGripPoints[i][1])
#.........这里部分代码省略.........
开发者ID:gam17,项目名称:QAD,代码行数:103,代码来源:qad_stretch_maptool.py


注:本文中的qad_highlight.QadHighlight.hide方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。