Class: QgsScaleVisibilityDialog¶
A dialog allowing users to enter a scale visibility range.
Class Hierarchy¶
Base classes¶
Methods
Returns |
|
Returns the selected maximum scale, or 0 if maximum scale is not set. |
|
Returns the selected minimum scale, or 0 if minimum scale is not set. |
|
Set the maximum scale, or 0 to indicate the minimum is not set. |
|
Set the minimum scale, or 0 to indicate the minimum is not set. |
|
Set whether scale based visibility is enabled. |
|
Set whether scale based visibility is enabled. |
- class qgis.gui.QgsScaleVisibilityDialog[source]¶
Bases:
QDialog
- __init__(parent: QWidget | None = None, title: str | None = '', mapCanvas: QgsMapCanvas | None = None)
Constructor for QgsScaleVisibilityDialog, with specified dialog
title
. ThemapCanvas
argument can be used to associate the dialog with a map canvas, allowing use of the current map scale within the dialog.- Parameters:
parent (Optional[QWidget] = None)
title (Optional[str] = '')
mapCanvas (Optional[QgsMapCanvas] = None)
- hasScaleVisibility(self) bool [source]¶
Returns
True
if scale based visibility is enabled.- Return type:
bool
- maximumScale(self) float [source]¶
Returns the selected maximum scale, or 0 if maximum scale is not set. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
See also
See also
- Return type:
float
- minimumScale(self) float [source]¶
Returns the selected minimum scale, or 0 if minimum scale is not set. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.
See also
See also
- Return type:
float
- setMaximumScale(self, scale: float)[source]¶
Set the maximum
scale
, or 0 to indicate the minimum is not set. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.See also
See also
- Parameters:
scale (float)
- setMinimumScale(self, scale: float)[source]¶
Set the minimum
scale
, or 0 to indicate the minimum is not set. The scale value indicates the scale denominator, e.g. 1000.0 for a 1:1000 map.See also
See also
- Parameters:
scale (float)
- setScaleVisibility(self, hasScaleVisibility: bool)[source]¶
Set whether scale based visibility is enabled.
See also
Added in version 3.38.
- Parameters:
hasScaleVisibility (bool)
- setScaleVisiblity(self, hasScaleVisibility: bool)[source]¶
Set whether scale based visibility is enabled.
See also
Deprecated since version 3.40: Use
setScaleVisibility()
.- Parameters:
hasScaleVisibility (bool)