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. |
|
- 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
QgsMapUnitScalerepresenting the settings shown in the widget.See also
See also
- Return type:
- signal mapUnitScaleChanged[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- 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
QgsMapUnitScaleobject.- Parameters:
scale (QgsMapUnitScale) – map unit scale to show in widget
See also
See also