Example #1
0
 def deactivate(self):
     if not self:
         return
     # self.deactivate.emit()
     self.button.setChecked(False)
     self.button.setCheckable(False)
     QgsMapTool.deactivate(self)
Example #2
0
 def deactivate(self):
     """
     Disable the tool.
     """
     self.rubber_band.reset(QGis.Polygon)
     QgsMapTool.deactivate(self)
     self.deactivated.emit()
Example #3
0
 def deactivate(self):
     self.rubberBand.reset()
     try:
         if self is not None:
             QgsMapTool.deactivate(self)
     except:
         pass
Example #4
0
 def deactivate(self):
     """
     When the action is deselected
     """
     self.__canvas.layersChanged.disconnect(self.__updateList)
     QgsProject.instance().snapSettingsChanged.disconnect(self.__updateList)
     QgsMapTool.deactivate(self)
 def canvasDoubleClickEvent(self,event):
     self.points.append(QgsPoint( self.toMapCoordinates( event.pos()) ))
     if len(self.points) <= 1 : return
   
     self.rubberBand.setToGeometry( QgsGeometry.fromPolyline(self.points), None )
     self.callback( self.rubberBand )
     QgsMapTool.deactivate(self)
Example #6
0
 def deactivate(self):
     """
     When the action is deselected
     """
     if self.__dockWdg is not None:
         self.__dockWdg.close()
     QgsMapTool.deactivate(self)
Example #7
0
 def deactivate(self):
     """
     When the action is deselected
     """
     self.__cancel()
     self.__rubber = None
     QgsMapTool.deactivate(self)
Example #8
0
 def deactivate(self):
     """
     When the action is deselected
     """
     if self.__dockWdg is not None:
         self.__dockWdg.close()
     QgsMapTool.deactivate(self)
 def deactivate(self):
     self.initVariable()
     if self.toolAction:
         self.toolAction.setChecked(False)
     if self is not None:
         QgsMapTool.deactivate(self)
         self.canvas.unsetMapTool(self)
Example #10
0
 def deactivate(self):
     """
     Disable the tool.
     """
     self.rubber_band.reset(QgsWkbTypes.PolygonGeometry)
     QgsMapTool.deactivate(self)
     self.deactivated.emit()
 def deactivate(self):
     """
     Disable the tool.
     """
     self.rubber_band.reset(QGis.Polygon)
     QgsMapTool.deactivate(self)
     self.deactivated.emit()
Example #12
0
    def deactivate(self):
        if self.supportsContextMenu():
            self.canvas.setContextMenuPolicy(self._mpCanvasContentMenuPolicy)
            self.canvas.customContextMenuRequested.disconnect(
                self.onMapContextMenuRequested)

        QgsMapTool.deactivate(self)
Example #13
0
 def deactivate(self):
     """
     When the action is deselected
     """
     self.__cancel()
     self.__rubber = None
     QgsMapTool.deactivate(self)
Example #14
0
 def deactivate(self):
     """
     Disable the tool.
     """
     self.rubber_band.reset(QgsWkbTypes.PolygonGeometry)
     QgsMapTool.deactivate(self)
     self.deactivated.emit()
 def deactivate(self):
     self.initVariable()
     if self.toolAction:
         self.toolAction.setChecked(False)
     if self is not None:
         QgsMapTool.deactivate(self)
         self.canvas.unsetMapTool(self)
Example #16
0
 def deactivate(self):
     self.lineRubber.reset()
     if self.layer is not None:
         try:
             self.layer.layerDeleted.disconnect(self.unsetMapTool)
         except TypeError:
             pass
     QgsMapTool.deactivate(self)
Example #17
0
 def deactivate(self):
     """
     Deactivates the tool and hides the rubber band
     """
     self.rubberBand.hide()
     QgsMapTool.deactivate(self)
     # restore mouse in case tool is disabled right after rotation
     QtGui.QApplication.restoreOverrideCursor()
Example #18
0
    def deactivate(self):
        if self.rubberBand is not None:
            self.rubberBand.reset()
        del self.rubberBand
        self.rubberBand = None
        self.canvas.refresh()

        QgsMapTool.deactivate(self)
 def deactivate(self):
     self.lineRubber.reset()
     if self.layer is not None:
         try:
             self.layer.layerDeleted.disconnect(self.unsetMapTool)
         except TypeError:
             pass
     QgsMapTool.deactivate(self)
Example #20
0
 def deactivate(self):
     """
     Deactivate tool.
     """
     if self.toolAction:
         self.toolAction.setChecked(False)
     if self is not None:
         QgsMapTool.deactivate(self)
