Beispiel #1
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    
    self.entity = QadEntity()
    
    self.SSGetClass = None
    self.entSelClass = None
Beispiel #2
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.vertices = []
    # se questo flag = True il comando serve all'interno di un altro comando per disegnare un poligono
    # che non verrà salvato su un layer
    self.virtualCmd = False
    self.PLINECommand = None
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.selectedEntityGripPoints = [] # lista in cui ogni elemento è una entità + una lista di punti da stirare
    self.basePt = QgsPoint()
    self.skipToNextGripCommand = False
    self.copyEntities = False
    self.nOperationsToUndo = 0
Beispiel #4
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.entitySet = QadEntitySet()
    self.basePt = QgsPoint()
    self.skipToNextGripCommand = False
    self.copyEntities = False
    self.nOperationsToUndo = 0
Beispiel #5
0
 def __del__(self):
    QadCommandClass.__del__(self)
    if self.EntSelClass is not None:
       self.EntSelClass.entity.deselectOnLayer()
       del self.EntSelClass
    if self.GetAngleClass is not None:
       del self.GetAngleClass
Beispiel #6
0
 def init(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.AddOnSelection = True # se = False significa remove
    self.entitySet = QadEntitySet()
    self.points = []
    self.currSelectionMode = ""
    # opzioni per limitare gli oggetti da selezionare
    self.onlyEditableLayers = False
    self.checkPointLayer = True
    self.checkLineLayer = True
    self.checkPolygonLayer = True
    self.checkDimLayers = True # include tutte le features che compongono le quotature selezionate
    
    self.help = False
    # se SingleSelection = True viene selezionato il primo oggetto o gruppo di oggetti indicato,
    # senza che vengano richieste altre selezioni.      
    self.SingleSelection = False
    self.pickAdd = QadVariables.get(QadMsg.translate("Environment variables", "PICKADD"))
    
    # se exitAfterSelection = True il comando viene terminato dopo una qualunque selezione 
    # indipendentemente che sia stato selezionato o meno un oggetto o gruppo di oggetti.
    # usato da QadVirtualSelCommandClass
    self.exitAfterSelection = False
    
    # selezione degli oggetti aggiunti più recentemente al gruppo di selezione (x opzione annulla)
    self.lastEntitySet = QadEntitySet()
    self.PLINECommand = None
    self.CIRCLECommand = None
    self.MPOLYGONCommand = None
    self.MBUFFERCommand = None
    self.SSGetClass = None
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.AddOnSelection = True # se = False significa remove
    self.points = []
    self.MPOLYGONCommand = None
    self.SSGeomList = [] # lista di entità da stirare con geom di selezione
    self.basePt = QgsPoint()
Beispiel #8
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.insPt = None
    self.scale = self.plugIn.lastScale
    self.rot = self.plugIn.lastRot
    self.GetDistClass = None
    self.GetAngleClass = None
Beispiel #9
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    # se questo flag = True il comando serve all'interno di un altro comando per disegnare un cerchio
    # che non verrà salvato su un layer
    self.virtualCmd = False
    self.centerPt = None
    self.radius = None
    self.area = 100      
Beispiel #10
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.SSGetClass = QadSSGetClass(plugIn)
    self.SSGetClass.onlyEditableLayers = True
    self.entitySet = QadEntitySet()
    self.firstMirrorPt = QgsPoint()
    self.secondMirrorPt = QgsPoint()
    self.copyFeatures = True
Beispiel #11
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.vertices = []
    self.rubberBand = createRubberBand(self.plugIn.canvas, QGis.Line)
    self.firstPtTan = None
    self.firstPtPer = None      
    # se questo flag = True il comando serve all'interno di un altro comando per disegnare una linea
    # che non verrà salvata su un layer
    self.virtualCmd = False
Beispiel #12
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.entity = QadEntity()
    self.startPt = None            
    self.msg = QadMsg.translate("QAD", "Specify angle: ")
    self.angle = None # in radianti
    # memorizzo last point perchè il/i punto/i indicato/i da questa questa funzione non devono
    # alterare lastpoint 
    self.__prevLastPoint = self.plugIn.lastPoint
Beispiel #13
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.SSGetClass = QadSSGetClass(plugIn)
    self.SSGetClass.onlyEditableLayers = True
    self.entitySet = QadEntitySet()
    self.basePt = None
    self.copyFeatures = False
    self.Pt1ReferenceLen = None
    self.ReferenceLen = 1
    self.Pt1NewLen = None
Beispiel #14
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    # se questo flag = True il comando serve all'interno di un altro comando per disegnare un buffer
    # che non verrà salvato su un layer
    self.virtualCmd = False
    self.SSGetClass = QadSSGetClass(plugIn)
    self.entitySet = QadEntitySet()
    self.width = 0
    self.segments = self.plugIn.segments
    self.segments = 3 # roby
Beispiel #15
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.entity = QadEntity()
    self.startPt = None            
    self.msg = QadMsg.translate("QAD", "Specificare distanza: ")
    self.dist = None
    self.inputMode = QadInputModeEnum.NOT_ZERO | QadInputModeEnum.NOT_NEGATIVE
    # memorizzo last point perchè il/i punto/i indicato/i da questa questa funzione non devono
    # alterare lastpoint 
    self.__prevLastPoint = self.plugIn.lastPoint
Beispiel #16
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.insPt = None
    self.hText = self.plugIn.lastHText
    self.rot = self.plugIn.lastRot
    self.GetDistClass = None
    self.GetAngleClass = None
    self.labelFields = None
    self.labelFieldNamesNdx = 0      
    self.labelFieldValues = []
Beispiel #17
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.SSGetClass = QadSSGetClass(plugIn)
    self.PLINECommand = None      
    self.RECTANGLECommand = None
    self.entitySet = QadEntitySet() # entità da tagliare o estendere
    self.limitEntitySet = QadEntitySet() # entità che fanno da limiti
    self.edgeMode = QadVariables.get(QadMsg.translate("Environment variables", "EDGEMODE"))
    self.defaultValue = None # usato per gestire il tasto dx del mouse
    self.nOperationsToUndo = 0
Beispiel #18
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    # se questo flag = True il comando serve all'interno di un altro comando per disegnare un buffer
    # che non verrà salvato su un layer
    self.virtualCmd = False
    self.rubberBandBorderColor = None
    self.rubberBandFillColor = None      
    self.SSGetClass = QadSSGetClass(plugIn)
    self.entitySet = QadEntitySet()
    self.width = 0
    self.segments = self.plugIn.segments # il numero di segmenti per l'approssimazione delle curve
Beispiel #19
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.entity = None
    self.skipToNextGripCommand = False
    self.copyEntities = False
    self.basePt = QgsPoint()
    self.nOperationsToUndo = 0
    
    self.linearObjectList = None
    self.atSubGeom = None
    self.move_startPt = None
Beispiel #20
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    # se questo flag = True il comando serve all'interno di un altro comando per disegnare un rettangolo
    # che non verrà salvato su un layer
    self.virtualCmd = False
    self.centerPt = None
    self.firstEdgePt = None
    self.vertices = []
    self.sideNumber = self.plugIn.lastPolygonSideNumber
    self.constructionModeByCenter = self.plugIn.lastPolygonConstructionModeByCenter
    self.area = 100
Beispiel #21
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.entitySet = QadEntitySet()
    self.basePt = QgsPoint()
    self.skipToNextGripCommand = False
    self.copyEntities = False
    self.nOperationsToUndo = 0
    self.Pt1ReferenceLen = None
    self.ReferenceLen = 1
    self.Pt1NewLen = None
    self.__referenceLenMode = False
Beispiel #22
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.entity = QadEntity()
    self.point = None
    # opzioni per limitare gli oggetti da selezionare
    self.onlyEditableLayers = False     
    self.checkPointLayer = True
    self.checkLineLayer = True
    self.checkPolygonLayer = True
    self.checkDimLayers = True
    self.selDimEntity = False # per restituire o meno un oggetto QadDimEntity
    self.msg = QadMsg.translate("QAD", "Select object: ")
Beispiel #23
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    
    self.entity = QadEntity()
    
    self.SSGetClass = QadSSGetClass(plugIn)
    self.SSGetClass.onlyEditableLayers = False
    self.SSGetClass.checkDimLayers = False # scarto le quote
    
    self.entSelClass = None
    
    self.currSubGeom = None
    self.currAtSubGeom = None
Beispiel #24
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.SSGetClass = QadSSGetClass(plugIn)
    self.SSGetClass.onlyEditableLayers = True
    self.entitySet = QadEntitySet()
    self.basePt = QgsPoint()
    self.series = False
    self.seriesLen = 2
    self.adjust = False
    self.copyMode = QadVariables.get(QadMsg.translate("Environment variables", "COPYMODE"))
    
    self.featureCache = [] # lista di (layer, feature)
    self.nOperationsToUndo = 0
Beispiel #25
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.entity = QadEntity()
    self.point = None
    # opzioni per limitare gli oggetti da selezionare
    self.onlyEditableLayers = False     
    self.checkPointLayer = True
    self.checkLineLayer = True
    self.checkPolygonLayer = True
    self.checkDimLayers = True
    self.selDimEntity = False # per restituire o meno un oggetto QadDimEntity
    self.msg = QadMsg.translate("QAD", "Select object: ")
    self.deselectOnFinish = False
    self.canceledByUsr = False # diventa true se l'utente non vuole scegliere niente (es. se usato il tasto destro del mouse)
Beispiel #26
0
   def __init__(self, plugIn):
      QadCommandClass.__init__(self, plugIn)
      self.OpMode = plugIn.lastOpMode_lengthen # "DElta" o "Percent" o "Total" o "DYnamic"
      self.OpType = None # "length" o "Angle"
      self.value = None 

      self.startPt = None
      self.GetDistClass = None
      self.GetAngleClass = None
      self.entity = QadEntity()
      self.linearObjectList = None
      self.atSubGeom = None
      self.move_startPt = None
      
      self.nOperationsToUndo = 0
Beispiel #27
0
 def getPointMapTool(self, drawMode = QadGetPointDrawModeEnum.NONE):
    if self.step == 3: # quando si é in fase di disegno linea
       return self.PLINECommand.getPointMapTool(drawMode)
    elif self.step == 4: # quando si é in fase di disegno rettangolo 
       return self.RECTANGLECommand.getPointMapTool(drawMode)      
    else:
       return QadCommandClass.getPointMapTool(self, drawMode)
Beispiel #28
0
 def getPointMapTool(self, drawMode = QadGetPointDrawModeEnum.NONE):
    if self.step == 1: # quando si é in fase di selezione entità
       return self.entSelClass.getPointMapTool(drawMode)
    elif self.step == 2: # quando si é in fase di selezione gruppo entità
       return self.SSGetClass.getPointMapTool()
    else:
       return QadCommandClass.getPointMapTool(self, drawMode)
Beispiel #29
0
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.EntSelClass = None
    self.GetAngleClass = None
    
    self.dimPt1 = QgsPoint()
    self.dimPt2 = QgsPoint()
    self.dimArc = None    # oggetto arco da quotare
    
    self.measure = None # misura della quota (se None viene calcolato)
    self.leader = False
    # leggo lo stile di quotatura corrente
    dimStyleName = QadVariables.get(QadMsg.translate("Environment variables", "DIMSTYLE"))
    self.dimStyle = self.plugIn.dimStyles.findDimStyle(dimStyleName)
    if self.dimStyle is not None:
       self.dimStyle.dimType = QadDimTypeEnum.ALIGNED
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    # se questo flag = True il comando serve all'interno di un altro comando per disegnare un rettangolo
    # che non verrà salvato su un layer
    self.virtualCmd = False
    self.firstCorner = None
    self.gapType = 0 # 0 = Angoli retti; 1 = Raccorda i segmenti; 2 = Cima i segmenti
    self.gapValue1 = 0 # se gapType = 1 -> raggio di curvatura; se gapType = 2 -> prima distanza di cimatura
    self.gapValue2 = 0 # se gapType = 2 -> seconda distanza di cimatura
    self.area = 100
    self.dim1 = 10
    self.rot = 0
    self.vertices = []
    
    self.GetDistClass = None
    self.GetAngleClass = None
    self.defaultValue = None # usato per gestire il tasto dx del mouse
 def __del__(self):
    QadCommandClass.__del__(self)
    if self.command is not None:
       del self.command
Beispiel #32
0
 def __init__(self, plugIn):
     QadCommandClass.__init__(self, plugIn)
     self.SSGetClass = QadSSGetClass(plugIn)
     self.firstTime = True
 def getPointMapTool(self, drawMode = QadGetPointDrawModeEnum.NONE):
    if self.command is not None:
       return self.command.getPointMapTool(drawMode)
    else:
       return QadCommandClass.getPointMapTool(self, drawMode)
Beispiel #34
0
 def __del__(self):
     QadCommandClass.__del__(self)
     if self.entSelClass is not None:
         del self.entSelClass
Beispiel #35
0
 def __init__(self, plugIn):
     QadCommandClass.__init__(self, plugIn)
     self.entSelClass = None
Beispiel #36
0
 def __del__(self):
     QadCommandClass.__del__(self)
     self.rubberBand.hide()
     self.plugIn.canvas.scene().removeItem(self.rubberBand)
Beispiel #37
0
 def __init__(self, plugIn):
     QadCommandClass.__init__(self, plugIn)
Beispiel #38
0
 def __init__(self, plugIn):
     QadCommandClass.__init__(self, plugIn)
     self.entSelClass = None
     self.firstPt = None
     self.secondPt = None
Beispiel #39
0
 def __del__(self):
     QadCommandClass.__del__(self)
     if self.GetDistClass is not None:
         del self.GetDistClass
     if self.GetAngleClass is not None:
         del self.GetAngleClass
Beispiel #40
0
 def getPointMapTool(self, drawMode=QadGetPointDrawModeEnum.NONE):
     if self.step == 1:  # quando si é in fase di selezione entità
         return self.entSelClass.getPointMapTool(drawMode)
     else:
         return QadCommandClass.getPointMapTool(self, drawMode)
Beispiel #41
0
 def __del__(self):
     QadCommandClass.__del__(self)
     if self.entSelClass is not None:
         self.entSelClass.entity.deselectOnLayer()
         del self.entSelClass
 def __del__(self):
    QadCommandClass.__del__(self)
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.SSGetClass = QadSSGetClass(plugIn)
    self.SSGetClass.onlyEditableLayers = True
    self.entitySet = QadEntitySet()
    self.basePt = QgsPoint()
 def __del__(self):
    QadCommandClass.__del__(self)
    del self.SSGetClass
 def __init__(self, plugIn):
    QadCommandClass.__init__(self, plugIn)
    self.command = None
    self.args = [] # lista degli argomenti
    self.argsIndex = -1
 def __del__(self):
    QadCommandClass.__del__(self)
    if self.MPOLYGONCommand is not None:
       del self.MPOLYGONCommand      
    for SSGeom in self.SSGeomList:
       SSGeom[0].deselectOnLayer()
 def __del__(self):
     QadCommandClass.__del__(self)
     del self.SSGetClass
     self.poligonEntity.deselectOnLayer()
Beispiel #48
0
 def getPointMapTool(self, drawMode=QadGetPointDrawModeEnum.NONE):
     if self.step == 0 or self.step == 1:  # When you are being selected
         return self.entSelClass.getPointMapTool(drawMode)
     else:
         return QadCommandClass.getPointMapTool(self, drawMode)
 def __init__(self, plugIn):
     QadCommandClass.__init__(self, plugIn)
     self.entSelClass = None
     self.GetDistClass = None
     self.objectAlignment = True
     self.segmentLength = 1
 def getPointMapTool(self, drawMode=QadGetPointDrawModeEnum.NONE):
     if self.step == QadMEASURECommandClassStepEnum.ASK_SEGMENT_LENGTH:  # quando si é in fase di richiesta distanza
         return self.GetDistClass.getPointMapTool()
     else:
         return QadCommandClass.getPointMapTool(self, drawMode)