Class: QgsMapUnitScaleWidget¶
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.
See also
See also
Class Hierarchy¶
Base classes¶
Base class for any widget that can be shown as an inline panel. |
|
Methods
Returns a |
|
Sets the map canvas associated with the widget. |
|
Updates the widget to reflect the settings from the specified |
Signals
Emitted when the settings in the widget are modified. |
- class qgis.gui.QgsMapUnitScaleWidget[source]¶
Bases:
QgsPanelWidget
- __init__(parent: QWidget | None = None)
Constructor for QgsMapUnitScaleWidget.
- Parameters:
parent (Optional[QWidget] = None) – parent widget
- mapUnitScale(self) QgsMapUnitScale [source]¶
Returns a
QgsMapUnitScale
representing the settings shown in the widget.See also
See also
- Return type:
- signal mapUnitScaleChanged(scale: QgsMapUnitScale)[source]¶
Emitted when the settings in the widget are modified.
- Parameters:
scale (QgsMapUnitScale) –
QgsMapUnitScale
reflecting new settings from the widget
- setMapCanvas(self, canvas: QgsMapCanvas | None)[source]¶
Sets the map canvas associated with the widget. This allows the widget to retrieve the current map scale from the canvas.
- Parameters:
canvas (Optional[QgsMapCanvas]) – map canvas
- setMapUnitScale(self, scale: QgsMapUnitScale)[source]¶
Updates the widget to reflect the settings from the specified
QgsMapUnitScale
object.- Parameters:
scale (QgsMapUnitScale) – map unit scale to show in widget
See also
See also