Class: QgsScaleVisibilityDialog

class qgis.gui.QgsScaleVisibilityDialog(parent: QWidget = None, title: str = '', mapCanvas: QgsMapCanvas = None)

Bases: PyQt5.QtWidgets.QDialog

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.

A dialog allowing users to enter a scale visibility range.

Parameters
  • parent (QWidget = None) –

  • title (str = '') –

  • mapCanvas

actionEvent()
changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
eventFilter()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hasScaleVisibility(self) → bool

Returns True if scale based visibility is enabled.

Return type

bool

hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
maximumScale(self) → float

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

minimumScale()

Return type

float

metric()
minimumScale(self) → float

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

maximumScale()

Return type

float

mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setMaximumScale(self, scale: float)

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

maximumScale()

Parameters

scale (float) –

setMinimumScale(self, scale: float)

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

minimumScale()

Parameters

scale (float) –

setScaleVisiblity(self, hasScaleVisibility: bool)

Set whether scale based visibility is enabled.

Parameters

hasScaleVisibility (bool) –

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