18#include "moc_qgslayoutpolygonwidget.cpp"
38 mainLayout->addWidget( mItemPropertiesWidget );
46 mPolygonStyleButton->registerExpressionContextGenerator( mPolygon );
49 setGuiElementValues();
51 mPolygonStyleButton->registerExpressionContextGenerator( mPolygon );
53 if ( mPolygon->layout() )
61 if ( mItemPropertiesWidget )
75 mPolygon = qobject_cast< QgsLayoutItemPolygon * >( item );
76 mItemPropertiesWidget->
setItem( mPolygon );
81 mPolygonStyleButton->registerExpressionContextGenerator( mPolygon );
83 setGuiElementValues();
88void QgsLayoutPolygonWidget::setGuiElementValues()
95 whileBlocking( mPolygonStyleButton )->setSymbol( mPolygon->symbol()->clone() );
98void QgsLayoutPolygonWidget::symbolChanged()
104 mPolygon->setSymbol( mPolygonStyleButton->clonedSymbol<
QgsFillSymbol>() );
105 mPolygon->layout()->undoStack()->endCommand();
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
Layout item for node based polygon shapes.
@ LayoutPolygon
Polygon shape item.
Base class for graphical items within a QgsLayout.
@ UndoShapeStyle
Shape symbol style.
int type() const override
Returns a unique graphics item type identifier.
void changed()
Emitted when the object's properties change.
void layerChanged(QgsVectorLayer *layer)
Emitted when the context's layer is changed.
Interface for master layout type objects, such as print layouts and reports.
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.