Example #21
0
 def deactivate(self):
     """
     Deactivates the tool and hides the rubber band
     """
     self.rubberBand.hide()
     QgsMapTool.deactivate(self)
     # restore mouse in case tool is disabled right after rotation
     QApplication.restoreOverrideCursor()
 def deactivate(self):
     self.lineRubber.reset()
     layer = QgsMapLayerRegistry.instance().mapLayer(self.settings.value("dimension"+self.observationType+"Layer"))
     if layer is not None:
         try:
             layer.layerDeleted.disconnect(self.unsetMapTool)
         except TypeError:
             pass
     QgsMapTool.deactivate(self)
Example #23
0
 def deactivate(self):
     """
     When the action is deselected
     """
     self.__rubber.reset()
     # self.__canvas.layersChanged.disconnect(self.__updateSnapperList)
     # self.__canvas.scaleChanged.disconnect(self.__updateSnapperList)
     # QgsProject.instance().snapSettingsChanged.disconnect(self.__updateSnapperList)
     QgsMapTool.deactivate(self)
Example #24
0
 def deactivate(self):
     """
     When the action is deselected
     """
     self.canvas().scene().removeItem(self.__rubberLine)
     self.__rubberLine = None
     if self.__dockWdg is not None:
         self.__dockWdg.close()
     QgsMapTool.deactivate(self)
Example #25
0
 def deactivate(self):
     """
     When the action is deselected
     """
     self.canvas().scene().removeItem(self.__rubberLine)
     self.__rubberLine = None
     if self.__dockWdg is not None:
         self.__dockWdg.close()
     QgsMapTool.deactivate(self)
Example #26
0
 def deactivate(self):
     """
     When the action is deselected
     """
     self.__rubberSit.reset()
     self.__rubberDif.reset()
     if self.__dockWdg is not None:
         self.__dockWdg.close()
     if QgsMapTool is not None:
         QgsMapTool.deactivate(self)
Example #27
0
 def deactivate(self):
     QgsMapTool.deactivate( self )
     self.iface.messageBar().popWidget(self.messageBarItem)
     try:
         self.iface.mapCanvas().scene().removeItem(self.rubberband)
         del self.rubberband
     except AttributeError:
         #Called repeatedly... bail out
         pass
     self.canvas.unsetCursor()
Example #28
0
 def deactivate(self):
     """
     When the action is deselected
     """
     self.__rubber.reset()
     if self.__lastLayer is not None:
         self.__lastLayer.removeSelection()
     self.__canvas.layersChanged.disconnect(self.__updateList)
     self.__canvas.scaleChanged.disconnect(self.__updateList)
     QgsProject.instance().snapSettingsChanged.disconnect(self.__updateList)
     QgsMapTool.deactivate(self)
Example #29
0
 def canvasReleaseEvent(self,event):
     if event.button() == Qt.RightButton:
       self.points.append(QgsPoint( self.toMapCoordinates( event.pos()) ) )
       if len(self.points) <= 1 :return
     
       self.rubberBand.setToGeometry( QgsGeometry.fromPolyline(self.points), None )
       self.callback( self.rubberBand )
       QgsMapTool.deactivate(self)
     else:
       self.points.append(QgsPoint( self.toMapCoordinates(event.pos()) ) )
       if len(self.points) <= 1 : return
       self.rubberBand.setToGeometry( QgsGeometry.fromPolyline(self.points), None )
Example #30
0
 def deactivate(self):
     """
     Deactivate tool.
     """
     QtGui.QApplication.restoreOverrideCursor()
     self.hoverRubberBand.reset(QGis.Polygon)
     try:
         if self.toolAction:
             self.toolAction.setChecked(False)
         if self is not None:
             QgsMapTool.deactivate(self)
     except:
         pass
 def deactivate(self):
     """
     Map tool is deactivated
     """
     QgsMapTool.deactivate(self)
     self.iface.messageBar().popWidget(self.messageBarItem)
     try:
         self.iface.mapCanvas().scene().removeItem(self.rubberband)
         del self.rubberband
     except AttributeError:
         # Called repeatedly... bail out
         pass
     self.canvas.unsetCursor()
Example #32
0
 def deactivate(self):
     """
     Deactivates tool.
     """
     self.timerMapTips.stop()
     try:
         if self.toolAction:
             self.activated = False
             self.toolAction.setChecked(False)
         if self is not None:
             QgsMapTool.deactivate(self)
     except:
         pass        
 def deactivate(self):
     """
     Deactivate tool.
     """
     QtGui.QApplication.restoreOverrideCursor()
     self.hoverRubberBand.reset(QGis.Polygon)
     try:
         if self.toolAction:
             self.toolAction.setChecked(False)
         if self is not None:
             QgsMapTool.deactivate(self)
     except:
         pass
