17#include "moc_qgsannotationitemcommonpropertieswidget.cpp"
28 connect( mSpinZIndex, qOverload<int>( &QSpinBox::valueChanged ),
this, [ = ]
30 if ( !mBlockChangedSignal )
33 mSpinZIndex->setClearValue( 0 );
35 connect( mReferenceScaleGroup, &QGroupBox::toggled,
this, [ = ]
37 if ( !mBlockChangedSignal )
42 if ( !mBlockChangedSignal )
45 connect( mCalloutCheckBox, &QCheckBox::toggled,
this, [ = ]
47 if ( !mBlockChangedSignal )
51 connect( mCalloutPropertiesButton, &QToolButton::clicked,
this, &QgsAnnotationItemCommonPropertiesWidget::openCalloutProperties );
58 mSpinZIndex->setValue( item->
zIndex() );
62 mCalloutCheckBox->setChecked( item->
callout() );
71 item->
setCallout( mCallout && mCalloutCheckBox->isChecked() ? mCallout->clone() : nullptr );
79 mReferenceScaleWidget->setShowCurrentScaleButton(
true );
87void QgsAnnotationItemCommonPropertiesWidget::openCalloutProperties()
97 if ( !mBlockChangedSignal )
103 panel->openPanel( widget );
@ SupportsReferenceScale
Item supports reference scale based rendering.
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
void setUseSymbologyReferenceScale(bool enabled)
Sets whether the annotation item uses a symbology reference scale.
void setZIndex(int index)
Sets the item's z index, which controls the order in which annotation items are rendered in the layer...
bool useSymbologyReferenceScale() const
Returns true if the annotation item uses a symbology reference scale.
void setCallout(QgsCallout *callout)
Sets the item's callout renderer, responsible for drawing item callouts.
void setSymbologyReferenceScale(double scale)
Sets the annotation's symbology reference scale.
virtual Qgis::AnnotationItemFlags flags() const
Returns item flags.
int zIndex() const
Returns the item's z index, which controls the order in which annotation items are rendered in the la...
QgsCallout * callout() const
Returns the item's callout renderer, responsible for drawing item callouts.
double symbologyReferenceScale() const
Returns the annotation's symbology reference scale.
static QgsCalloutRegistry * calloutRegistry()
Returns the application's callout registry, used for managing callout types.
virtual QgsCallout * clone() const =0
Duplicates a callout by creating a deep copy of the callout.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
void setMapCanvas(QgsMapCanvas *canvas)
Sets the map canvas associated with the widget.
QgsMapCanvas * mapCanvas() const
Returns the map canvas associated with the widget.