26#include "moc_qgslayoutpolygonwidget.cpp"
38 mItemPropertiesWidget->showBackgroundGroup(
false );
39 mItemPropertiesWidget->showFrameGroup(
false );
40 mainLayout->addWidget( mItemPropertiesWidget );
48 mPolygonStyleButton->registerExpressionContextGenerator( mPolygon );
51 setGuiElementValues();
53 mPolygonStyleButton->registerExpressionContextGenerator( mPolygon );
55 if ( mPolygon->layout() )
63 if ( mItemPropertiesWidget )
64 mItemPropertiesWidget->setMasterLayout( masterLayout );
77 mPolygon = qobject_cast<QgsLayoutItemPolygon *>( item );
78 mItemPropertiesWidget->setItem( mPolygon );
83 mPolygonStyleButton->registerExpressionContextGenerator( mPolygon );
85 setGuiElementValues();
90void QgsLayoutPolygonWidget::setGuiElementValues()
97 whileBlocking( mPolygonStyleButton )->setSymbol( mPolygon->symbol()->clone() );
100void QgsLayoutPolygonWidget::symbolChanged()
106 mPolygon->setSymbol( mPolygonStyleButton->clonedSymbol<QgsFillSymbol>() );
107 mPolygon->layout()->undoStack()->endCommand();
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.