QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Contains settings relating to clipping a layout map by another layout item. More...
#include <qgslayoutitemmap.h>
Signals | |
void | changed () |
Emitted when the item clipping settings are changed. More... | |
Public Member Functions | |
QgsLayoutItemMapItemClipPathSettings (QgsLayoutItemMap *map=nullptr) | |
Constructor for QgsLayoutItemMapItemClipPathSettings, with the specified map parent. More... | |
QgsGeometry | clipPathInMapItemCoordinates () const |
Returns the clipping path geometry, in the map item's coordinate space. More... | |
QgsGeometry | clippedMapExtent () const |
Returns the geometry to use for clipping the parent map, in the map item's CRS. More... | |
bool | enabled () const |
Returns true if the map content should be clipped to the associated item. More... | |
QgsMapClippingRegion::FeatureClippingType | featureClippingType () const |
Returns the feature clipping type to apply when clipping to the associated item. More... | |
void | finalizeRestoreFromXml () |
To be called after all pending items have been restored from XML. More... | |
bool | forceLabelsInsideClipPath () const |
Returns true if labels should only be placed inside the clip path geometry. More... | |
bool | isActive () const |
Returns true if the item clipping is enabled and set to a valid source item. More... | |
bool | readXml (const QDomElement &element, const QDomDocument &doc, const QgsReadWriteContext &context) |
Sets the setting's state from a DOM document, where element is the DOM node corresponding to a 'LayoutMap' tag. More... | |
void | setEnabled (bool enabled) |
Sets whether the map content should be clipped to the associated item. More... | |
void | setFeatureClippingType (QgsMapClippingRegion::FeatureClippingType type) |
Sets the feature clipping type to apply when clipping to the associated item. More... | |
void | setForceLabelsInsideClipPath (bool forceInside) |
Sets whether labels should only be placed inside the clip path geometry. More... | |
void | setSourceItem (QgsLayoutItem *item) |
Sets the source item which will provide the clipping path for the map. More... | |
QgsLayoutItem * | sourceItem () |
Returns the source item which will provide the clipping path for the map, or nullptr if no item is set. More... | |
QgsMapClippingRegion | toMapClippingRegion () const |
Returns the clip path as a map clipping region. More... | |
bool | writeXml (QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const |
Stores settings in a DOM element, where element is the DOM element corresponding to a 'LayoutMap' tag. More... | |
Contains settings relating to clipping a layout map by another layout item.
Definition at line 169 of file qgslayoutitemmap.h.
QgsLayoutItemMapItemClipPathSettings::QgsLayoutItemMapItemClipPathSettings | ( | QgsLayoutItemMap * | map = nullptr | ) |
Constructor for QgsLayoutItemMapItemClipPathSettings, with the specified map parent.
Definition at line 2886 of file qgslayoutitemmap.cpp.
|
signal |
Emitted when the item clipping settings are changed.
QgsGeometry QgsLayoutItemMapItemClipPathSettings::clipPathInMapItemCoordinates | ( | ) | const |
Returns the clipping path geometry, in the map item's coordinate space.
Definition at line 2928 of file qgslayoutitemmap.cpp.
QgsGeometry QgsLayoutItemMapItemClipPathSettings::clippedMapExtent | ( | ) | const |
Returns the geometry to use for clipping the parent map, in the map item's CRS.
Definition at line 2917 of file qgslayoutitemmap.cpp.
bool QgsLayoutItemMapItemClipPathSettings::enabled | ( | ) | const |
Returns true
if the map content should be clipped to the associated item.
Definition at line 2897 of file qgslayoutitemmap.cpp.
QgsMapClippingRegion::FeatureClippingType QgsLayoutItemMapItemClipPathSettings::featureClippingType | ( | ) | const |
Returns the feature clipping type to apply when clipping to the associated item.
Definition at line 2988 of file qgslayoutitemmap.cpp.
void QgsLayoutItemMapItemClipPathSettings::finalizeRestoreFromXml | ( | ) |
To be called after all pending items have been restored from XML.
Definition at line 3043 of file qgslayoutitemmap.cpp.
bool QgsLayoutItemMapItemClipPathSettings::forceLabelsInsideClipPath | ( | ) | const |
Returns true
if labels should only be placed inside the clip path geometry.
Definition at line 3002 of file qgslayoutitemmap.cpp.
bool QgsLayoutItemMapItemClipPathSettings::isActive | ( | ) | const |
Returns true
if the item clipping is enabled and set to a valid source item.
Definition at line 2892 of file qgslayoutitemmap.cpp.
bool QgsLayoutItemMapItemClipPathSettings::readXml | ( | const QDomElement & | element, |
const QDomDocument & | doc, | ||
const QgsReadWriteContext & | context | ||
) |
Sets the setting's state from a DOM document, where element is the DOM node corresponding to a 'LayoutMap' tag.
Definition at line 3031 of file qgslayoutitemmap.cpp.
void QgsLayoutItemMapItemClipPathSettings::setEnabled | ( | bool | enabled | ) |
Sets whether the map content should be clipped to the associated item.
Definition at line 2902 of file qgslayoutitemmap.cpp.
void QgsLayoutItemMapItemClipPathSettings::setFeatureClippingType | ( | QgsMapClippingRegion::FeatureClippingType | type | ) |
Sets the feature clipping type to apply when clipping to the associated item.
Definition at line 2993 of file qgslayoutitemmap.cpp.
void QgsLayoutItemMapItemClipPathSettings::setForceLabelsInsideClipPath | ( | bool | forceInside | ) |
Sets whether labels should only be placed inside the clip path geometry.
Definition at line 3007 of file qgslayoutitemmap.cpp.
void QgsLayoutItemMapItemClipPathSettings::setSourceItem | ( | QgsLayoutItem * | item | ) |
Sets the source item which will provide the clipping path for the map.
The specified item must return the QgsLayoutItem::FlagProvidesClipPath flag.
Definition at line 2946 of file qgslayoutitemmap.cpp.
QgsLayoutItem * QgsLayoutItemMapItemClipPathSettings::sourceItem | ( | ) |
Returns the source item which will provide the clipping path for the map, or nullptr
if no item is set.
Definition at line 2983 of file qgslayoutitemmap.cpp.
QgsMapClippingRegion QgsLayoutItemMapItemClipPathSettings::toMapClippingRegion | ( | ) | const |
Returns the clip path as a map clipping region.
Definition at line 2939 of file qgslayoutitemmap.cpp.
bool QgsLayoutItemMapItemClipPathSettings::writeXml | ( | QDomElement & | element, |
QDomDocument & | document, | ||
const QgsReadWriteContext & | context | ||
) | const |
Stores settings in a DOM element, where element is the DOM element corresponding to a 'LayoutMap' tag.
Definition at line 3016 of file qgslayoutitemmap.cpp.