mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-16 00:05:45 -04:00
This allows the widget to be used for other scales (or ratios), not just map scales. Eg. it allows it to be used for entry of scale ratios like "2:3", "16:9" etc.
23 lines
1.3 KiB
Python
23 lines
1.3 KiB
Python
# The following has been generated automatically from src/gui/qgsscalecombobox.h
|
|
# monkey patching scoped based enum
|
|
QgsScaleComboBox.RatioMode.ForceUnitNumerator.__doc__ = "Default mode, forces the scale numerator to be 1, e.g. \"1:1000\""
|
|
QgsScaleComboBox.RatioMode.Flexible.__doc__ = "Allows numerator values other than 1, e.g: \"2:3\"."
|
|
QgsScaleComboBox.RatioMode.__doc__ = """Scale ratio modes.
|
|
|
|
.. versionadded:: 4.0
|
|
|
|
* ``ForceUnitNumerator``: Default mode, forces the scale numerator to be 1, e.g. \"1:1000\"
|
|
* ``Flexible``: Allows numerator values other than 1, e.g: \"2:3\".
|
|
|
|
"""
|
|
# --
|
|
QgsScaleComboBox.RatioMode.baseClass = QgsScaleComboBox
|
|
try:
|
|
QgsScaleComboBox.__attribute_docs__ = {'scaleChanged': 'Emitted when *user* has finished editing/selecting a new scale. The\n``scale`` value indicates the scale denominator, e.g. 1000.0 for a\n1:1000 map.\n', 'ratioModeChanged': 'Emitted when the ratio mode for the widget is changed.\n\n.. versionadded:: 4.0\n'}
|
|
QgsScaleComboBox.toString = staticmethod(QgsScaleComboBox.toString)
|
|
QgsScaleComboBox.toDouble = staticmethod(QgsScaleComboBox.toDouble)
|
|
QgsScaleComboBox.__overridden_methods__ = ['showPopup']
|
|
QgsScaleComboBox.__signal_arguments__ = {'scaleChanged': ['scale: float'], 'ratioModeChanged': ['mode: QgsScaleComboBox.RatioMode']}
|
|
except (NameError, AttributeError):
|
|
pass
|