mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
sip doesn't use the standard Python staticmethod type for defining static methods, which means that standard means of testing for a static method (like `isinstance(..., staticmethod)`) fail with any PyQGIS static methods. This causes issues with lint tools, which incorrectly flag calls to QGIS static methods as missing self arguments. It also breaks detection of static methods in the sphinx PyQGIS docs, so all static methods are shown as non-static. Work around this in sipify, by wrapping unambiguously static methods in staticmethod wrappers.
32 lines
2.8 KiB
Python
32 lines
2.8 KiB
Python
# The following has been generated automatically from src/core/dxf/qgsdxfexport.h
|
|
# monkey patching scoped based enum
|
|
QgsDxfExport.ExportResult.Success.__doc__ = "Successful export"
|
|
QgsDxfExport.ExportResult.InvalidDeviceError.__doc__ = "Invalid device error"
|
|
QgsDxfExport.ExportResult.DeviceNotWritableError.__doc__ = "Device not writable error"
|
|
QgsDxfExport.ExportResult.EmptyExtentError.__doc__ = "Empty extent, no extent given and no extent could be derived from layers"
|
|
QgsDxfExport.ExportResult.__doc__ = "The result of an export as dxf operation\n\n.. versionadded:: 3.10.1\n\n" + '* ``Success``: ' + QgsDxfExport.ExportResult.Success.__doc__ + '\n' + '* ``InvalidDeviceError``: ' + QgsDxfExport.ExportResult.InvalidDeviceError.__doc__ + '\n' + '* ``DeviceNotWritableError``: ' + QgsDxfExport.ExportResult.DeviceNotWritableError.__doc__ + '\n' + '* ``EmptyExtentError``: ' + QgsDxfExport.ExportResult.EmptyExtentError.__doc__
|
|
# --
|
|
# monkey patching scoped based enum
|
|
QgsDxfExport.VAlign.VBaseLine.__doc__ = "Top (0)"
|
|
QgsDxfExport.VAlign.VBottom.__doc__ = "Bottom (1)"
|
|
QgsDxfExport.VAlign.VMiddle.__doc__ = "Middle (2)"
|
|
QgsDxfExport.VAlign.VTop.__doc__ = "Top (3)"
|
|
QgsDxfExport.VAlign.Undefined.__doc__ = "Undefined"
|
|
QgsDxfExport.VAlign.__doc__ = "Vertical alignments.\n\n" + '* ``VBaseLine``: ' + QgsDxfExport.VAlign.VBaseLine.__doc__ + '\n' + '* ``VBottom``: ' + QgsDxfExport.VAlign.VBottom.__doc__ + '\n' + '* ``VMiddle``: ' + QgsDxfExport.VAlign.VMiddle.__doc__ + '\n' + '* ``VTop``: ' + QgsDxfExport.VAlign.VTop.__doc__ + '\n' + '* ``Undefined``: ' + QgsDxfExport.VAlign.Undefined.__doc__
|
|
# --
|
|
# monkey patching scoped based enum
|
|
QgsDxfExport.HAlign.HLeft.__doc__ = "Left (0)"
|
|
QgsDxfExport.HAlign.HCenter.__doc__ = "Centered (1)"
|
|
QgsDxfExport.HAlign.HRight.__doc__ = "Right (2)"
|
|
QgsDxfExport.HAlign.HAligned.__doc__ = "Aligned = (3) (if VAlign==0)"
|
|
QgsDxfExport.HAlign.HMiddle.__doc__ = "Middle = (4) (if VAlign==0)"
|
|
QgsDxfExport.HAlign.HFit.__doc__ = "Fit into point = (5) (if VAlign==0)"
|
|
QgsDxfExport.HAlign.Undefined.__doc__ = "Undefined"
|
|
QgsDxfExport.HAlign.__doc__ = "Horizontal alignments.\n\n" + '* ``HLeft``: ' + QgsDxfExport.HAlign.HLeft.__doc__ + '\n' + '* ``HCenter``: ' + QgsDxfExport.HAlign.HCenter.__doc__ + '\n' + '* ``HRight``: ' + QgsDxfExport.HAlign.HRight.__doc__ + '\n' + '* ``HAligned``: ' + QgsDxfExport.HAlign.HAligned.__doc__ + '\n' + '* ``HMiddle``: ' + QgsDxfExport.HAlign.HMiddle.__doc__ + '\n' + '* ``HFit``: ' + QgsDxfExport.HAlign.HFit.__doc__ + '\n' + '* ``Undefined``: ' + QgsDxfExport.HAlign.Undefined.__doc__
|
|
# --
|
|
QgsDxfExport.closestColorMatch = staticmethod(QgsDxfExport.closestColorMatch)
|
|
QgsDxfExport.mapUnitScaleFactor = staticmethod(QgsDxfExport.mapUnitScaleFactor)
|
|
QgsDxfExport.dxfLayerName = staticmethod(QgsDxfExport.dxfLayerName)
|
|
QgsDxfExport.dxfEncoding = staticmethod(QgsDxfExport.dxfEncoding)
|
|
QgsDxfExport.encodings = staticmethod(QgsDxfExport.encodings)
|