Class: QgsMapUnitScaleWidget

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

Bases: qgis._gui.QgsPanelWidget

Constructor for QgsMapUnitScaleWidget.

Parameters:parent – 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.

mapUnitScaleChanged

Emitted when the settings in the widget are modified.

Parameters:scale – 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 – map canvas
setMapUnitScale(self, scale: QgsMapUnitScale)

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

Parameters:scale – map unit scale to show in widget

See also

mapUnitScale()

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