Subgroup: Map
Class: QgsMapToolExtent¶
-
class
qgis.gui.
QgsMapToolExtent
¶ Bases:
qgis._gui.QgsMapTool
A map tool that emits an extent from a rectangle drawn onto the map canvas.
New in version 3.0: Methods
action
Return associated action with map tool or NULL if no action is associated activate
blockSignals
button
Return associated button with map tool or NULL if no button is associated canvas
returns pointer to the tool’s map canvas canvasDoubleClickEvent
Mouse double-click event for overriding. canvasMoveEvent
canvasPressEvent
canvasReleaseEvent
childEvent
children
clean
convenient method to clean members connectNotify
customEvent
deactivate
deleteLater
disconnect
disconnectNotify
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
event
eventFilter
extent
Returns the current extent drawn onto the canvas. findChild
findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject findChildren
findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] flags
gestureEvent
gesture event for overriding. Default implementation does nothing. inherits
installEventFilter
isSignalConnected
isWidgetType
isWindowType
keyPressEvent
Key event for overriding. keyReleaseEvent
Key event for overriding. killTimer
metaObject
moveToThread
objectName
parent
property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. ratio
Returns the current fixed aspect ratio to be used when dragging extent onto the canvas. receivers
removeEventFilter
searchRadiusMM
Get search radius in mm. searchRadiusMU
Get search radius in map units for given context. sender
senderSignalIndex
setAction
Use this to associate a QAction to this maptool. setButton
Use this to associate a button to this maptool. setCursor
Set a user defined cursor setObjectName
setParent
setProperty
setRatio
Sets a fixed aspect ratio to be used when dragging extent onto the canvas. signalsBlocked
startTimer
thread
timerEvent
toCanvasCoordinates
toLayerCoordinates
toMapCoordinates
toMapCoordinatesV2
toolName
Emit map tool changed with the old tool tr
wheelEvent
Mouse wheel event for overriding. Attributes
AllowZoomRect
EditTool
Transient
activated
signal emitted once the map tool is activated [signal] deactivated
signal emitted once the map tool is deactivated [signal] destroyed
destroyed(self, QObject = None) [signal] extentChanged
signal emitted on extent change [signal] messageDiscarded
emit signal to clear previous message [signal] messageEmitted
emit a message [signal] objectNameChanged
objectNameChanged(self, str) [signal] staticMetaObject
-
activate
(self)¶
-
canvasMoveEvent
(self, e: QgsMapMouseEvent)¶
-
canvasPressEvent
(self, e: QgsMapMouseEvent)¶
-
canvasReleaseEvent
(self, e: QgsMapMouseEvent)¶
-
childEvent
()¶
-
connectNotify
()¶
-
customEvent
()¶
-
deactivate
(self)¶
-
disconnectNotify
()¶
-
extent
(self) → QgsRectangle¶ Returns the current extent drawn onto the canvas.
-
extentChanged
¶ signal emitted on extent change [signal]
-
flags
(self) → QgsMapTool.Flags¶
-
isSignalConnected
()¶
-
ratio
(self) → QSize¶ Returns the current fixed aspect ratio to be used when dragging extent onto the canvas. If the aspect ratio isn’t fixed, the width and height will be set to zero. *
-
receivers
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setRatio
(self, ratio: QSize)¶ Sets a fixed aspect ratio to be used when dragging extent onto the canvas. To unset a fixed aspect ratio, set the width and height to zero.
Parameters: ratio – aspect ratio’s width and height
-
timerEvent
()¶
-
toCanvasCoordinates
()¶
-
toLayerCoordinates
()¶
-
toMapCoordinates
()¶
-
toMapCoordinatesV2
()¶
-