# The following has been generated automatically from src/core/layout/qgslayoutitem.h
QgsLayoutItem.UpperLeft = QgsLayoutItem.ReferencePoint.UpperLeft
QgsLayoutItem.UpperMiddle = QgsLayoutItem.ReferencePoint.UpperMiddle
QgsLayoutItem.UpperRight = QgsLayoutItem.ReferencePoint.UpperRight
QgsLayoutItem.MiddleLeft = QgsLayoutItem.ReferencePoint.MiddleLeft
QgsLayoutItem.Middle = QgsLayoutItem.ReferencePoint.Middle
QgsLayoutItem.MiddleRight = QgsLayoutItem.ReferencePoint.MiddleRight
QgsLayoutItem.LowerLeft = QgsLayoutItem.ReferencePoint.LowerLeft
QgsLayoutItem.LowerMiddle = QgsLayoutItem.ReferencePoint.LowerMiddle
QgsLayoutItem.LowerRight = QgsLayoutItem.ReferencePoint.LowerRight
QgsLayoutItem.UndoNone = QgsLayoutItem.UndoCommand.UndoNone
QgsLayoutItem.UndoIncrementalMove = QgsLayoutItem.UndoCommand.UndoIncrementalMove
QgsLayoutItem.UndoIncrementalResize = QgsLayoutItem.UndoCommand.UndoIncrementalResize
QgsLayoutItem.UndoStrokeColor = QgsLayoutItem.UndoCommand.UndoStrokeColor
QgsLayoutItem.UndoStrokeWidth = QgsLayoutItem.UndoCommand.UndoStrokeWidth
QgsLayoutItem.UndoBackgroundColor = QgsLayoutItem.UndoCommand.UndoBackgroundColor
QgsLayoutItem.UndoOpacity = QgsLayoutItem.UndoCommand.UndoOpacity
QgsLayoutItem.UndoMarginLeft = QgsLayoutItem.UndoCommand.UndoMarginLeft
QgsLayoutItem.UndoMarginTop = QgsLayoutItem.UndoCommand.UndoMarginTop
QgsLayoutItem.UndoMarginBottom = QgsLayoutItem.UndoCommand.UndoMarginBottom
QgsLayoutItem.UndoMarginRight = QgsLayoutItem.UndoCommand.UndoMarginRight
QgsLayoutItem.UndoSetId = QgsLayoutItem.UndoCommand.UndoSetId
QgsLayoutItem.UndoRotation = QgsLayoutItem.UndoCommand.UndoRotation
QgsLayoutItem.UndoExportLayerName = QgsLayoutItem.UndoCommand.UndoExportLayerName
QgsLayoutItem.UndoShapeStyle = QgsLayoutItem.UndoCommand.UndoShapeStyle
QgsLayoutItem.UndoShapeCornerRadius = QgsLayoutItem.UndoCommand.UndoShapeCornerRadius
QgsLayoutItem.UndoNodeMove = QgsLayoutItem.UndoCommand.UndoNodeMove
QgsLayoutItem.UndoAtlasMargin = QgsLayoutItem.UndoCommand.UndoAtlasMargin
QgsLayoutItem.UndoMapRotation = QgsLayoutItem.UndoCommand.UndoMapRotation
QgsLayoutItem.UndoZoomContent = QgsLayoutItem.UndoCommand.UndoZoomContent
QgsLayoutItem.UndoOverviewStyle = QgsLayoutItem.UndoCommand.UndoOverviewStyle
QgsLayoutItem.UndoGridFramePenColor = QgsLayoutItem.UndoCommand.UndoGridFramePenColor
QgsLayoutItem.UndoMapGridFrameFill1Color = QgsLayoutItem.UndoCommand.UndoMapGridFrameFill1Color
QgsLayoutItem.UndoMapGridFrameFill2Color = QgsLayoutItem.UndoCommand.UndoMapGridFrameFill2Color
QgsLayoutItem.UndoMapAnnotationDistance = QgsLayoutItem.UndoCommand.UndoMapAnnotationDistance
QgsLayoutItem.UndoMapGridAnnotationFontColor = QgsLayoutItem.UndoCommand.UndoMapGridAnnotationFontColor
QgsLayoutItem.UndoMapGridLineSymbol = QgsLayoutItem.UndoCommand.UndoMapGridLineSymbol
QgsLayoutItem.UndoMapGridMarkerSymbol = QgsLayoutItem.UndoCommand.UndoMapGridMarkerSymbol
QgsLayoutItem.UndoMapGridIntervalRange = QgsLayoutItem.UndoCommand.UndoMapGridIntervalRange
QgsLayoutItem.UndoMapLabelMargin = QgsLayoutItem.UndoCommand.UndoMapLabelMargin
QgsLayoutItem.UndoPictureRotation = QgsLayoutItem.UndoCommand.UndoPictureRotation
QgsLayoutItem.UndoPictureFillColor = QgsLayoutItem.UndoCommand.UndoPictureFillColor
QgsLayoutItem.UndoPictureStrokeColor = QgsLayoutItem.UndoCommand.UndoPictureStrokeColor
QgsLayoutItem.UndoPictureStrokeWidth = QgsLayoutItem.UndoCommand.UndoPictureStrokeWidth
QgsLayoutItem.UndoPictureNorthOffset = QgsLayoutItem.UndoCommand.UndoPictureNorthOffset
QgsLayoutItem.UndoLabelText = QgsLayoutItem.UndoCommand.UndoLabelText
QgsLayoutItem.UndoLabelFont = QgsLayoutItem.UndoCommand.UndoLabelFont
QgsLayoutItem.UndoLabelMargin = QgsLayoutItem.UndoCommand.UndoLabelMargin
QgsLayoutItem.UndoLabelFontColor = QgsLayoutItem.UndoCommand.UndoLabelFontColor
QgsLayoutItem.UndoLegendText = QgsLayoutItem.UndoCommand.UndoLegendText
QgsLayoutItem.UndoLegendColumnCount = QgsLayoutItem.UndoCommand.UndoLegendColumnCount
QgsLayoutItem.UndoLegendSymbolWidth = QgsLayoutItem.UndoCommand.UndoLegendSymbolWidth
QgsLayoutItem.UndoLegendSymbolHeight = QgsLayoutItem.UndoCommand.UndoLegendSymbolHeight
QgsLayoutItem.UndoLegendMaxSymbolSize = QgsLayoutItem.UndoCommand.UndoLegendMaxSymbolSize
QgsLayoutItem.UndoLegendMinSymbolSize = QgsLayoutItem.UndoCommand.UndoLegendMinSymbolSize
QgsLayoutItem.UndoLegendWmsLegendWidth = QgsLayoutItem.UndoCommand.UndoLegendWmsLegendWidth
QgsLayoutItem.UndoLegendWmsLegendHeight = QgsLayoutItem.UndoCommand.UndoLegendWmsLegendHeight
QgsLayoutItem.UndoLegendTitleSpaceBottom = QgsLayoutItem.UndoCommand.UndoLegendTitleSpaceBottom
QgsLayoutItem.UndoLegendGroupSpace = QgsLayoutItem.UndoCommand.UndoLegendGroupSpace
QgsLayoutItem.UndoLegendGroupIndent = QgsLayoutItem.UndoCommand.UndoLegendGroupIndent
QgsLayoutItem.UndoLegendSubgroupIndent = QgsLayoutItem.UndoCommand.UndoLegendSubgroupIndent
QgsLayoutItem.UndoLegendLayerSpace = QgsLayoutItem.UndoCommand.UndoLegendLayerSpace
QgsLayoutItem.UndoLegendSymbolSpace = QgsLayoutItem.UndoCommand.UndoLegendSymbolSpace
QgsLayoutItem.UndoLegendIconSymbolSpace = QgsLayoutItem.UndoCommand.UndoLegendIconSymbolSpace
QgsLayoutItem.UndoLegendFontColor = QgsLayoutItem.UndoCommand.UndoLegendFontColor
QgsLayoutItem.UndoLegendBoxSpace = QgsLayoutItem.UndoCommand.UndoLegendBoxSpace
QgsLayoutItem.UndoLegendColumnSpace = QgsLayoutItem.UndoCommand.UndoLegendColumnSpace
QgsLayoutItem.UndoLegendLineSpacing = QgsLayoutItem.UndoCommand.UndoLegendLineSpacing
QgsLayoutItem.UndoLegendRasterStrokeWidth = QgsLayoutItem.UndoCommand.UndoLegendRasterStrokeWidth
QgsLayoutItem.UndoLegendRasterStrokeColor = QgsLayoutItem.UndoCommand.UndoLegendRasterStrokeColor
QgsLayoutItem.UndoLegendTitleFont = QgsLayoutItem.UndoCommand.UndoLegendTitleFont
QgsLayoutItem.UndoLegendGroupFont = QgsLayoutItem.UndoCommand.UndoLegendGroupFont
QgsLayoutItem.UndoLegendLayerFont = QgsLayoutItem.UndoCommand.UndoLegendLayerFont
QgsLayoutItem.UndoLegendItemFont = QgsLayoutItem.UndoCommand.UndoLegendItemFont
QgsLayoutItem.UndoLegendAutoWrapAfter = QgsLayoutItem.UndoCommand.UndoLegendAutoWrapAfter
QgsLayoutItem.UndoScaleBarLineWidth = QgsLayoutItem.UndoCommand.UndoScaleBarLineWidth
QgsLayoutItem.UndoScaleBarSegmentSize = QgsLayoutItem.UndoCommand.UndoScaleBarSegmentSize
QgsLayoutItem.UndoScaleBarSegmentsLeft = QgsLayoutItem.UndoCommand.UndoScaleBarSegmentsLeft
QgsLayoutItem.UndoScaleBarSegments = QgsLayoutItem.UndoCommand.UndoScaleBarSegments
QgsLayoutItem.UndoScaleBarHeight = QgsLayoutItem.UndoCommand.UndoScaleBarHeight
QgsLayoutItem.UndoScaleBarSubdivisions = QgsLayoutItem.UndoCommand.UndoScaleBarSubdivisions
QgsLayoutItem.UndoScaleBarSubdivisionsHeight = QgsLayoutItem.UndoCommand.UndoScaleBarSubdivisionsHeight
QgsLayoutItem.UndoScaleBarFontColor = QgsLayoutItem.UndoCommand.UndoScaleBarFontColor
QgsLayoutItem.UndoScaleBarFillColor = QgsLayoutItem.UndoCommand.UndoScaleBarFillColor
QgsLayoutItem.UndoScaleBarFillColor2 = QgsLayoutItem.UndoCommand.UndoScaleBarFillColor2
QgsLayoutItem.UndoScaleBarStrokeColor = QgsLayoutItem.UndoCommand.UndoScaleBarStrokeColor
QgsLayoutItem.UndoScaleBarUnitText = QgsLayoutItem.UndoCommand.UndoScaleBarUnitText
QgsLayoutItem.UndoScaleBarMapUnitsSegment = QgsLayoutItem.UndoCommand.UndoScaleBarMapUnitsSegment
QgsLayoutItem.UndoScaleBarLabelBarSize = QgsLayoutItem.UndoCommand.UndoScaleBarLabelBarSize
QgsLayoutItem.UndoScaleBarBoxContentSpace = QgsLayoutItem.UndoCommand.UndoScaleBarBoxContentSpace
QgsLayoutItem.UndoArrowStrokeWidth = QgsLayoutItem.UndoCommand.UndoArrowStrokeWidth
QgsLayoutItem.UndoArrowHeadWidth = QgsLayoutItem.UndoCommand.UndoArrowHeadWidth
QgsLayoutItem.UndoArrowHeadFillColor = QgsLayoutItem.UndoCommand.UndoArrowHeadFillColor
QgsLayoutItem.UndoArrowHeadStrokeColor = QgsLayoutItem.UndoCommand.UndoArrowHeadStrokeColor
QgsLayoutItem.UndoElevationProfileTolerance = QgsLayoutItem.UndoCommand.UndoElevationProfileTolerance
QgsLayoutItem.UndoElevationProfileChartBackground = QgsLayoutItem.UndoCommand.UndoElevationProfileChartBackground
QgsLayoutItem.UndoElevationProfileChartBorder = QgsLayoutItem.UndoCommand.UndoElevationProfileChartBorder
QgsLayoutItem.UndoElevationProfileDistanceMajorGridlines = QgsLayoutItem.UndoCommand.UndoElevationProfileDistanceMajorGridlines
QgsLayoutItem.UndoElevationProfileDistanceMinorGridlines = QgsLayoutItem.UndoCommand.UndoElevationProfileDistanceMinorGridlines
QgsLayoutItem.UndoElevationProfileDistanceFormat = QgsLayoutItem.UndoCommand.UndoElevationProfileDistanceFormat
QgsLayoutItem.UndoElevationProfileDistanceFont = QgsLayoutItem.UndoCommand.UndoElevationProfileDistanceFont
QgsLayoutItem.UndoElevationProfileDistanceLabels = QgsLayoutItem.UndoCommand.UndoElevationProfileDistanceLabels
QgsLayoutItem.UndoElevationProfileElevationMajorGridlines = QgsLayoutItem.UndoCommand.UndoElevationProfileElevationMajorGridlines
QgsLayoutItem.UndoElevationProfileElevationMinorGridlines = QgsLayoutItem.UndoCommand.UndoElevationProfileElevationMinorGridlines
QgsLayoutItem.UndoElevationProfileElevationFormat = QgsLayoutItem.UndoCommand.UndoElevationProfileElevationFormat
QgsLayoutItem.UndoElevationProfileElevationFont = QgsLayoutItem.UndoCommand.UndoElevationProfileElevationFont
QgsLayoutItem.UndoElevationProfileElevationLabels = QgsLayoutItem.UndoCommand.UndoElevationProfileElevationLabels
QgsLayoutItem.UndoElevationProfileMinimumDistance = QgsLayoutItem.UndoCommand.UndoElevationProfileMinimumDistance
QgsLayoutItem.UndoElevationProfileMaximumDistance = QgsLayoutItem.UndoCommand.UndoElevationProfileMaximumDistance
QgsLayoutItem.UndoElevationProfileMinimumElevation = QgsLayoutItem.UndoCommand.UndoElevationProfileMinimumElevation
QgsLayoutItem.UndoElevationProfileMaximumElevation = QgsLayoutItem.UndoCommand.UndoElevationProfileMaximumElevation
QgsLayoutItem.UndoElevationProfileSubsectionLines = QgsLayoutItem.UndoCommand.UndoElevationProfileSubsectionLines
QgsLayoutItem.UndoCustomCommand = QgsLayoutItem.UndoCommand.UndoCustomCommand
QgsLayoutItem.FlagOverridesPaint = QgsLayoutItem.Flag.FlagOverridesPaint
QgsLayoutItem.FlagProvidesClipPath = QgsLayoutItem.Flag.FlagProvidesClipPath
QgsLayoutItem.FlagDisableSceneCaching = QgsLayoutItem.Flag.FlagDisableSceneCaching
QgsLayoutItem.Flags = lambda flags=0: QgsLayoutItem.Flag(flags)
QgsLayoutItem.CanGroupWithAnyOtherItem = QgsLayoutItem.ExportLayerBehavior.CanGroupWithAnyOtherItem
QgsLayoutItem.CanGroupWithItemsOfSameType = QgsLayoutItem.ExportLayerBehavior.CanGroupWithItemsOfSameType
QgsLayoutItem.MustPlaceInOwnLayer = QgsLayoutItem.ExportLayerBehavior.MustPlaceInOwnLayer
QgsLayoutItem.ItemContainsSubLayers = QgsLayoutItem.ExportLayerBehavior.ItemContainsSubLayers
from enum import Enum


