QgsScaleVisibilityDialog class

A dialog allowing users to enter a scale visibility range.

Constructors, destructors, conversion operators

QgsScaleVisibilityDialog(QWidget* parent = nullptr, const QString& title = QString(), QgsMapCanvas* mapCanvas = nullptr) explicit
Constructor for QgsScaleVisibilityDialog, with specified dialog title.

Public functions

auto hasScaleVisibility() const -> bool
Returns true if scale based visibilty is enabled.
auto maximumScale() const -> double
Returns the selected maximum scale, or 0 if maximum scale is not set.
auto minimumScale() const -> double
Returns the selected minimum scale, or 0 if minimum scale is not set.

Public slots

void setMaximumScale(double scale)
Set the maximum scale, or 0 to indicate the minimum is not set.
void setMinimumScale(double scale)
Set the minimum scale, or 0 to indicate the minimum is not set.
void setScaleVisiblity(bool hasScaleVisibility)
Set whether scale based visibility is enabled.

Function documentation

QgsScaleVisibilityDialog::QgsScaleVisibilityDialog(QWidget* parent = nullptr, const QString& title = QString(), QgsMapCanvas* mapCanvas = nullptr) explicit

Constructor for QgsScaleVisibilityDialog, with specified dialog title.

The mapCanvas argument can be used to associate the dialog with a map canvas, allowing use of the current map scale within the dialog.

double QgsScaleVisibilityDialog::maximumScale() const

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.

double QgsScaleVisibilityDialog::minimumScale() const

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.

void QgsScaleVisibilityDialog::setMaximumScale(double scale) public slot

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.

void QgsScaleVisibilityDialog::setMinimumScale(double scale) public slot

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.

void QgsScaleVisibilityDialog::setScaleVisiblity(bool hasScaleVisibility) public slot

Set whether scale based visibility is enabled.