30 #include <QButtonGroup>
38 , mLayoutObject( layoutObject )
40 if ( mLayoutObject->layout() )
43 this, [ = ] { updateDataDefinedButtons(); } );
51 void QgsLayoutConfigObject::updateDataDefinedProperty()
72 if ( propertyAssociatesWithMultiFrame )
78 multiFrame->dataDefinedProperties().setProperty( key, ddButton->
toProperty() );
79 multiFrame->refresh();
84 multiFrame->dataDefinedProperties().setProperty( key, ddButton->
toProperty() );
85 multiFrame->refresh();
88 else if ( mLayoutObject )
90 mLayoutObject->dataDefinedProperties().setProperty( key, ddButton->
toProperty() );
91 mLayoutObject->refresh();
95 void QgsLayoutConfigObject::updateDataDefinedButtons()
97 const QList< QgsPropertyOverrideButton * > buttons = findChildren< QgsPropertyOverrideButton * >();
106 button->blockSignals(
true );
110 button->blockSignals(
false );
122 whileBlocking( button )->setToProperty( mLayoutObject->dataDefinedProperties().property( key ) );
131 if ( !mLayoutObject )
136 QgsPrintLayout *printLayout = qobject_cast< QgsPrintLayout * >( mLayoutObject->layout() );
143 return printLayout->
atlas();
148 mLayoutObject = object;
153 if ( !mLayoutObject )
156 QgsLayout *layout = mLayoutObject->layout();
171 , mObject( layoutObject )
190 oldConfigObject->deleteLater();
197 mConfigObject->deleteLater();
198 mConfigObject = oldConfigObject;
209 const auto symbolButtonWidgets = findChildren<QgsSymbolButton *>();
212 symbolWidget->setMessageBar( iface->
messageBar() );
214 const auto fontButtonWidgets = findChildren<QgsFontButton *>();
217 fontButton->setMessageBar( iface->
messageBar() );
261 mBlockVariableUpdates =
true;
263 mVariableEditor->setContext( &context );
268 const int multiFrameScopeIndex = context.
indexOfScope( tr(
"Multiframe Item" ) );
269 const int itemScopeIndex = context.
indexOfScope( tr(
"Layout Item" ) );
270 if ( multiFrameScopeIndex >= 0 )
271 mVariableEditor->setEditableScopeIndex( multiFrameScopeIndex );
272 else if ( itemScopeIndex >= 0 )
273 mVariableEditor->setEditableScopeIndex( itemScopeIndex );
274 mBlockVariableUpdates =
false;
283 mVariableEditor->setMinimumHeight( mVariableEditor->fontMetrics().height() * 15 );
285 mItemRotationSpinBox->setClearValue( 0 );
286 mStrokeUnitsComboBox->linkToWidget( mStrokeWidthSpinBox );
289 mPosUnitsComboBox->linkToWidget( mXPosSpin );
290 mPosUnitsComboBox->linkToWidget( mYPosSpin );
291 mSizeUnitsComboBox->linkToWidget( mWidthSpin );
292 mSizeUnitsComboBox->linkToWidget( mHeightSpin );
297 mPosLockAspectRatio->setWidthSpinBox( mXPosSpin );
298 mPosLockAspectRatio->setHeightSpinBox( mYPosSpin );
299 mSizeLockAspectRatio->setWidthSpinBox( mWidthSpin );
300 mSizeLockAspectRatio->setHeightSpinBox( mHeightSpin );
302 mItemFrameColorDDBtn->registerLinkedWidget( mFrameColorButton );
303 mItemBackgroundColorDDBtn->registerLinkedWidget( mBackgroundColorButton );
306 connect( mBackgroundColorButton, &
QgsColorButton::colorChanged,
this, &QgsLayoutItemPropertiesWidget::mBackgroundColorButton_colorChanged );
307 connect( mStrokeWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsLayoutItemPropertiesWidget::mStrokeWidthSpinBox_valueChanged );
309 connect( mFrameGroupBox, &QgsCollapsibleGroupBoxBasic::toggled,
this, &QgsLayoutItemPropertiesWidget::mFrameGroupBox_toggled );
310 connect( mFrameJoinStyleCombo,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsLayoutItemPropertiesWidget::mFrameJoinStyleCombo_currentIndexChanged );
311 connect( mBackgroundGroupBox, &QgsCollapsibleGroupBoxBasic::toggled,
this, &QgsLayoutItemPropertiesWidget::mBackgroundGroupBox_toggled );
312 connect( mItemIdLineEdit, &QLineEdit::editingFinished,
this, &QgsLayoutItemPropertiesWidget::mItemIdLineEdit_editingFinished );
313 connect( mPageSpinBox,
static_cast < void ( QSpinBox::* )(
int )
> ( &QSpinBox::valueChanged ),
this, &QgsLayoutItemPropertiesWidget::mPageSpinBox_valueChanged );
314 connect( mXPosSpin,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsLayoutItemPropertiesWidget::mXPosSpin_valueChanged );
315 connect( mYPosSpin,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsLayoutItemPropertiesWidget::mYPosSpin_valueChanged );
317 connect( mWidthSpin,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsLayoutItemPropertiesWidget::mWidthSpin_valueChanged );
318 connect( mHeightSpin,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsLayoutItemPropertiesWidget::mHeightSpin_valueChanged );
320 connect( mUpperLeftRadioButton, &QRadioButton::toggled,
this, &QgsLayoutItemPropertiesWidget::mUpperLeftCheckBox_stateChanged );
321 connect( mUpperMiddleRadioButton, &QRadioButton::toggled,
this, &QgsLayoutItemPropertiesWidget::mUpperMiddleCheckBox_stateChanged );
322 connect( mUpperRightRadioButton, &QRadioButton::toggled,
this, &QgsLayoutItemPropertiesWidget::mUpperRightCheckBox_stateChanged );
323 connect( mMiddleLeftRadioButton, &QRadioButton::toggled,
this, &QgsLayoutItemPropertiesWidget::mMiddleLeftCheckBox_stateChanged );
324 connect( mMiddleRadioButton, &QRadioButton::toggled,
this, &QgsLayoutItemPropertiesWidget::mMiddleCheckBox_stateChanged );
325 connect( mMiddleRightRadioButton, &QRadioButton::toggled,
this, &QgsLayoutItemPropertiesWidget::mMiddleRightCheckBox_stateChanged );
326 connect( mLowerLeftRadioButton, &QRadioButton::toggled,
this, &QgsLayoutItemPropertiesWidget::mLowerLeftCheckBox_stateChanged );
327 connect( mLowerMiddleRadioButton, &QRadioButton::toggled,
this, &QgsLayoutItemPropertiesWidget::mLowerMiddleCheckBox_stateChanged );
328 connect( mLowerRightRadioButton, &QRadioButton::toggled,
this, &QgsLayoutItemPropertiesWidget::mLowerRightCheckBox_stateChanged );
329 connect( mBlendModeCombo,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsLayoutItemPropertiesWidget::mBlendModeCombo_currentIndexChanged );
330 connect( mItemRotationSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsLayoutItemPropertiesWidget::mItemRotationSpinBox_valueChanged );
331 connect( mExcludeFromPrintsCheckBox, &QCheckBox::toggled,
this, &QgsLayoutItemPropertiesWidget::mExcludeFromPrintsCheckBox_toggled );
334 QButtonGroup *buttonGroup =
new QButtonGroup(
this );
335 buttonGroup->addButton( mUpperLeftRadioButton );
336 buttonGroup->addButton( mUpperMiddleRadioButton );
337 buttonGroup->addButton( mUpperRightRadioButton );
338 buttonGroup->addButton( mMiddleLeftRadioButton );
339 buttonGroup->addButton( mMiddleRadioButton );
340 buttonGroup->addButton( mMiddleRightRadioButton );
341 buttonGroup->addButton( mLowerLeftRadioButton );
342 buttonGroup->addButton( mLowerMiddleRadioButton );
343 buttonGroup->addButton( mLowerRightRadioButton );
344 buttonGroup->setExclusive(
true );
355 if ( !mBlockVariableUpdates )
356 QgsLayoutItemPropertiesWidget::variablesChanged();
373 mBackgroundGroupBox->setVisible( showGroup );
378 mFrameGroupBox->setVisible( showGroup );
386 disconnect( mItem, &
QgsLayoutObject::changed,
this, &QgsLayoutItemPropertiesWidget::setValuesForGuiNonPositionElements );
392 connect( mItem, &
QgsLayoutObject::changed,
this, &QgsLayoutItemPropertiesWidget::setValuesForGuiNonPositionElements );
397 setValuesForGuiElements();
411 void QgsLayoutItemPropertiesWidget::mFrameColorButton_colorChanged(
const QColor &newFrameColor )
418 mItem->setFrameStrokeColor( newFrameColor );
419 mItem->layout()->undoStack()->endCommand();
423 void QgsLayoutItemPropertiesWidget::mBackgroundColorButton_colorChanged(
const QColor &newBackgroundColor )
430 mItem->setBackgroundColor( newBackgroundColor );
431 mItem->layout()->undoStack()->endCommand();
432 mItem->invalidateCache();
435 void QgsLayoutItemPropertiesWidget::changeItemPosition()
442 QgsLayoutPoint point( mXPosSpin->value(), mYPosSpin->value(), mPosUnitsComboBox->unit() );
443 mItem->attemptMove( point,
true,
false, mPageSpinBox->value() - 1 );
445 mItem->layout()->undoStack()->endCommand();
453 mItem->layout()->undoStack()->beginCommand( mItem, tr(
"Change Item Reference" ) );
454 mItem->setReferencePoint( point );
455 mItem->layout()->undoStack()->endCommand();
458 void QgsLayoutItemPropertiesWidget::changeItemSize()
465 QgsLayoutSize size( mWidthSpin->value(), mHeightSpin->value(), mSizeUnitsComboBox->unit() );
466 mItem->attemptResize( size );
468 mItem->layout()->undoStack()->endCommand();
471 void QgsLayoutItemPropertiesWidget::variablesChanged()
476 if (
QgsLayoutFrame *frame = qobject_cast< QgsLayoutFrame * >( mItem ) )
491 if ( mUpperLeftRadioButton->isChecked() )
495 else if ( mUpperMiddleRadioButton->isChecked() )
499 else if ( mUpperRightRadioButton->isChecked() )
503 else if ( mMiddleLeftRadioButton->isChecked() )
507 else if ( mMiddleRadioButton->isChecked() )
511 else if ( mMiddleRightRadioButton->isChecked() )
515 else if ( mLowerLeftRadioButton->isChecked() )
519 else if ( mLowerMiddleRadioButton->isChecked() )
523 else if ( mLowerRightRadioButton->isChecked() )
530 void QgsLayoutItemPropertiesWidget::mStrokeWidthSpinBox_valueChanged(
double d )
539 mItem->layout()->undoStack()->endCommand();
551 mItem->layout()->undoStack()->endCommand();
554 void QgsLayoutItemPropertiesWidget::mFrameJoinStyleCombo_currentIndexChanged(
int index )
562 mItem->layout()->undoStack()->beginCommand( mItem, tr(
"Change Frame Join Style" ) );
563 mItem->setFrameJoinStyle( mFrameJoinStyleCombo->penJoinStyle() );
564 mItem->layout()->undoStack()->endCommand();
567 void QgsLayoutItemPropertiesWidget::mFrameGroupBox_toggled(
bool state )
574 mItem->layout()->undoStack()->beginCommand( mItem, state ? tr(
"Enable Frame" ) : tr(
"Disable Frame" ) );
575 mItem->setFrameEnabled( state );
577 mItem->layout()->undoStack()->endCommand();
580 void QgsLayoutItemPropertiesWidget::mBackgroundGroupBox_toggled(
bool state )
587 mItem->layout()->undoStack()->beginCommand( mItem, state ? tr(
"Enable Background" ) : tr(
"Disable Background" ) );
588 mItem->setBackgroundEnabled( state );
589 mItem->layout()->undoStack()->endCommand();
590 mItem->invalidateCache();
594 void QgsLayoutItemPropertiesWidget::setValuesForGuiPositionElements()
601 auto block = [ = ](
bool blocked )
603 mXPosSpin->blockSignals( blocked );
604 mYPosSpin->blockSignals( blocked );
605 mPosUnitsComboBox->blockSignals( blocked );
606 mWidthSpin->blockSignals( blocked );
607 mHeightSpin->blockSignals( blocked );
608 mSizeUnitsComboBox->blockSignals( blocked );
609 mUpperLeftRadioButton->blockSignals( blocked );
610 mUpperMiddleRadioButton->blockSignals( blocked );
611 mUpperRightRadioButton->blockSignals( blocked );
612 mMiddleLeftRadioButton->blockSignals( blocked );
613 mMiddleRadioButton->blockSignals( blocked );
614 mMiddleRightRadioButton->blockSignals( blocked );
615 mLowerLeftRadioButton->blockSignals( blocked );
616 mLowerMiddleRadioButton->blockSignals( blocked );
617 mLowerRightRadioButton->blockSignals( blocked );
618 mPageSpinBox->blockSignals( blocked );
624 if ( !mFreezeXPosSpin )
625 mXPosSpin->setValue( point.
x() );
626 if ( !mFreezeYPosSpin )
627 mYPosSpin->setValue( point.
y() );
628 mPosUnitsComboBox->setUnit( point.
units() );
630 switch ( mItem->referencePoint() )
634 mUpperLeftRadioButton->setChecked(
true );
640 mUpperMiddleRadioButton->setChecked(
true );
646 mUpperRightRadioButton->setChecked(
true );
652 mMiddleLeftRadioButton->setChecked(
true );
658 mMiddleRadioButton->setChecked(
true );
664 mMiddleRightRadioButton->setChecked(
true );
670 mLowerLeftRadioButton->setChecked(
true );
676 mLowerMiddleRadioButton->setChecked(
true );
682 mLowerRightRadioButton->setChecked(
true );
688 if ( !mFreezeWidthSpin )
689 mWidthSpin->setValue( size.
width() );
690 if ( !mFreezeHeightSpin )
691 mHeightSpin->setValue( size.
height() );
693 mSizeUnitsComboBox->setUnit( size.
units() );
695 mSizeLockAspectRatio->resetRatio();
696 mPosLockAspectRatio->resetRatio();
698 if ( !mFreezePageSpin )
699 mPageSpinBox->setValue( mItem->page() + 1 );
704 void QgsLayoutItemPropertiesWidget::setValuesForGuiNonPositionElements()
711 auto block = [ = ](
bool blocked )
713 mStrokeWidthSpinBox->blockSignals( blocked );
714 mStrokeUnitsComboBox->blockSignals( blocked );
715 mFrameGroupBox->blockSignals( blocked );
716 mBackgroundGroupBox->blockSignals( blocked );
717 mItemIdLineEdit->blockSignals( blocked );
718 mBlendModeCombo->blockSignals( blocked );
719 mOpacityWidget->blockSignals( blocked );
720 mFrameColorButton->blockSignals( blocked );
721 mFrameJoinStyleCombo->blockSignals( blocked );
722 mBackgroundColorButton->blockSignals( blocked );
723 mItemRotationSpinBox->blockSignals( blocked );
724 mExcludeFromPrintsCheckBox->blockSignals( blocked );
728 mBackgroundColorButton->setColor( mItem->backgroundColor() );
729 mFrameColorButton->setColor( mItem->frameStrokeColor() );
730 mStrokeUnitsComboBox->setUnit( mItem->frameStrokeWidth().units() );
731 mStrokeWidthSpinBox->setValue( mItem->frameStrokeWidth().length() );
732 mFrameJoinStyleCombo->setPenJoinStyle( mItem->frameJoinStyle() );
733 mItemIdLineEdit->setText( mItem->id() );
734 mFrameGroupBox->setChecked( mItem->frameEnabled() );
735 mBackgroundGroupBox->setChecked( mItem->hasBackground() );
736 mBlendModeCombo->setBlendMode( mItem->blendMode() );
737 mOpacityWidget->setOpacity( mItem->itemOpacity() );
738 mItemRotationSpinBox->setValue( mItem->itemRotation() );
739 mExcludeFromPrintsCheckBox->setChecked( mItem->excludeFromExports() );
760 const QList< QgsPropertyOverrideButton * > buttons = findChildren< QgsPropertyOverrideButton * >();
767 void QgsLayoutItemPropertiesWidget::setValuesForGuiElements()
774 mBackgroundColorButton->setColorDialogTitle( tr(
"Select Background Color" ) );
775 mBackgroundColorButton->setAllowOpacity(
true );
776 mBackgroundColorButton->setContext( QStringLiteral(
"composer" ) );
777 mFrameColorButton->setColorDialogTitle( tr(
"Select Frame Color" ) );
778 mFrameColorButton->setAllowOpacity(
true );
779 mFrameColorButton->setContext( QStringLiteral(
"composer" ) );
781 setValuesForGuiPositionElements();
782 setValuesForGuiNonPositionElements();
788 void QgsLayoutItemPropertiesWidget::mBlendModeCombo_currentIndexChanged(
int index )
793 mItem->layout()->undoStack()->beginCommand( mItem, tr(
"Change Blend Mode" ) );
794 mItem->setBlendMode( mBlendModeCombo->blendMode() );
795 mItem->layout()->undoStack()->endCommand();
799 void QgsLayoutItemPropertiesWidget::opacityChanged(
double value )
804 mItem->setItemOpacity( value );
805 mItem->layout()->undoStack()->endCommand();
809 void QgsLayoutItemPropertiesWidget::mItemIdLineEdit_editingFinished()
814 mItem->setId( mItemIdLineEdit->text() );
815 mItemIdLineEdit->setText( mItem->id() );
816 mItem->layout()->undoStack()->endCommand();
820 void QgsLayoutItemPropertiesWidget::mPageSpinBox_valueChanged(
int )
822 mFreezePageSpin =
true;
823 changeItemPosition();
824 mFreezePageSpin =
false;
827 void QgsLayoutItemPropertiesWidget::mXPosSpin_valueChanged(
double )
829 mFreezeXPosSpin =
true;
830 changeItemPosition();
831 mFreezeXPosSpin =
false;
834 void QgsLayoutItemPropertiesWidget::mYPosSpin_valueChanged(
double )
836 mFreezeYPosSpin =
true;
837 changeItemPosition();
838 mFreezeYPosSpin =
false;
843 changeItemPosition();
846 void QgsLayoutItemPropertiesWidget::mWidthSpin_valueChanged(
double )
848 mFreezeWidthSpin =
true;
850 mFreezeWidthSpin =
false;
853 void QgsLayoutItemPropertiesWidget::mHeightSpin_valueChanged(
double )
855 mFreezeHeightSpin =
true;
857 mFreezeHeightSpin =
false;
865 void QgsLayoutItemPropertiesWidget::mUpperLeftCheckBox_stateChanged(
bool state )
874 setValuesForGuiPositionElements();
877 void QgsLayoutItemPropertiesWidget::mUpperMiddleCheckBox_stateChanged(
bool state )
885 setValuesForGuiPositionElements();
888 void QgsLayoutItemPropertiesWidget::mUpperRightCheckBox_stateChanged(
bool state )
896 setValuesForGuiPositionElements();
899 void QgsLayoutItemPropertiesWidget::mMiddleLeftCheckBox_stateChanged(
bool state )
907 setValuesForGuiPositionElements();
910 void QgsLayoutItemPropertiesWidget::mMiddleCheckBox_stateChanged(
bool state )
918 setValuesForGuiPositionElements();
921 void QgsLayoutItemPropertiesWidget::mMiddleRightCheckBox_stateChanged(
bool state )
929 setValuesForGuiPositionElements();
932 void QgsLayoutItemPropertiesWidget::mLowerLeftCheckBox_stateChanged(
bool state )
940 setValuesForGuiPositionElements();
943 void QgsLayoutItemPropertiesWidget::mLowerMiddleCheckBox_stateChanged(
bool state )
951 setValuesForGuiPositionElements();
954 void QgsLayoutItemPropertiesWidget::mLowerRightCheckBox_stateChanged(
bool state )
962 setValuesForGuiPositionElements();
965 void QgsLayoutItemPropertiesWidget::mItemRotationSpinBox_valueChanged(
double val )
970 mItem->setItemRotation( val,
true );
972 mItem->layout()->undoStack()->endCommand();
976 void QgsLayoutItemPropertiesWidget::mExcludeFromPrintsCheckBox_toggled(
bool checked )
980 mItem->layout()->undoStack()->beginCommand( mItem, checked ? tr(
"Exclude from Exports" ) : tr(
"Include in Exports" ) );
981 mItem->setExcludeFromExports( checked );
982 mItem->layout()->undoStack()->endCommand();
void customVariablesChanged()
Emitted whenever a custom global variable changes.
static QgsApplication * instance()
Returns the singleton instance of the QgsApplication.
static void setLayoutItemVariables(QgsLayoutItem *item, const QVariantMap &variables)
Sets all layout item context variables for an item.
static void setLayoutMultiFrameVariables(QgsLayoutMultiFrame *frame, const QVariantMap &variables)
Sets all layout multiframe context variables for an frame.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
int indexOfScope(QgsExpressionContextScope *scope) const
Returns the index of the specified scope if it exists within the context.
Class used to render QgsLayout as an atlas, by iterating over the features from an associated vector ...
void toggled(bool)
Emitted when atlas is enabled or disabled.
void coverageLayerChanged(QgsVectorLayer *layer)
Emitted when the coverage layer for the atlas changes.
An object for property widgets for layout items.
QgsLayoutAtlas * layoutAtlas() const
Returns the atlas for the layout, if available.
void setObject(QgsLayoutObject *object) SIP_SKIP
Links a new layout object to this QgsLayoutConfigObject.
void initializeDataDefinedButton(QgsPropertyOverrideButton *button, QgsLayoutObject::DataDefinedProperty key)
Registers a data defined button, setting up its initial value, connections and description.
QgsVectorLayer * coverageLayer() const
Returns the current layout context coverage layer (if set).
void updateDataDefinedButton(QgsPropertyOverrideButton *button)
Updates a data defined button to reflect the item's current properties.
QgsLayoutConfigObject(QWidget *parent SIP_TRANSFERTHIS, QgsLayoutObject *layoutObject)
Constructor for QgsLayoutConfigObject, linked with the specified layoutObject.
A common interface for layout designer dialogs and widgets.
virtual QgsMessageBar * messageBar()=0
Returns the designer's message bar.
Base class for frame items, which form a layout multiframe item.
Base class for graphical items within a QgsLayout.
@ UndoIncrementalMove
Layout item incremental movement, e.g. as a result of a keypress.
@ UndoBackgroundColor
Background color adjustment.
@ UndoOpacity
Opacity adjustment.
@ UndoIncrementalResize
Incremental resize.
@ UndoRotation
Rotation adjustment.
@ UndoStrokeWidth
Stroke width adjustment.
@ UndoSetId
Change item ID.
@ UndoStrokeColor
Stroke color adjustment.
ReferencePoint
Fixed position reference point.
@ LowerMiddle
Lower center of item.
@ MiddleLeft
Middle left of item.
@ UpperRight
Upper right corner of item.
@ LowerLeft
Lower left corner of item.
@ UpperLeft
Upper left corner of item.
@ UpperMiddle
Upper center of item.
@ MiddleRight
Middle right of item.
@ LowerRight
Lower right corner of item.
void sizePositionChanged()
Emitted when the item's size or position changes.
This class provides a method of storing measurements for use in QGIS layouts using a variety of diffe...
Abstract base class for layout items with the ability to distribute the content to several frames (Qg...
A base class for objects which belong to a layout.
static const QgsPropertiesDefinition & propertyDefinitions()
Returns the layout object property definitions.
const QgsLayout * layout() const
Returns the layout the object is attached to.
void changed()
Emitted when the object's properties change.
DataDefinedProperty
Data defined properties for different item types.
@ ItemWidth
Width of item.
@ ItemHeight
Height of item.
@ BlendMode
Item blend mode.
@ PositionY
Y position on page.
@ ExcludeFromExports
Exclude item from exports.
@ BackgroundColor
Item background color.
@ ItemRotation
Rotation of item.
@ PositionX
X position on page.
@ FrameColor
Item frame color.
static bool propertyAssociatesWithParentMultiframe(DataDefinedProperty property)
Returns true if the specified property key is normally associated with the parent QgsLayoutMultiFrame...
void changed()
Emitted when pages are added or removed from the collection.
This class provides a method of storing points, consisting of an x and y coordinate,...
double x() const
Returns x coordinate of point.
QgsUnitTypes::LayoutUnit units() const
Returns the units for the point.
double y() const
Returns y coordinate of point.
void dpiChanged()
Emitted when the context's DPI is changed.
const QgsLayoutMeasurementConverter & measurementConverter() const
Returns the layout measurement converter to be used in the layout.
void layerChanged(QgsVectorLayer *layer)
Emitted when the context's layer is changed.
QgsVectorLayer * layer() const
Returns the vector layer associated with the layout's context.
This class provides a method of storing sizes, consisting of a width and height, for use in QGIS layo...
QgsUnitTypes::LayoutUnit units() const
Returns the units for the size.
double height() const
Returns the height of the size.
double width() const
Returns the width of the size.
void changed(QgsUnitTypes::LayoutUnit unit)
Emitted when the unit is changed.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
QgsLayoutRenderContext & renderContext()
Returns a reference to the layout's render context, which stores information relating to the current ...
QgsLayoutPageCollection * pageCollection()
Returns a pointer to the layout's page collection, which stores and manages page items in the layout.
void variablesChanged()
Emitted whenever the expression variables stored in the layout have been changed.
QgsLayoutReportContext & reportContext()
Returns a reference to the layout's report context, which stores information relating to the current ...
QgsProject * project() const
The project associated with the layout.
Interface for master layout type objects, such as print layouts and reports.
Print layout, a QgsLayout subclass for static or atlas-based layouts.
QgsLayoutAtlas * atlas()
Returns the print layout's atlas.
void nameChanged(const QString &name)
Emitted when the layout's name is changed.
void metadataChanged()
Emitted when the project's metadata is changed.
void customVariablesChanged()
Emitted whenever the expression variables stored in the project have been changed.
LayoutUnit
Layout measurement units.
Represents a vector layer which manages a vector based data sets.
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.