def _force_int(v): return int(v.value) if isinstance(v, Enum) else v


QgsLayoutItem.Flag.__bool__ = lambda flag: bool(_force_int(flag))
QgsLayoutItem.Flag.__eq__ = lambda flag1, flag2: _force_int(flag1) == _force_int(flag2)
QgsLayoutItem.Flag.__and__ = lambda flag1, flag2: _force_int(flag1) & _force_int(flag2)
QgsLayoutItem.Flag.__or__ = lambda flag1, flag2: QgsLayoutItem.Flag(_force_int(flag1) | _force_int(flag2))
try:
    QgsLayoutItem.ExportLayerDetail.__attribute_docs__ = {'name': 'User-friendly name for the export layer', 'mapLayerId': 'Associated map layer ID, or an empty string if this export layer is not associated with a map layer', 'compositionMode': 'Associated composition mode if this layer is associated with a map layer\n\n.. versionadded:: 3.14', 'opacity': 'Associated opacity, if this layer is associated with a map layer\n\n.. versionadded:: 3.14', 'mapTheme': 'Associated map theme, or an empty string if this export layer does not need to be associated with a map theme', 'groupName': 'Associated group name, if this layer is associated with an export group.\n\n.. versionadded:: 3.40'}
    QgsLayoutItem.ExportLayerDetail.__annotations__ = {'name': str, 'mapLayerId': str, 'compositionMode': 'QPainter.CompositionMode', 'opacity': float, 'mapTheme': str, 'groupName': str}
    QgsLayoutItem.ExportLayerDetail.__doc__ = """Contains details of a particular export layer relating to a layout item.

.. versionadded:: 3.10"""
    QgsLayoutItem.ExportLayerDetail.__group__ = ['layout']
