17#include "moc_qgsannotationitemcommonpropertieswidget.cpp"
28 connect( mSpinZIndex, qOverload<int>( &QSpinBox::valueChanged ),
this, [=] {
29 if ( !mBlockChangedSignal )
32 mSpinZIndex->setClearValue( 0 );
34 connect( mReferenceScaleGroup, &QGroupBox::toggled,
this, [=] {
35 if ( !mBlockChangedSignal )
39 if ( !mBlockChangedSignal )
42 connect( mCalloutCheckBox, &QCheckBox::toggled,
this, [=] {
43 if ( !mBlockChangedSignal )
47 connect( mCalloutPropertiesButton, &QToolButton::clicked,
this, &QgsAnnotationItemCommonPropertiesWidget::openCalloutProperties );
54 mSpinZIndex->setValue( item->
zIndex() );
58 mCalloutCheckBox->setChecked( item->
callout() );
67 item->
setCallout( mCallout && mCalloutCheckBox->isChecked() ? mCallout->clone() : nullptr );
75 mReferenceScaleWidget->setShowCurrentScaleButton(
true );
83void QgsAnnotationItemCommonPropertiesWidget::openCalloutProperties()
92 if ( !mBlockChangedSignal )
98 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.