Example #34
0
 def deactivate(self):
     """
     Deactivate tool.
     """
     QApplication.restoreOverrideCursor()
     self.hoverRubberBand.reset(QgsWkbTypes.PolygonGeometry)
     try:
         if self.toolAction:
             self.toolAction.setChecked(False)
         if self is not None:
             QgsMapTool.deactivate(self)
             # self.canvas.unsetMapTool(self)
     except:
         pass
Example #35
0
 def deactivate(self):
     """
     Deactivate the polygon
     """
     self.rb.reset(True)
     QgsMapTool.deactivate(self)
 def deactivate(self):
     QgsMapTool.deactivate(self)
     self.emit(SIGNAL("deactivated()"))
 def deactivate(self):
     """
     On deactivating the map tool
     """
     QgsMapTool.deactivate(self)
     self.canvas.unsetCursor()
 def deactivate(self):
     QgsMapTool.deactivate(self)
     self.canvas.unsetCursor()
     self.clearMapCanvas()
Example #39
0
 def deactivate(self):
     QgsMapTool.deactivate(self)
     self.emit(SIGNAL("deactivated()"))
 def deactivate(self):
     self.rubberBandPt.reset(QGis.Point)
     QgsMapTool.deactivate(self)
     self.emit(SIGNAL("deactivated()"))
Example #41
0
 def deactivate(self):
     self.rb.reset(QgsWkbTypes.PointGeometry)
     QgsMapTool.deactivate(self)
Example #42
0
 def deactivate(self):
     """
     Deactivating the rectangle
     """
     self.rubberBand.hide()
     QgsMapTool.deactivate(self)
Example #43
0
 def deactivate(self):
     self.resetProperties()
     QgsMapTool.deactivate(self)
Example #44
0
 def deactivate( self ):
     QgsMapTool.deactivate( self )
     self.button.setChecked( False )
 def deactivate(self):
     self.rubberBand.hide()
     QgsMapTool.deactivate(self)
Example #46
0
 def deactivate(self):
     self.iface.messageBar().popWidget(self.messageWidget)
     self.rubber.reset()
     QgsMapTool.deactivate(self)
 def deactivate(self):
     self.rubber.reset()
     line_layer = QgsMapLayerRegistry.instance().mapLayer(self.layerId)
     if line_layer is not None:
         line_layer.layerDeleted.disconnect(self.unsetMapTool)
     QgsMapTool.deactivate(self)
Example #48
0
 def deactivate(self):
     QgsMapTool.deactivate( self )
     self.canvas.unsetCursor()
     pass
 def deactivate(self):
     QgsMapTool.deactivate(self)
     # noinspection PyUnresolvedReferences
     self.deactivated.emit()
Example #50
0
 def deactivate(self):
     """
     Gets called whenever the tool is deactivated directly or indirectly
     """
     QgsMapTool.deactivate(self)
     self.button.setChecked(False)
 def deactivate(self):
     self.rubber.reset()
     self.mapCanvas.layersChanged.disconnect(self.updateSnapperList)
     self.mapCanvas.scaleChanged.disconnect(self.updateSnapperList)
     QgsMapTool.deactivate(self)
Example #52
0
 def deactivate(self):
     """
     Gets called whenever the tool is deactivated directly or indirectly
     """
     QgsMapTool.deactivate(self)
     self.button.setChecked(False)
 def deactivate(self):
     self.rubber.reset()
     QgsMapTool.deactivate(self)
 def deactivate(self):
     """
     Disable the tool.
     """
     QgsMapTool.deactivate(self)
     self.deactivated.emit()
Example #55
0
 def deactivate(self):
     self.rb.reset(QgsWkbTypes.PolygonGeometry)
     self.rbSelect.reset(QgsWkbTypes.PolygonGeometry)
     QgsMapTool.deactivate(self)
Example #56
0
 def deactivate(self):
     QgsMapTool.deactivate(self)
     self.deactivated.emit()
Example #57
0
 def deactivate(self):
     self.rubber_band.hide()
     QgsMapTool.deactivate(self)
 def deactivate(self):
     QgsMapTool.deactivate(self)
     self.deactivated.emit()
Example #59
0
 def deactivate(self):
     # self.emit( SIGNAL("deactivate") )
     # self.canvas.setCursor( QCursor(Qt.ArrowCursor))
     if QgsMapTool:
         QgsMapTool.deactivate(self)