except (NameError, AttributeError):
    pass
try:
    QgsLayoutItem.__attribute_docs__ = {'frameChanged': "Emitted if the item's frame style changes.\n", 'lockChanged': "Emitted if the item's lock status changes.\n\n.. seealso:: :py:func:`isLocked`\n\n.. seealso:: :py:func:`setLocked`\n", 'rotationChanged': 'Emitted on item rotation change.\n', 'sizePositionChanged': "Emitted when the item's size or position changes.\n", 'backgroundTaskCountChanged': 'Emitted whenever the number of background tasks an item is executing\nchanges.\n\n.. versionadded:: 3.10\n', 'clipPathChanged': "Emitted when the item's clipping path has changed.\n\n.. seealso:: :py:func:`clipPath`\n\n.. versionadded:: 3.16\n"}
    QgsLayoutItem.__virtual_methods__ = ['cleanup', 'icon', 'uuid', 'itemFlags', 'setId', 'displayName', 'setSelected', 'setVisibility', 'exportLayerBehavior', 'numberExportLayers', 'startLayeredExport', 'stopLayeredExport', 'nextExportPart', 'exportLayerDetails', 'fixedSize', 'minimumSize', 'attemptResize', 'attemptMove', 'finalizeRestoreFromXml', 'setFrameEnabled', 'setFrameStrokeWidth', 'containsAdvancedEffects', 'requiresRasterization', 'estimatedFrameBleed', 'rectWithFrame', 'moveContent', 'setMoveContentPreviewOffset', 'zoomContent', 'accept', 'clipPath', 'isRefreshing', 'invalidateCache', 'redraw', 'refreshDataDefinedProperty', 'setItemRotation', 'rotateItem', 'drawDebugRect', 'framePath', 'drawFrame', 'drawBackground', 'setFixedSize', 'setMinimumSize', 'applyItemSizeConstraint', 'writePropertiesToElement', 'readPropertiesFromElement']
    QgsLayoutItem.__abstract_methods__ = ['draw']
    QgsLayoutItem.__overridden_methods__ = ['type', 'paint', 'createCommand', 'createExpressionContext', 'refresh']
    QgsLayoutItem.__signal_arguments__ = {'rotationChanged': ['newRotation: float'], 'backgroundTaskCountChanged': ['count: int']}
    QgsLayoutItem.__group__ = ['layout']
except (NameError, AttributeError):
    pass
try:
    QgsLayoutItemRenderContext.__group__ = ['layout']
except (NameError, AttributeError):
    pass
