Class: QgsMapUnitScaleWidget

class qgis.gui.QgsMapUnitScaleWidget(parent: QWidget = None)

Bases: QgsPanelWidget

Constructor for QgsMapUnitScaleWidget.

Parameters

parent (QWidget = None) – parent widget

A widget which allows the user to choose the minimum and maximum scale of an object in map units and millimeters. This widget is designed to allow users to edit the properties of a QgsMapUnitScale object.

actionEvent()
changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
mapUnitScale(self) → QgsMapUnitScale

Returns a QgsMapUnitScale representing the settings shown in the widget.

Return type

QgsMapUnitScale

mapUnitScaleChanged

Emitted when the settings in the widget are modified.

Parameters

scale (QgsMapUnitScale) – QgsMapUnitScale reflecting new settings from the widget [signal]

metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setMapCanvas(self, canvas: QgsMapCanvas)

Sets the map canvas associated with the widget. This allows the widget to retrieve the current map scale from the canvas.

Parameters

canvas (QgsMapCanvas) – map canvas

setMapUnitScale(self, scale: QgsMapUnitScale)

Updates the widget to reflect the settings from the specified QgsMapUnitScale object.

Parameters

scale (QgsMapUnitScale) – map unit scale to show in widget

See also

mapUnitScale()

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
updateMicroFocus()
wheelEvent()