42 #include "qgssettings.h" 
   51 #include <QAbstractButton> 
   52 #include <QButtonGroup> 
   53 #include <QColorDialog> 
   56 #include <QFileDialog> 
   58 #include <QStandardItemModel> 
   59 #include <QSvgRenderer> 
   60 #include <QMessageBox> 
   63 #include <QInputDialog> 
   65 #include <QRegularExpression> 
   70     return *lExpressionContext;
 
   81   expContext << symbolScope;
 
  102   QStringList highlights;
 
  108              << QStringLiteral( 
"symbol_layer_count" ) << QStringLiteral( 
"symbol_layer_index" );
 
  111   if ( expContext.
hasVariable( QStringLiteral( 
"zoom_level" ) ) )
 
  113     highlights << QStringLiteral( 
"zoom_level" );
 
  115   if ( expContext.
hasVariable( QStringLiteral( 
"vector_tile_zoom" ) ) )
 
  117     highlights << QStringLiteral( 
"vector_tile_zoom" );
 
  128   const auto unitSelectionWidgets = findChildren<QgsUnitSelectionWidget *>();
 
  131     unitWidget->setMapCanvas( mContext.
mapCanvas() );
 
  149 void QgsSymbolLayerWidget::createAuxiliaryField()
 
  170     if ( dlg.exec() == QDialog::Accepted )
 
  171       def = dlg.propertyDefinition();
 
  181   property.setActive( 
true );
 
  203   connect( mCustomCheckBox, &QCheckBox::stateChanged, 
this, &QgsSimpleLineSymbolLayerWidget::mCustomCheckBox_stateChanged );
 
  204   connect( mChangePatternButton, &QPushButton::clicked, 
this, &QgsSimpleLineSymbolLayerWidget::mChangePatternButton_clicked );
 
  208   connect( mDrawInsideCheckBox, &QCheckBox::stateChanged, 
this, &QgsSimpleLineSymbolLayerWidget::mDrawInsideCheckBox_stateChanged );
 
  210   connect( mCheckAlignDash, &QCheckBox::toggled, 
this, [ = ]
 
  212     mCheckDashCorners->setEnabled( mCheckAlignDash->isChecked() );
 
  213     if ( !mCheckAlignDash->isChecked() )
 
  214       mCheckDashCorners->setChecked( 
false );
 
  222   connect( mCheckDashCorners, &QCheckBox::toggled, 
this, [ = ]
 
  244   btnChangeColor->setAllowOpacity( 
true );
 
  245   btnChangeColor->setColorDialogTitle( tr( 
"Select Line Color" ) );
 
  246   btnChangeColor->setContext( QStringLiteral( 
"symbology" ) );
 
  248   mColorDDBtn->registerLinkedWidget( btnChangeColor );
 
  253   connect( mRingFilterComboBox, qOverload< int >( &QComboBox::currentIndexChanged ), 
this, [ = ]( 
int )
 
  262   spinOffset->setClearValue( 0.0 );
 
  263   spinPatternOffset->setClearValue( 0.0 );
 
  265   mTrimStartDistanceSpin->setClearValue( 0.0 );
 
  266   mTrimDistanceEndSpin->setClearValue( 0.0 );
 
  272     mPenWidthDDBtn->setSymbol( mAssistantPreviewSymbol );
 
  274   connect( spinWidth, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleLineSymbolLayerWidget::penWidthChanged );
 
  276   connect( cboPenStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleLineSymbolLayerWidget::penStyleChanged );
 
  277   connect( spinOffset, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleLineSymbolLayerWidget::offsetChanged );
 
  278   connect( cboCapStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleLineSymbolLayerWidget::penStyleChanged );
 
  279   connect( cboJoinStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleLineSymbolLayerWidget::penStyleChanged );
 
  280   connect( spinPatternOffset, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleLineSymbolLayerWidget::patternOffsetChanged );
 
  282   connect( mTrimStartDistanceSpin, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, [ = ]( 
double value )
 
  299   connect( mTrimDistanceEndSpin, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, [ = ]( 
double value )
 
  325 void QgsSimpleLineSymbolLayerWidget::updateAssistantSymbol()
 
  327   for ( 
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1 ; i >= 0; --i )
 
  329     mAssistantPreviewSymbol->deleteSymbolLayer( i );
 
  331   mAssistantPreviewSymbol->appendSymbolLayer( 
mLayer->
clone() );
 
  334     mAssistantPreviewSymbol->setDataDefinedWidth( ddWidth );
 
  340   if ( !layer || layer->
layerType() != QLatin1String( 
"SimpleLine" ) )
 
  347   mPenWidthUnitWidget->blockSignals( 
true );
 
  350   mPenWidthUnitWidget->blockSignals( 
false );
 
  351   mOffsetUnitWidget->blockSignals( 
true );
 
  354   mOffsetUnitWidget->blockSignals( 
false );
 
  355   mDashPatternUnitWidget->blockSignals( 
true );
 
  358   mDashPatternUnitWidget->blockSignals( 
false );
 
  368   spinWidth->blockSignals( 
true );
 
  370   spinWidth->blockSignals( 
false );
 
  371   btnChangeColor->blockSignals( 
true );
 
  373   btnChangeColor->blockSignals( 
false );
 
  374   spinOffset->blockSignals( 
true );
 
  376   spinOffset->blockSignals( 
false );
 
  377   cboPenStyle->blockSignals( 
true );
 
  378   cboJoinStyle->blockSignals( 
true );
 
  379   cboCapStyle->blockSignals( 
true );
 
  383   cboPenStyle->blockSignals( 
false );
 
  384   cboJoinStyle->blockSignals( 
false );
 
  385   cboCapStyle->blockSignals( 
false );
 
  392   mChangePatternButton->setEnabled( useCustomDashPattern );
 
  393   label_3->setEnabled( !useCustomDashPattern );
 
  394   cboPenStyle->setEnabled( !useCustomDashPattern );
 
  395   mCustomCheckBox->blockSignals( 
true );
 
  396   mCustomCheckBox->setCheckState( useCustomDashPattern ? Qt::Checked : Qt::Unchecked );
 
  397   mCustomCheckBox->blockSignals( 
false );
 
  400   QSize size = mChangePatternButton->minimumSizeHint();
 
  402   mChangePatternButton->setMinimumSize( QSize( size.width(), std::max( size.height(), fontHeight ) ) );
 
  406   whileBlocking( mDrawInsideCheckBox )->setCheckState( drawInsidePolygon ? Qt::Checked : Qt::Unchecked );
 
  427   updateAssistantSymbol();
 
  444       mDrawInsideCheckBox->hide();
 
  445       mRingFilterComboBox->hide();
 
  455 void QgsSimpleLineSymbolLayerWidget::penWidthChanged()
 
  462 void QgsSimpleLineSymbolLayerWidget::colorChanged( 
const QColor &color )
 
  468 void QgsSimpleLineSymbolLayerWidget::penStyleChanged()
 
  477 void QgsSimpleLineSymbolLayerWidget::offsetChanged()
 
  484 void QgsSimpleLineSymbolLayerWidget::patternOffsetChanged()
 
  491 void QgsSimpleLineSymbolLayerWidget::mCustomCheckBox_stateChanged( 
int state )
 
  493   bool checked = ( state == Qt::Checked );
 
  494   mChangePatternButton->setEnabled( checked );
 
  495   label_3->setEnabled( !checked );
 
  496   cboPenStyle->setEnabled( !checked );
 
  502 void QgsSimpleLineSymbolLayerWidget::mChangePatternButton_clicked()
 
  509     widget->
setUnit( mDashPatternUnitWidget->unit() );
 
  521   d.setUnit( mDashPatternUnitWidget->unit() );
 
  522   if ( d.exec() == QDialog::Accepted )
 
  530 void QgsSimpleLineSymbolLayerWidget::mPenWidthUnitWidget_changed()
 
  541 void QgsSimpleLineSymbolLayerWidget::mOffsetUnitWidget_changed()
 
  551 void QgsSimpleLineSymbolLayerWidget::mDashPatternUnitWidget_changed()
 
  562 void QgsSimpleLineSymbolLayerWidget::mDrawInsideCheckBox_stateChanged( 
int state )
 
  564   bool checked = ( state == Qt::Checked );
 
  569 void QgsSimpleLineSymbolLayerWidget::patternOffsetUnitChanged()
 
  586   std::unique_ptr< QgsSimpleLineSymbolLayer > layerCopy( 
mLayer->
clone() );
 
  591   QColor color = qApp->palette().color( QPalette::WindowText );
 
  592   layerCopy->setColor( color );
 
  594   layerCopy->setOffset( 0 );
 
  595   layerCopy->setUseCustomDashPattern( 
true );
 
  597   QSize currentIconSize;
 
  600   currentIconSize = QSize( mChangePatternButton->width() - 10, mChangePatternButton->height() - 6 );
 
  602   currentIconSize = QSize( mChangePatternButton->width() - 10, mChangePatternButton->height() - 12 );
 
  605   if ( !currentIconSize.isValid() || currentIconSize.width() <= 0 || currentIconSize.height() <= 0 )
 
  611   std::unique_ptr< QgsLineSymbol > previewSymbol = std::make_unique< QgsLineSymbol >( 
QgsSymbolLayerList() << layerCopy.release() );
 
  613   mChangePatternButton->setIconSize( currentIconSize );
 
  614   mChangePatternButton->setIcon( icon );
 
  618   int width = 
static_cast< int >( 
Qgis::UI_SCALE_FACTOR * fontMetrics().horizontalAdvance( 
'X' ) * 23 );
 
  619   int height = 
static_cast< int >( width / 1.61803398875 ); 
 
  623   QBuffer buffer( &data );
 
  624   pm.save( &buffer, 
"PNG", 100 );
 
  625   mChangePatternButton->setToolTip( QStringLiteral( 
"<img src='data:image/png;base64, %3'>" ).arg( QString( data.toBase64() ) ) );
 
  630   QgsSymbolLayerWidget::resizeEvent( event );
 
  648   connect( mStrokeStyleComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::mStrokeStyleComboBox_currentIndexChanged );
 
  649   connect( mStrokeWidthSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
 
  650   connect( mHorizontalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
 
  651   connect( mVerticalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
 
  659   btnChangeColorFill->setAllowOpacity( 
true );
 
  660   btnChangeColorFill->setColorDialogTitle( tr( 
"Select Fill Color" ) );
 
  661   btnChangeColorFill->setContext( QStringLiteral( 
"symbology" ) );
 
  662   btnChangeColorFill->setShowNoColor( 
true );
 
  663   btnChangeColorFill->setNoColorString( tr( 
"Transparent Fill" ) );
 
  664   btnChangeColorStroke->setAllowOpacity( 
true );
 
  665   btnChangeColorStroke->setColorDialogTitle( tr( 
"Select Stroke Color" ) );
 
  666   btnChangeColorStroke->setContext( QStringLiteral( 
"symbology" ) );
 
  667   btnChangeColorStroke->setShowNoColor( 
true );
 
  668   btnChangeColorStroke->setNoColorString( tr( 
"Transparent Stroke" ) );
 
  670   mFillColorDDBtn->registerLinkedWidget( btnChangeColorFill );
 
  671   mStrokeColorDDBtn->registerLinkedWidget( btnChangeColorStroke );
 
  673   spinOffsetX->setClearValue( 0.0 );
 
  674   spinOffsetY->setClearValue( 0.0 );
 
  675   spinAngle->setClearValue( 0.0 );
 
  681     mSizeDDBtn->setSymbol( mAssistantPreviewSymbol );
 
  683   int size = lstNames->iconSize().width();
 
  685   size = std::max( 30, 
static_cast< int >( std::round( 
Qgis::UI_SCALE_FACTOR * fontMetrics().horizontalAdvance( 
'X' ) * 3 ) ) );
 
  687   lstNames->setGridSize( QSize( size * 1.2, size * 1.2 ) );
 
  688   lstNames->setIconSize( QSize( size, size ) );
 
  690   double markerSize = size * 0.8;
 
  696     lyr->
setColor( QColor( 200, 200, 200 ) );
 
  699     QListWidgetItem *item = 
new QListWidgetItem( icon, QString(), lstNames );
 
  700     item->setData( Qt::UserRole, 
static_cast< int >( shape ) );
 
  705   lstNames->setMinimumHeight( lstNames->gridSize().height() * 3.1 );
 
  707   connect( lstNames, &QListWidget::currentRowChanged, 
this, &QgsSimpleMarkerSymbolLayerWidget::setShape );
 
  710   connect( cboJoinStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::penJoinStyleChanged );
 
  711   connect( cboCapStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::penCapStyleChanged );
 
  712   connect( spinSize, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::setSize );
 
  713   connect( spinAngle, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::setAngle );
 
  714   connect( spinOffsetX, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::setOffset );
 
  715   connect( spinOffsetY, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::setOffset );
 
  723   if ( layer->
layerType() != QLatin1String( 
"SimpleMarker" ) )
 
  731   for ( 
int i = 0; i < lstNames->count(); ++i )
 
  735       lstNames->setCurrentRow( i );
 
  739   btnChangeColorStroke->blockSignals( 
true );
 
  741   btnChangeColorStroke->blockSignals( 
false );
 
  742   btnChangeColorFill->blockSignals( 
true );
 
  745   btnChangeColorFill->blockSignals( 
false );
 
  746   spinSize->blockSignals( 
true );
 
  748   spinSize->blockSignals( 
false );
 
  749   spinAngle->blockSignals( 
true );
 
  751   spinAngle->blockSignals( 
false );
 
  752   mStrokeStyleComboBox->blockSignals( 
true );
 
  754   mStrokeStyleComboBox->blockSignals( 
false );
 
  755   mStrokeWidthSpinBox->blockSignals( 
true );
 
  757   mStrokeWidthSpinBox->blockSignals( 
false );
 
  758   cboJoinStyle->blockSignals( 
true );
 
  760   cboJoinStyle->blockSignals( 
false );
 
  761   cboCapStyle->blockSignals( 
true );
 
  763   cboCapStyle->blockSignals( 
false );
 
  766   spinOffsetX->blockSignals( 
true );
 
  768   spinOffsetX->blockSignals( 
false );
 
  769   spinOffsetY->blockSignals( 
true );
 
  771   spinOffsetY->blockSignals( 
false );
 
  773   mSizeUnitWidget->blockSignals( 
true );
 
  776   mSizeUnitWidget->blockSignals( 
false );
 
  777   mOffsetUnitWidget->blockSignals( 
true );
 
  780   mOffsetUnitWidget->blockSignals( 
false );
 
  781   mStrokeWidthUnitWidget->blockSignals( 
true );
 
  784   mStrokeWidthUnitWidget->blockSignals( 
false );
 
  787   mHorizontalAnchorComboBox->blockSignals( 
true );
 
  788   mVerticalAnchorComboBox->blockSignals( 
true );
 
  791   mHorizontalAnchorComboBox->blockSignals( 
false );
 
  792   mVerticalAnchorComboBox->blockSignals( 
false );
 
  807   updateAssistantSymbol();
 
  815 void QgsSimpleMarkerSymbolLayerWidget::setShape()
 
  834 void QgsSimpleMarkerSymbolLayerWidget::penJoinStyleChanged()
 
  840 void QgsSimpleMarkerSymbolLayerWidget::penCapStyleChanged()
 
  846 void QgsSimpleMarkerSymbolLayerWidget::setSize()
 
  852 void QgsSimpleMarkerSymbolLayerWidget::setAngle()
 
  858 void QgsSimpleMarkerSymbolLayerWidget::setOffset()
 
  860   mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
  864 void QgsSimpleMarkerSymbolLayerWidget::mStrokeStyleComboBox_currentIndexChanged( 
int index )
 
  875 void QgsSimpleMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged( 
double d )
 
  884 void QgsSimpleMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
 
  894 void QgsSimpleMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
 
  904 void QgsSimpleMarkerSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
 
  914 void QgsSimpleMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged( 
int index )
 
  923 void QgsSimpleMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged( 
int index )
 
  932 void QgsSimpleMarkerSymbolLayerWidget::updateAssistantSymbol()
 
  934   for ( 
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1 ; i >= 0; --i )
 
  936     mAssistantPreviewSymbol->deleteSymbolLayer( i );
 
  938   mAssistantPreviewSymbol->appendSymbolLayer( 
mLayer->
clone() );
 
  941     mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
 
  960   btnChangeColor->setAllowOpacity( 
true );
 
  961   btnChangeColor->setColorDialogTitle( tr( 
"Select Fill Color" ) );
 
  962   btnChangeColor->setContext( QStringLiteral( 
"symbology" ) );
 
  963   btnChangeColor->setShowNoColor( 
true );
 
  964   btnChangeColor->setNoColorString( tr( 
"Transparent Fill" ) );
 
  965   btnChangeStrokeColor->setAllowOpacity( 
true );
 
  966   btnChangeStrokeColor->setColorDialogTitle( tr( 
"Select Stroke Color" ) );
 
  967   btnChangeStrokeColor->setContext( QStringLiteral( 
"symbology" ) );
 
  968   btnChangeStrokeColor->setShowNoColor( 
true );
 
  969   btnChangeStrokeColor->setNoColorString( tr( 
"Transparent Stroke" ) );
 
  971   spinOffsetX->setClearValue( 0.0 );
 
  972   spinOffsetY->setClearValue( 0.0 );
 
  975   connect( cboFillStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleFillSymbolLayerWidget::setBrushStyle );
 
  977   connect( spinStrokeWidth, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleFillSymbolLayerWidget::strokeWidthChanged );
 
  978   connect( cboStrokeStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleFillSymbolLayerWidget::strokeStyleChanged );
 
  979   connect( cboJoinStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleFillSymbolLayerWidget::strokeStyleChanged );
 
  980   connect( spinOffsetX, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleFillSymbolLayerWidget::offsetChanged );
 
  981   connect( spinOffsetY, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleFillSymbolLayerWidget::offsetChanged );
 
  983   mFillColorDDBtn->registerLinkedWidget( btnChangeColor );
 
  984   mStrokeColorDDBtn->registerLinkedWidget( btnChangeStrokeColor );
 
  989   if ( layer->
layerType() != QLatin1String( 
"SimpleFill" ) )
 
  996   btnChangeColor->blockSignals( 
true );
 
  998   btnChangeColor->blockSignals( 
false );
 
  999   cboFillStyle->blockSignals( 
true );
 
 1001   cboFillStyle->blockSignals( 
false );
 
 1002   btnChangeStrokeColor->blockSignals( 
true );
 
 1004   btnChangeStrokeColor->blockSignals( 
false );
 
 1005   cboStrokeStyle->blockSignals( 
true );
 
 1007   cboStrokeStyle->blockSignals( 
false );
 
 1008   spinStrokeWidth->blockSignals( 
true );
 
 1010   spinStrokeWidth->blockSignals( 
false );
 
 1011   cboJoinStyle->blockSignals( 
true );
 
 1013   cboJoinStyle->blockSignals( 
false );
 
 1014   spinOffsetX->blockSignals( 
true );
 
 1016   spinOffsetX->blockSignals( 
false );
 
 1017   spinOffsetY->blockSignals( 
true );
 
 1019   spinOffsetY->blockSignals( 
false );
 
 1021   mStrokeWidthUnitWidget->blockSignals( 
true );
 
 1024   mStrokeWidthUnitWidget->blockSignals( 
false );
 
 1025   mOffsetUnitWidget->blockSignals( 
true );
 
 1028   mOffsetUnitWidget->blockSignals( 
false );
 
 1056 void QgsSimpleFillSymbolLayerWidget::setBrushStyle()
 
 1062 void QgsSimpleFillSymbolLayerWidget::strokeWidthChanged()
 
 1068 void QgsSimpleFillSymbolLayerWidget::strokeStyleChanged()
 
 1075 void QgsSimpleFillSymbolLayerWidget::offsetChanged()
 
 1077   mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
 1081 void QgsSimpleFillSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
 
 1091 void QgsSimpleFillSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 1111   connect( mHorizontalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsFilledMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
 
 1112   connect( mVerticalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsFilledMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
 
 1118   spinOffsetX->setClearValue( 0.0 );
 
 1119   spinOffsetY->setClearValue( 0.0 );
 
 1120   spinAngle->setClearValue( 0.0 );
 
 1126     mSizeDDBtn->setSymbol( mAssistantPreviewSymbol );
 
 1128   int size = lstNames->iconSize().width();
 
 1129   size = std::max( 30, 
static_cast< int >( std::round( 
Qgis::UI_SCALE_FACTOR * fontMetrics().horizontalAdvance( 
'X' ) * 3 ) ) );
 
 1130   lstNames->setGridSize( QSize( size * 1.2, size * 1.2 ) );
 
 1131   lstNames->setIconSize( QSize( size, size ) );
 
 1133   double markerSize = size * 0.8;
 
 1139     lyr->
setColor( QColor( 200, 200, 200 ) );
 
 1142     QListWidgetItem *item = 
new QListWidgetItem( icon, QString(), lstNames );
 
 1143     item->setData( Qt::UserRole, 
static_cast< int >( shape ) );
 
 1148   lstNames->setMinimumHeight( lstNames->gridSize().height() * 3.1 );
 
 1150   connect( lstNames, &QListWidget::currentRowChanged, 
this, &QgsFilledMarkerSymbolLayerWidget::setShape );
 
 1151   connect( spinSize, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsFilledMarkerSymbolLayerWidget::setSize );
 
 1152   connect( spinAngle, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsFilledMarkerSymbolLayerWidget::setAngle );
 
 1153   connect( spinOffsetX, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsFilledMarkerSymbolLayerWidget::setOffset );
 
 1154   connect( spinOffsetY, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsFilledMarkerSymbolLayerWidget::setOffset );
 
 1162   if ( layer->
layerType() != QLatin1String( 
"FilledMarker" ) )
 
 1170   for ( 
int i = 0; i < lstNames->count(); ++i )
 
 1174       lstNames->setCurrentRow( i );
 
 1183   mSizeUnitWidget->blockSignals( 
true );
 
 1186   mSizeUnitWidget->blockSignals( 
false );
 
 1187   mOffsetUnitWidget->blockSignals( 
true );
 
 1190   mOffsetUnitWidget->blockSignals( 
false );
 
 1203   updateAssistantSymbol();
 
 1211 void QgsFilledMarkerSymbolLayerWidget::setShape()
 
 1217 void QgsFilledMarkerSymbolLayerWidget::setSize()
 
 1223 void QgsFilledMarkerSymbolLayerWidget::setAngle()
 
 1229 void QgsFilledMarkerSymbolLayerWidget::setOffset()
 
 1231   mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
 1235 void QgsFilledMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
 
 1245 void QgsFilledMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 1255 void QgsFilledMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged( 
int index )
 
 1264 void QgsFilledMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged( 
int index )
 
 1273 void QgsFilledMarkerSymbolLayerWidget::updateAssistantSymbol()
 
 1275   for ( 
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1 ; i >= 0; --i )
 
 1277     mAssistantPreviewSymbol->deleteSymbolLayer( i );
 
 1279   mAssistantPreviewSymbol->appendSymbolLayer( 
mLayer->
clone() );
 
 1282     mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
 
 1295   connect( mSpinAngle, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::mSpinAngle_valueChanged );
 
 1299   btnColorRamp->setShowGradientOnly( 
true );
 
 1301   btnChangeColor->setAllowOpacity( 
true );
 
 1302   btnChangeColor->setColorDialogTitle( tr( 
"Select Gradient Color" ) );
 
 1303   btnChangeColor->setContext( QStringLiteral( 
"symbology" ) );
 
 1304   btnChangeColor->setShowNoColor( 
true );
 
 1305   btnChangeColor->setNoColorString( tr( 
"Transparent" ) );
 
 1306   btnChangeColor2->setAllowOpacity( 
true );
 
 1307   btnChangeColor2->setColorDialogTitle( tr( 
"Select Gradient Color" ) );
 
 1308   btnChangeColor2->setContext( QStringLiteral( 
"symbology" ) );
 
 1309   btnChangeColor2->setShowNoColor( 
true );
 
 1310   btnChangeColor2->setNoColorString( tr( 
"Transparent" ) );
 
 1312   mStartColorDDBtn->registerLinkedWidget( btnChangeColor );
 
 1313   mEndColorDDBtn->registerLinkedWidget( btnChangeColor2 );
 
 1315   spinOffsetX->setClearValue( 0.0 );
 
 1316   spinOffsetY->setClearValue( 0.0 );
 
 1317   mSpinAngle->setClearValue( 0.0 );
 
 1325   connect( radioTwoColor, &QAbstractButton::toggled, 
this, &QgsGradientFillSymbolLayerWidget::colorModeChanged );
 
 1326   connect( spinOffsetX, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::offsetChanged );
 
 1327   connect( spinOffsetY, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::offsetChanged );
 
 1328   connect( spinRefPoint1X, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
 
 1329   connect( spinRefPoint1Y, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
 
 1330   connect( checkRefPoint1Centroid, &QAbstractButton::toggled, 
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
 
 1331   connect( spinRefPoint2X, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
 
 1332   connect( spinRefPoint2Y, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
 
 1333   connect( checkRefPoint2Centroid, &QAbstractButton::toggled, 
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
 
 1338   if ( layer->
layerType() != QLatin1String( 
"GradientFill" ) )
 
 1345   btnChangeColor->blockSignals( 
true );
 
 1347   btnChangeColor->blockSignals( 
false );
 
 1348   btnChangeColor2->blockSignals( 
true );
 
 1350   btnChangeColor2->blockSignals( 
false );
 
 1354     radioTwoColor->setChecked( 
true );
 
 1355     btnColorRamp->setEnabled( 
false );
 
 1359     radioColorRamp->setChecked( 
true );
 
 1360     btnChangeColor->setEnabled( 
false );
 
 1361     btnChangeColor2->setEnabled( 
false );
 
 1367     btnColorRamp->blockSignals( 
true );
 
 1369     btnColorRamp->blockSignals( 
false );
 
 1372   cboGradientType->blockSignals( 
true );
 
 1376       cboGradientType->setCurrentIndex( 0 );
 
 1379       cboGradientType->setCurrentIndex( 1 );
 
 1382       cboGradientType->setCurrentIndex( 2 );
 
 1385   cboGradientType->blockSignals( 
false );
 
 1387   cboCoordinateMode->blockSignals( 
true );
 
 1391       cboCoordinateMode->setCurrentIndex( 1 );
 
 1392       checkRefPoint1Centroid->setEnabled( 
false );
 
 1393       checkRefPoint2Centroid->setEnabled( 
false );
 
 1397       cboCoordinateMode->setCurrentIndex( 0 );
 
 1400   cboCoordinateMode->blockSignals( 
false );
 
 1402   cboGradientSpread->blockSignals( 
true );
 
 1406       cboGradientSpread->setCurrentIndex( 0 );
 
 1409       cboGradientSpread->setCurrentIndex( 1 );
 
 1412       cboGradientSpread->setCurrentIndex( 2 );
 
 1415   cboGradientSpread->blockSignals( 
false );
 
 1417   spinRefPoint1X->blockSignals( 
true );
 
 1419   spinRefPoint1X->blockSignals( 
false );
 
 1420   spinRefPoint1Y->blockSignals( 
true );
 
 1422   spinRefPoint1Y->blockSignals( 
false );
 
 1423   checkRefPoint1Centroid->blockSignals( 
true );
 
 1427     spinRefPoint1X->setEnabled( 
false );
 
 1428     spinRefPoint1Y->setEnabled( 
false );
 
 1430   checkRefPoint1Centroid->blockSignals( 
false );
 
 1431   spinRefPoint2X->blockSignals( 
true );
 
 1433   spinRefPoint2X->blockSignals( 
false );
 
 1434   spinRefPoint2Y->blockSignals( 
true );
 
 1436   spinRefPoint2Y->blockSignals( 
false );
 
 1437   checkRefPoint2Centroid->blockSignals( 
true );
 
 1441     spinRefPoint2X->setEnabled( 
false );
 
 1442     spinRefPoint2Y->setEnabled( 
false );
 
 1444   checkRefPoint2Centroid->blockSignals( 
false );
 
 1446   spinOffsetX->blockSignals( 
true );
 
 1448   spinOffsetX->blockSignals( 
false );
 
 1449   spinOffsetY->blockSignals( 
true );
 
 1451   spinOffsetY->blockSignals( 
false );
 
 1452   mSpinAngle->blockSignals( 
true );
 
 1454   mSpinAngle->blockSignals( 
false );
 
 1456   mOffsetUnitWidget->blockSignals( 
true );
 
 1459   mOffsetUnitWidget->blockSignals( 
false );
 
 1493 void QgsGradientFillSymbolLayerWidget::colorModeChanged()
 
 1495   if ( radioTwoColor->isChecked() )
 
 1508   if ( btnColorRamp->isNull() )
 
 1522       spinRefPoint1X->setValue( 0.5 );
 
 1523       spinRefPoint1Y->setValue( 0 );
 
 1524       spinRefPoint2X->setValue( 0.5 );
 
 1525       spinRefPoint2Y->setValue( 1 );
 
 1530       spinRefPoint1X->setValue( 0 );
 
 1531       spinRefPoint1Y->setValue( 0 );
 
 1532       spinRefPoint2X->setValue( 1 );
 
 1533       spinRefPoint2Y->setValue( 1 );
 
 1537       spinRefPoint1X->setValue( 0.5 );
 
 1538       spinRefPoint1Y->setValue( 0.5 );
 
 1539       spinRefPoint2X->setValue( 1 );
 
 1540       spinRefPoint2Y->setValue( 1 );
 
 1555       checkRefPoint1Centroid->setEnabled( 
true );
 
 1556       checkRefPoint2Centroid->setEnabled( 
true );
 
 1562       checkRefPoint1Centroid->setChecked( Qt::Unchecked );
 
 1563       checkRefPoint1Centroid->setEnabled( 
false );
 
 1564       checkRefPoint2Centroid->setChecked( Qt::Unchecked );
 
 1565       checkRefPoint2Centroid->setEnabled( 
false );
 
 1590 void QgsGradientFillSymbolLayerWidget::offsetChanged()
 
 1592   mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
 1596 void QgsGradientFillSymbolLayerWidget::referencePointChanged()
 
 1605 void QgsGradientFillSymbolLayerWidget::mSpinAngle_valueChanged( 
double value )
 
 1611 void QgsGradientFillSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 1629   connect( mSpinBlurRadius, qOverload< int >( &QSpinBox::valueChanged ), 
this, &QgsShapeburstFillSymbolLayerWidget::mSpinBlurRadius_valueChanged );
 
 1630   connect( mSpinMaxDistance, qOverload< double >( &QDoubleSpinBox::valueChanged ), 
this, &QgsShapeburstFillSymbolLayerWidget::mSpinMaxDistance_valueChanged );
 
 1632   connect( mRadioUseWholeShape, &QRadioButton::toggled, 
this, &QgsShapeburstFillSymbolLayerWidget::mRadioUseWholeShape_toggled );
 
 1634   connect( mIgnoreRingsCheckBox, &QCheckBox::stateChanged, 
this, &QgsShapeburstFillSymbolLayerWidget::mIgnoreRingsCheckBox_stateChanged );
 
 1640   QButtonGroup *group1 = 
new QButtonGroup( 
this );
 
 1641   group1->addButton( radioColorRamp );
 
 1642   group1->addButton( radioTwoColor );
 
 1643   QButtonGroup *group2 = 
new QButtonGroup( 
this );
 
 1644   group2->addButton( mRadioUseMaxDistance );
 
 1645   group2->addButton( mRadioUseWholeShape );
 
 1646   btnChangeColor->setAllowOpacity( 
true );
 
 1647   btnChangeColor->setColorDialogTitle( tr( 
"Select Gradient Color" ) );
 
 1648   btnChangeColor->setContext( QStringLiteral( 
"symbology" ) );
 
 1649   btnChangeColor->setShowNoColor( 
true );
 
 1650   btnChangeColor->setNoColorString( tr( 
"Transparent" ) );
 
 1651   btnChangeColor2->setAllowOpacity( 
true );
 
 1652   btnChangeColor2->setColorDialogTitle( tr( 
"Select Gradient Color" ) );
 
 1653   btnChangeColor2->setContext( QStringLiteral( 
"symbology" ) );
 
 1654   btnChangeColor2->setShowNoColor( 
true );
 
 1655   btnChangeColor2->setNoColorString( tr( 
"Transparent" ) );
 
 1657   mStartColorDDBtn->registerLinkedWidget( btnChangeColor );
 
 1658   mEndColorDDBtn->registerLinkedWidget( btnChangeColor2 );
 
 1660   spinOffsetX->setClearValue( 0.0 );
 
 1661   spinOffsetY->setClearValue( 0.0 );
 
 1662   mSpinMaxDistance->setClearValue( 5.0 );
 
 1664   btnColorRamp->setShowGradientOnly( 
true );
 
 1670   connect( radioTwoColor, &QAbstractButton::toggled, 
this, &QgsShapeburstFillSymbolLayerWidget::colorModeChanged );
 
 1671   connect( spinOffsetX, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsShapeburstFillSymbolLayerWidget::offsetChanged );
 
 1672   connect( spinOffsetY, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsShapeburstFillSymbolLayerWidget::offsetChanged );
 
 1674   connect( mBlurSlider, &QAbstractSlider::valueChanged, mSpinBlurRadius, &QSpinBox::setValue );
 
 1675   connect( mSpinBlurRadius, 
static_cast < void ( QSpinBox::* )( 
int ) 
> ( &QSpinBox::valueChanged ), mBlurSlider, &QAbstractSlider::setValue );
 
 1680   if ( layer->
layerType() != QLatin1String( 
"ShapeburstFill" ) )
 
 1687   btnChangeColor->blockSignals( 
true );
 
 1689   btnChangeColor->blockSignals( 
false );
 
 1690   btnChangeColor2->blockSignals( 
true );
 
 1692   btnChangeColor2->blockSignals( 
false );
 
 1696     radioTwoColor->setChecked( 
true );
 
 1697     btnColorRamp->setEnabled( 
false );
 
 1701     radioColorRamp->setChecked( 
true );
 
 1702     btnChangeColor->setEnabled( 
false );
 
 1703     btnChangeColor2->setEnabled( 
false );
 
 1706   mSpinBlurRadius->blockSignals( 
true );
 
 1707   mBlurSlider->blockSignals( 
true );
 
 1710   mSpinBlurRadius->blockSignals( 
false );
 
 1711   mBlurSlider->blockSignals( 
false );
 
 1713   mSpinMaxDistance->blockSignals( 
true );
 
 1715   mSpinMaxDistance->blockSignals( 
false );
 
 1717   mRadioUseWholeShape->blockSignals( 
true );
 
 1718   mRadioUseMaxDistance->blockSignals( 
true );
 
 1721     mRadioUseWholeShape->setChecked( 
true );
 
 1722     mSpinMaxDistance->setEnabled( 
false );
 
 1723     mDistanceUnitWidget->setEnabled( 
false );
 
 1727     mRadioUseMaxDistance->setChecked( 
true );
 
 1728     mSpinMaxDistance->setEnabled( 
true );
 
 1729     mDistanceUnitWidget->setEnabled( 
true );
 
 1731   mRadioUseWholeShape->blockSignals( 
false );
 
 1732   mRadioUseMaxDistance->blockSignals( 
false );
 
 1734   mDistanceUnitWidget->blockSignals( 
true );
 
 1737   mDistanceUnitWidget->blockSignals( 
false );
 
 1739   mIgnoreRingsCheckBox->blockSignals( 
true );
 
 1740   mIgnoreRingsCheckBox->setCheckState( 
mLayer->
ignoreRings() ? Qt::Checked : Qt::Unchecked );
 
 1741   mIgnoreRingsCheckBox->blockSignals( 
false );
 
 1746     btnColorRamp->blockSignals( 
true );
 
 1748     btnColorRamp->blockSignals( 
false );
 
 1751   spinOffsetX->blockSignals( 
true );
 
 1753   spinOffsetX->blockSignals( 
false );
 
 1754   spinOffsetY->blockSignals( 
true );
 
 1756   spinOffsetY->blockSignals( 
false );
 
 1757   mOffsetUnitWidget->blockSignals( 
true );
 
 1760   mOffsetUnitWidget->blockSignals( 
false );
 
 1794 void QgsShapeburstFillSymbolLayerWidget::colorModeChanged()
 
 1801   if ( radioTwoColor->isChecked() )
 
 1812 void QgsShapeburstFillSymbolLayerWidget::mSpinBlurRadius_valueChanged( 
int value )
 
 1821 void QgsShapeburstFillSymbolLayerWidget::mSpinMaxDistance_valueChanged( 
double value )
 
 1830 void QgsShapeburstFillSymbolLayerWidget::mDistanceUnitWidget_changed()
 
 1840 void QgsShapeburstFillSymbolLayerWidget::mRadioUseWholeShape_toggled( 
bool value )
 
 1845     mDistanceUnitWidget->setEnabled( !value );
 
 1850 void QgsShapeburstFillSymbolLayerWidget::applyColorRamp()
 
 1860 void QgsShapeburstFillSymbolLayerWidget::offsetChanged()
 
 1864     mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
 1869 void QgsShapeburstFillSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 1880 void QgsShapeburstFillSymbolLayerWidget::mIgnoreRingsCheckBox_stateChanged( 
int state )
 
 1882   bool checked = ( state == Qt::Checked );
 
 1911   connect( mRingFilterComboBox, qOverload< int >( &QComboBox::currentIndexChanged ), 
this, [ = ]( 
int )
 
 1920   spinOffset->setClearValue( 0.0 );
 
 1922   mSpinAverageAngleLength->setClearValue( 4.0 );
 
 1926   connect( chkRotateMarker, &QAbstractButton::clicked, 
this, &QgsMarkerLineSymbolLayerWidget::setRotate );
 
 1927   connect( spinOffset, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsMarkerLineSymbolLayerWidget::setOffset );
 
 1928   connect( mSpinAverageAngleLength, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsMarkerLineSymbolLayerWidget::setAverageAngle );
 
 1929   connect( radInterval, &QAbstractButton::clicked, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1930   connect( radVertex, &QAbstractButton::clicked, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1931   connect( radVertexLast, &QAbstractButton::clicked, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1932   connect( radVertexFirst, &QAbstractButton::clicked, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1933   connect( radCentralPoint, &QAbstractButton::clicked, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1934   connect( radCurvePoint, &QAbstractButton::clicked, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1935   connect( radSegmentCentralPoint, &QAbstractButton::clicked, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1940   if ( layer->
layerType() != QLatin1String( 
"MarkerLine" ) )
 
 1947   spinInterval->blockSignals( 
true );
 
 1949   spinInterval->blockSignals( 
false );
 
 1950   mSpinOffsetAlongLine->blockSignals( 
true );
 
 1952   mSpinOffsetAlongLine->blockSignals( 
false );
 
 1953   chkRotateMarker->blockSignals( 
true );
 
 1955   chkRotateMarker->blockSignals( 
false );
 
 1956   spinOffset->blockSignals( 
true );
 
 1958   spinOffset->blockSignals( 
false );
 
 1960     radInterval->setChecked( 
true );
 
 1962     radVertex->setChecked( 
true );
 
 1964     radVertexLast->setChecked( 
true );
 
 1966     radCentralPoint->setChecked( 
true );
 
 1968     radCurvePoint->setChecked( 
true );
 
 1970     radSegmentCentralPoint->setChecked( 
true );
 
 1972     radVertexFirst->setChecked( 
true );
 
 1975   mIntervalUnitWidget->blockSignals( 
true );
 
 1978   mIntervalUnitWidget->blockSignals( 
false );
 
 1979   mOffsetUnitWidget->blockSignals( 
true );
 
 1982   mOffsetUnitWidget->blockSignals( 
false );
 
 1983   mOffsetAlongLineUnitWidget->blockSignals( 
true );
 
 1986   mOffsetAlongLineUnitWidget->blockSignals( 
false );
 
 2017       mRingFilterComboBox->hide();
 
 2018       mRingsLabel->hide();
 
 2039 void QgsMarkerLineSymbolLayerWidget::setRotate()
 
 2041   mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( radInterval->isChecked() || radCentralPoint->isChecked() ) );
 
 2042   mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
 
 2048 void QgsMarkerLineSymbolLayerWidget::setOffset()
 
 2054 void QgsMarkerLineSymbolLayerWidget::setPlacement()
 
 2056   bool interval = radInterval->isChecked();
 
 2057   spinInterval->setEnabled( interval );
 
 2058   mSpinOffsetAlongLine->setEnabled( radInterval->isChecked() || radVertexLast->isChecked() || radVertexFirst->isChecked() );
 
 2059   mOffsetAlongLineUnitWidget->setEnabled( mSpinOffsetAlongLine->isEnabled() );
 
 2060   mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( radInterval->isChecked() || radCentralPoint->isChecked() ) );
 
 2061   mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
 
 2063   if ( radInterval->isChecked() )
 
 2065   else if ( radVertex->isChecked() )
 
 2067   else if ( radVertexLast->isChecked() )
 
 2069   else if ( radVertexFirst->isChecked() )
 
 2071   else if ( radCurvePoint->isChecked() )
 
 2073   else if ( radSegmentCentralPoint->isChecked() )
 
 2081 void QgsMarkerLineSymbolLayerWidget::mIntervalUnitWidget_changed()
 
 2091 void QgsMarkerLineSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 2101 void QgsMarkerLineSymbolLayerWidget::mOffsetAlongLineUnitWidget_changed()
 
 2111 void QgsMarkerLineSymbolLayerWidget::averageAngleUnitChanged()
 
 2121 void QgsMarkerLineSymbolLayerWidget::setAverageAngle( 
double val )
 
 2158   connect( mRingFilterComboBox, qOverload< int >( &QComboBox::currentIndexChanged ), 
this, [ = ]( 
int )
 
 2167   spinOffset->setClearValue( 0.0 );
 
 2169   mHashRotationSpinBox->setClearValue( 0 );
 
 2170   mSpinAverageAngleLength->setClearValue( 4.0 );
 
 2172   connect( spinInterval, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsHashedLineSymbolLayerWidget::setInterval );
 
 2173   connect( mSpinOffsetAlongLine, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsHashedLineSymbolLayerWidget::setOffsetAlongLine );
 
 2174   connect( mSpinHashLength, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsHashedLineSymbolLayerWidget::setHashLength );
 
 2175   connect( mHashRotationSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsHashedLineSymbolLayerWidget::setHashAngle );
 
 2176   connect( chkRotateMarker, &QAbstractButton::clicked, 
this, &QgsHashedLineSymbolLayerWidget::setRotate );
 
 2177   connect( spinOffset, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsHashedLineSymbolLayerWidget::setOffset );
 
 2178   connect( mSpinAverageAngleLength, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsHashedLineSymbolLayerWidget::setAverageAngle );
 
 2179   connect( radInterval, &QAbstractButton::clicked, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2180   connect( radVertex, &QAbstractButton::clicked, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2181   connect( radVertexLast, &QAbstractButton::clicked, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2182   connect( radVertexFirst, &QAbstractButton::clicked, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2183   connect( radCentralPoint, &QAbstractButton::clicked, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2184   connect( radCurvePoint, &QAbstractButton::clicked, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2185   connect( radSegmentCentralPoint, &QAbstractButton::clicked, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2190   if ( layer->
layerType() != QLatin1String( 
"HashLine" ) )
 
 2197   spinInterval->blockSignals( 
true );
 
 2198   spinInterval->setValue( mLayer->
interval() );
 
 2199   spinInterval->blockSignals( 
false );
 
 2200   mSpinOffsetAlongLine->blockSignals( 
true );
 
 2202   mSpinOffsetAlongLine->blockSignals( 
false );
 
 2205   chkRotateMarker->blockSignals( 
true );
 
 2207   chkRotateMarker->blockSignals( 
false );
 
 2208   spinOffset->blockSignals( 
true );
 
 2209   spinOffset->setValue( mLayer->
offset() );
 
 2210   spinOffset->blockSignals( 
false );
 
 2212     radInterval->setChecked( 
true );
 
 2214     radVertex->setChecked( 
true );
 
 2216     radVertexLast->setChecked( 
true );
 
 2218     radCentralPoint->setChecked( 
true );
 
 2220     radCurvePoint->setChecked( 
true );
 
 2222     radSegmentCentralPoint->setChecked( 
true );
 
 2224     radVertexFirst->setChecked( 
true );
 
 2227   mIntervalUnitWidget->blockSignals( 
true );
 
 2228   mIntervalUnitWidget->setUnit( mLayer->
intervalUnit() );
 
 2230   mIntervalUnitWidget->blockSignals( 
false );
 
 2231   mOffsetUnitWidget->blockSignals( 
true );
 
 2232   mOffsetUnitWidget->setUnit( mLayer->
offsetUnit() );
 
 2234   mOffsetUnitWidget->blockSignals( 
false );
 
 2235   mOffsetAlongLineUnitWidget->blockSignals( 
true );
 
 2238   mOffsetAlongLineUnitWidget->blockSignals( 
false );
 
 2245   whileBlocking( mRingFilterComboBox )->setCurrentIndex( mRingFilterComboBox->findData( mLayer->
ringFilter() ) );
 
 2272       mRingFilterComboBox->hide();
 
 2273       mRingsLabel->hide();
 
 2282 void QgsHashedLineSymbolLayerWidget::setInterval( 
double val )
 
 2288 void QgsHashedLineSymbolLayerWidget::setOffsetAlongLine( 
double val )
 
 2294 void QgsHashedLineSymbolLayerWidget::setHashLength( 
double val )
 
 2300 void QgsHashedLineSymbolLayerWidget::setHashAngle( 
double val )
 
 2306 void QgsHashedLineSymbolLayerWidget::setRotate()
 
 2308   mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( radInterval->isChecked() || radCentralPoint->isChecked() ) );
 
 2309   mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
 
 2315 void QgsHashedLineSymbolLayerWidget::setOffset()
 
 2317   mLayer->
setOffset( spinOffset->value() );
 
 2321 void QgsHashedLineSymbolLayerWidget::setPlacement()
 
 2323   bool interval = radInterval->isChecked();
 
 2324   spinInterval->setEnabled( interval );
 
 2325   mSpinOffsetAlongLine->setEnabled( radInterval->isChecked() || radVertexLast->isChecked() || radVertexFirst->isChecked() );
 
 2326   mOffsetAlongLineUnitWidget->setEnabled( mSpinOffsetAlongLine->isEnabled() );
 
 2327   mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( radInterval->isChecked() || radCentralPoint->isChecked() ) );
 
 2328   mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
 
 2330   if ( radInterval->isChecked() )
 
 2332   else if ( radVertex->isChecked() )
 
 2334   else if ( radVertexLast->isChecked() )
 
 2336   else if ( radVertexFirst->isChecked() )
 
 2338   else if ( radCurvePoint->isChecked() )
 
 2340   else if ( radSegmentCentralPoint->isChecked() )
 
 2348 void QgsHashedLineSymbolLayerWidget::mIntervalUnitWidget_changed()
 
 2358 void QgsHashedLineSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 2368 void QgsHashedLineSymbolLayerWidget::mOffsetAlongLineUnitWidget_changed()
 
 2378 void QgsHashedLineSymbolLayerWidget::hashLengthUnitWidgetChanged()
 
 2388 void QgsHashedLineSymbolLayerWidget::averageAngleUnitChanged()
 
 2398 void QgsHashedLineSymbolLayerWidget::setAverageAngle( 
double val )
 
 2417   mSvgSelectorWidget->setAllowParameters( 
true );
 
 2418   mSvgSelectorWidget->sourceLineEdit()->setPropertyOverrideToolButtonVisible( 
true );
 
 2419   mSvgSelectorWidget->sourceLineEdit()->setLastPathSettingsKey( QStringLiteral( 
"/UI/lastSVGMarkerDir" ) );
 
 2420   mSvgSelectorWidget->initParametersModel( 
this, vl );
 
 2424   connect( mChangeStrokeColorButton, &
QgsColorButton::colorChanged, 
this, &QgsSvgMarkerSymbolLayerWidget::mChangeStrokeColorButton_colorChanged );
 
 2425   connect( mStrokeWidthSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
 
 2429   connect( mHorizontalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
 
 2430   connect( mVerticalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
 
 2437   mChangeColorButton->setAllowOpacity( 
true );
 
 2438   mChangeColorButton->setColorDialogTitle( tr( 
"Select Fill color" ) );
 
 2439   mChangeColorButton->setContext( QStringLiteral( 
"symbology" ) );
 
 2440   mChangeStrokeColorButton->setAllowOpacity( 
true );
 
 2441   mChangeStrokeColorButton->setColorDialogTitle( tr( 
"Select Stroke Color" ) );
 
 2442   mChangeStrokeColorButton->setContext( QStringLiteral( 
"symbology" ) );
 
 2444   mFillColorDDBtn->registerLinkedWidget( mChangeColorButton );
 
 2445   mStrokeColorDDBtn->registerLinkedWidget( mChangeStrokeColorButton );
 
 2447   spinOffsetX->setClearValue( 0.0 );
 
 2448   spinOffsetY->setClearValue( 0.0 );
 
 2449   spinAngle->setClearValue( 0.0 );
 
 2451   connect( spinWidth, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::setWidth );
 
 2452   connect( spinHeight, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::setHeight );
 
 2454   connect( spinAngle, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::setAngle );
 
 2455   connect( spinOffsetX, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::setOffset );
 
 2456   connect( spinOffsetY, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::setOffset );
 
 2467     mWidthDDBtn->setSymbol( mAssistantPreviewSymbol );
 
 2468     mHeightDDBtn->setSymbol( mAssistantPreviewSymbol );
 
 2475 #include <QAbstractListModel> 
 2476 #include <QPixmapCache> 
 2490   bool hasFillParam, hasFillOpacityParam, hasStrokeParam, hasStrokeWidthParam, hasStrokeOpacityParam;
 
 2491   QColor defaultFill, defaultStroke;
 
 2492   double defaultStrokeWidth, defaultFillOpacity, defaultStrokeOpacity;
 
 2493   bool hasDefaultFillColor, hasDefaultFillOpacity, hasDefaultStrokeColor, hasDefaultStrokeWidth, hasDefaultStrokeOpacity;
 
 2495       hasFillOpacityParam, hasDefaultFillOpacity, defaultFillOpacity,
 
 2496       hasStrokeParam, hasDefaultStrokeColor, defaultStroke,
 
 2497       hasStrokeWidthParam, hasDefaultStrokeWidth, defaultStrokeWidth,
 
 2498       hasStrokeOpacityParam, hasDefaultStrokeOpacity, defaultStrokeOpacity );
 
 2499   mChangeColorButton->setEnabled( hasFillParam );
 
 2500   mChangeColorButton->setAllowOpacity( hasFillOpacityParam );
 
 2501   mChangeStrokeColorButton->setEnabled( hasStrokeParam );
 
 2502   mChangeStrokeColorButton->setAllowOpacity( hasStrokeOpacityParam );
 
 2503   mStrokeWidthSpinBox->setEnabled( hasStrokeWidthParam );
 
 2508     double existingOpacity = hasFillOpacityParam ? fill.alphaF() : 1.0;
 
 2509     if ( hasDefaultFillColor && !skipDefaultColors )
 
 2513     fill.setAlphaF( hasDefaultFillOpacity ? defaultFillOpacity : existingOpacity );
 
 2514     mChangeColorButton->setColor( fill );
 
 2516   if ( hasStrokeParam )
 
 2519     double existingOpacity = hasStrokeOpacityParam ? stroke.alphaF() : 1.0;
 
 2520     if ( hasDefaultStrokeColor && !skipDefaultColors )
 
 2522       stroke = defaultStroke;
 
 2524     stroke.setAlphaF( hasDefaultStrokeOpacity ? defaultStrokeOpacity : existingOpacity );
 
 2525     mChangeStrokeColorButton->setColor( stroke );
 
 2528   whileBlocking( mSvgSelectorWidget->sourceLineEdit() )->setSource( layer->
path() );
 
 2530   mStrokeWidthSpinBox->blockSignals( 
true );
 
 2531   mStrokeWidthSpinBox->setValue( hasDefaultStrokeWidth ? defaultStrokeWidth : layer->
strokeWidth() );
 
 2532   mStrokeWidthSpinBox->blockSignals( 
false );
 
 2535   spinHeight->blockSignals( 
true );
 
 2536   if ( preservedAspectRatio )
 
 2545   spinHeight->blockSignals( 
false );
 
 2546   whileBlocking( mLockAspectRatio )->setLocked( preservedAspectRatio );
 
 2549 void QgsSvgMarkerSymbolLayerWidget::updateAssistantSymbol()
 
 2551   for ( 
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1 ; i >= 0; --i )
 
 2553     mAssistantPreviewSymbol->deleteSymbolLayer( i );
 
 2555   mAssistantPreviewSymbol->appendSymbolLayer( 
mLayer->
clone() );
 
 2558     mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
 
 2569   if ( layer->
layerType() != QLatin1String( 
"SvgMarker" ) )
 
 2576   mSvgSelectorWidget->setSvgPath( 
mLayer->
path() );
 
 2579   spinWidth->blockSignals( 
true );
 
 2581   spinWidth->blockSignals( 
false );
 
 2582   spinAngle->blockSignals( 
true );
 
 2584   spinAngle->blockSignals( 
false );
 
 2587   spinOffsetX->blockSignals( 
true );
 
 2589   spinOffsetX->blockSignals( 
false );
 
 2590   spinOffsetY->blockSignals( 
true );
 
 2592   spinOffsetY->blockSignals( 
false );
 
 2594   mSizeUnitWidget->blockSignals( 
true );
 
 2597   mSizeUnitWidget->blockSignals( 
false );
 
 2598   mStrokeWidthUnitWidget->blockSignals( 
true );
 
 2601   mStrokeWidthUnitWidget->blockSignals( 
false );
 
 2602   mOffsetUnitWidget->blockSignals( 
true );
 
 2605   mOffsetUnitWidget->blockSignals( 
false );
 
 2608   mHorizontalAnchorComboBox->blockSignals( 
true );
 
 2609   mVerticalAnchorComboBox->blockSignals( 
true );
 
 2612   mHorizontalAnchorComboBox->blockSignals( 
false );
 
 2613   mVerticalAnchorComboBox->blockSignals( 
false );
 
 2629   updateAssistantSymbol();
 
 2646   whileBlocking( mSvgSelectorWidget->sourceLineEdit() )->setSource( name );
 
 2655   whileBlocking( mSvgSelectorWidget )->setSvgParameters( parameters );
 
 2661 void QgsSvgMarkerSymbolLayerWidget::setWidth()
 
 2664   double fixedAspectRatio = 0.0;
 
 2665   spinHeight->blockSignals( 
true );
 
 2666   if ( defaultAspectRatio <= 0.0 )
 
 2668     spinHeight->setValue( spinWidth->value() );
 
 2670   else if ( mLockAspectRatio->locked() )
 
 2672     spinHeight->setValue( spinWidth->value() * defaultAspectRatio );
 
 2676     fixedAspectRatio = spinHeight->value() / spinWidth->value();
 
 2678   spinHeight->blockSignals( 
false );
 
 2684 void QgsSvgMarkerSymbolLayerWidget::setHeight()
 
 2687   double fixedAspectRatio = 0.0;
 
 2688   spinWidth->blockSignals( 
true );
 
 2689   if ( defaultAspectRatio <= 0.0 )
 
 2691     spinWidth->setValue( spinHeight->value() );
 
 2693   else if ( mLockAspectRatio->locked() )
 
 2695     spinWidth->setValue( spinHeight->value() / defaultAspectRatio );
 
 2699     fixedAspectRatio = spinHeight->value() / spinWidth->value();
 
 2701   spinWidth->blockSignals( 
false );
 
 2707 void QgsSvgMarkerSymbolLayerWidget::lockAspectRatioChanged( 
const bool locked )
 
 2711   if ( defaultAspectRatio <= 0.0 )
 
 2727 void QgsSvgMarkerSymbolLayerWidget::setAngle()
 
 2733 void QgsSvgMarkerSymbolLayerWidget::setOffset()
 
 2735   mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
 2739 void QgsSvgMarkerSymbolLayerWidget::svgSourceChanged( 
const QString &text )
 
 2746 void QgsSvgMarkerSymbolLayerWidget::mChangeColorButton_colorChanged( 
const QColor &color )
 
 2757 void QgsSvgMarkerSymbolLayerWidget::mChangeStrokeColorButton_colorChanged( 
const QColor &color )
 
 2768 void QgsSvgMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged( 
double d )
 
 2777 void QgsSvgMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
 
 2787 void QgsSvgMarkerSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
 
 2797 void QgsSvgMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 2807 void QgsSvgMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged( 
int index )
 
 2816 void QgsSvgMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged( 
int index )
 
 2832   mSvgSelectorWidget->setAllowParameters( 
true );
 
 2833   mSvgSelectorWidget->sourceLineEdit()->setPropertyOverrideToolButtonVisible( 
true );
 
 2835   connect( mTextureWidthSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSVGFillSymbolLayerWidget::mTextureWidthSpinBox_valueChanged );
 
 2837   connect( mRotationSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSVGFillSymbolLayerWidget::mRotationSpinBox_valueChanged );
 
 2839   connect( mChangeStrokeColorButton, &
QgsColorButton::colorChanged, 
this, &QgsSVGFillSymbolLayerWidget::mChangeStrokeColorButton_colorChanged );
 
 2840   connect( mStrokeWidthSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsSVGFillSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
 
 2848   mRotationSpinBox->setClearValue( 0.0 );
 
 2850   mChangeColorButton->setColorDialogTitle( tr( 
"Select Fill Color" ) );
 
 2851   mChangeColorButton->setContext( QStringLiteral( 
"symbology" ) );
 
 2852   mChangeStrokeColorButton->setColorDialogTitle( tr( 
"Select Stroke Color" ) );
 
 2853   mChangeStrokeColorButton->setContext( QStringLiteral( 
"symbology" ) );
 
 2855   mFilColorDDBtn->registerLinkedWidget( mChangeColorButton );
 
 2856   mStrokeColorDDBtn->registerLinkedWidget( mChangeStrokeColorButton );
 
 2869   if ( layer->
layerType() != QLatin1String( 
"SVGFill" ) )
 
 2878     mTextureWidthSpinBox->blockSignals( 
true );
 
 2879     mTextureWidthSpinBox->setValue( width );
 
 2880     mTextureWidthSpinBox->blockSignals( 
false );
 
 2882     mRotationSpinBox->blockSignals( 
true );
 
 2884     mRotationSpinBox->blockSignals( 
false );
 
 2885     mTextureWidthUnitWidget->blockSignals( 
true );
 
 2888     mTextureWidthUnitWidget->blockSignals( 
false );
 
 2889     mSvgStrokeWidthUnitWidget->blockSignals( 
true );
 
 2892     mSvgStrokeWidthUnitWidget->blockSignals( 
false );
 
 2893     mChangeColorButton->blockSignals( 
true );
 
 2895     mChangeColorButton->blockSignals( 
false );
 
 2896     mChangeStrokeColorButton->blockSignals( 
true );
 
 2898     mChangeStrokeColorButton->blockSignals( 
false );
 
 2899     mStrokeWidthSpinBox->blockSignals( 
true );
 
 2901     mStrokeWidthSpinBox->blockSignals( 
false );
 
 2925 void QgsSVGFillSymbolLayerWidget::mTextureWidthSpinBox_valueChanged( 
double d )
 
 2934 void QgsSVGFillSymbolLayerWidget::svgSourceChanged( 
const QString &text )
 
 2946 void QgsSVGFillSymbolLayerWidget::setFile( 
const QString &name )
 
 2949   whileBlocking( mSvgSelectorWidget->sourceLineEdit() )->setSource( name );
 
 2955 void QgsSVGFillSymbolLayerWidget::setSvgParameters( 
const QMap<QString, QgsProperty> ¶meters )
 
 2958   whileBlocking( mSvgSelectorWidget )->setSvgParameters( parameters );
 
 2965 void QgsSVGFillSymbolLayerWidget::mRotationSpinBox_valueChanged( 
double d )
 
 2977   bool hasFillParam, hasFillOpacityParam, hasStrokeParam, hasStrokeWidthParam, hasStrokeOpacityParam;
 
 2978   QColor defaultFill, defaultStroke;
 
 2979   double defaultStrokeWidth, defaultFillOpacity, defaultStrokeOpacity;
 
 2980   bool hasDefaultFillColor, hasDefaultFillOpacity, hasDefaultStrokeColor, hasDefaultStrokeWidth, hasDefaultStrokeOpacity;
 
 2982       hasFillOpacityParam, hasDefaultFillOpacity, defaultFillOpacity,
 
 2983       hasStrokeParam, hasDefaultStrokeColor, defaultStroke,
 
 2984       hasStrokeWidthParam, hasDefaultStrokeWidth, defaultStrokeWidth,
 
 2985       hasStrokeOpacityParam, hasDefaultStrokeOpacity, defaultStrokeOpacity );
 
 2988     QColor fill = mChangeColorButton->color();
 
 2989     double newOpacity = hasFillOpacityParam ? fill.alphaF() : 1.0;
 
 2990     if ( hasDefaultFillColor )
 
 2994     fill.setAlphaF( hasDefaultFillOpacity ? defaultFillOpacity : newOpacity );
 
 2995     mChangeColorButton->setColor( fill );
 
 2997   mChangeColorButton->setEnabled( hasFillParam );
 
 2998   mChangeColorButton->setAllowOpacity( hasFillOpacityParam );
 
 3001     QColor stroke = mChangeStrokeColorButton->color();
 
 3002     double newOpacity = hasStrokeOpacityParam ? stroke.alphaF() : 1.0;
 
 3003     if ( hasDefaultStrokeColor )
 
 3005       stroke = defaultStroke;
 
 3007     stroke.setAlphaF( hasDefaultStrokeOpacity ? defaultStrokeOpacity : newOpacity );
 
 3008     mChangeStrokeColorButton->setColor( stroke );
 
 3010   mChangeStrokeColorButton->setEnabled( hasStrokeParam );
 
 3011   mChangeStrokeColorButton->setAllowOpacity( hasStrokeOpacityParam );
 
 3012   if ( hasDefaultStrokeWidth && resetValues )
 
 3014     mStrokeWidthSpinBox->setValue( defaultStrokeWidth );
 
 3016   mStrokeWidthSpinBox->setEnabled( hasStrokeWidthParam );
 
 3019 void QgsSVGFillSymbolLayerWidget::mChangeColorButton_colorChanged( 
const QColor &color )
 
 3030 void QgsSVGFillSymbolLayerWidget::mChangeStrokeColorButton_colorChanged( 
const QColor &color )
 
 3041 void QgsSVGFillSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged( 
double d )
 
 3050 void QgsSVGFillSymbolLayerWidget::mTextureWidthUnitWidget_changed()
 
 3060 void QgsSVGFillSymbolLayerWidget::mSvgStrokeWidthUnitWidget_changed()
 
 3076   connect( mAngleSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsLinePatternFillSymbolLayerWidget::mAngleSpinBox_valueChanged );
 
 3077   connect( mDistanceSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsLinePatternFillSymbolLayerWidget::mDistanceSpinBox_valueChanged );
 
 3078   connect( mOffsetSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsLinePatternFillSymbolLayerWidget::mOffsetSpinBox_valueChanged );
 
 3085   mOffsetSpinBox->setClearValue( 0 );
 
 3086   mAngleSpinBox->setClearValue( 0 );
 
 3091   if ( layer->
layerType() != QLatin1String( 
"LinePatternFill" ) )
 
 3100     mAngleSpinBox->blockSignals( 
true );
 
 3102     mAngleSpinBox->blockSignals( 
false );
 
 3103     mDistanceSpinBox->blockSignals( 
true );
 
 3105     mDistanceSpinBox->blockSignals( 
false );
 
 3106     mOffsetSpinBox->blockSignals( 
true );
 
 3108     mOffsetSpinBox->blockSignals( 
false );
 
 3111     mDistanceUnitWidget->blockSignals( 
true );
 
 3114     mDistanceUnitWidget->blockSignals( 
false );
 
 3115     mOffsetUnitWidget->blockSignals( 
true );
 
 3118     mOffsetUnitWidget->blockSignals( 
false );
 
 3130 void QgsLinePatternFillSymbolLayerWidget::mAngleSpinBox_valueChanged( 
double d )
 
 3139 void QgsLinePatternFillSymbolLayerWidget::mDistanceSpinBox_valueChanged( 
double d )
 
 3148 void QgsLinePatternFillSymbolLayerWidget::mOffsetSpinBox_valueChanged( 
double d )
 
 3157 void QgsLinePatternFillSymbolLayerWidget::mDistanceUnitWidget_changed()
 
 3167 void QgsLinePatternFillSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 3183   connect( mHorizontalDistanceSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceSpinBox_valueChanged );
 
 3184   connect( mVerticalDistanceSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceSpinBox_valueChanged );
 
 3185   connect( mHorizontalDisplacementSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementSpinBox_valueChanged );
 
 3186   connect( mVerticalDisplacementSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementSpinBox_valueChanged );
 
 3187   connect( mHorizontalOffsetSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetSpinBox_valueChanged );
 
 3188   connect( mVerticalOffsetSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetSpinBox_valueChanged );
 
 3189   connect( mHorizontalDistanceUnitWidget, &
QgsUnitSelectionWidget::changed, 
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceUnitWidget_changed );
 
 3190   connect( mVerticalDistanceUnitWidget, &
QgsUnitSelectionWidget::changed, 
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceUnitWidget_changed );
 
 3191   connect( mHorizontalDisplacementUnitWidget, &
QgsUnitSelectionWidget::changed, 
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementUnitWidget_changed );
 
 3192   connect( mVerticalDisplacementUnitWidget, &
QgsUnitSelectionWidget::changed, 
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementUnitWidget_changed );
 
 3193   connect( mHorizontalOffsetUnitWidget, &
QgsUnitSelectionWidget::changed, 
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetUnitWidget_changed );
 
 3194   connect( mVerticalOffsetUnitWidget, &
QgsUnitSelectionWidget::changed, 
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetUnitWidget_changed );
 
 3212   if ( !layer || layer->
layerType() != QLatin1String( 
"PointPatternFill" ) )
 
 3225   mHorizontalDistanceUnitWidget->blockSignals( 
true );
 
 3228   mHorizontalDistanceUnitWidget->blockSignals( 
false );
 
 3229   mVerticalDistanceUnitWidget->blockSignals( 
true );
 
 3232   mVerticalDistanceUnitWidget->blockSignals( 
false );
 
 3233   mHorizontalDisplacementUnitWidget->blockSignals( 
true );
 
 3236   mHorizontalDisplacementUnitWidget->blockSignals( 
false );
 
 3237   mVerticalDisplacementUnitWidget->blockSignals( 
true );
 
 3240   mVerticalDisplacementUnitWidget->blockSignals( 
false );
 
 3241   mHorizontalOffsetUnitWidget->blockSignals( 
true );
 
 3244   mHorizontalOffsetUnitWidget->blockSignals( 
false );
 
 3245   mVerticalOffsetUnitWidget->blockSignals( 
true );
 
 3248   mVerticalOffsetUnitWidget->blockSignals( 
false );
 
 3263 void QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceSpinBox_valueChanged( 
double d )
 
 3272 void QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceSpinBox_valueChanged( 
double d )
 
 3281 void QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementSpinBox_valueChanged( 
double d )
 
 3290 void QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementSpinBox_valueChanged( 
double d )
 
 3299 void QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetSpinBox_valueChanged( 
double d )
 
 3308 void QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetSpinBox_valueChanged( 
double d )
 
 3317 void QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceUnitWidget_changed()
 
 3327 void QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceUnitWidget_changed()
 
 3337 void QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementUnitWidget_changed()
 
 3347 void QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementUnitWidget_changed()
 
 3357 void QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetUnitWidget_changed()
 
 3367 void QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetUnitWidget_changed()
 
 3388   connect( mStrokeWidthSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
 
 3389   connect( mHorizontalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
 
 3390   connect( mVerticalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
 
 3400   scrollArea->setVerticalOnly( 
true );
 
 3402   btnColor->setAllowOpacity( 
true );
 
 3403   btnColor->setColorDialogTitle( tr( 
"Select Symbol Fill Color" ) );
 
 3404   btnColor->setContext( QStringLiteral( 
"symbology" ) );
 
 3405   btnStrokeColor->setAllowOpacity( 
true );
 
 3406   btnStrokeColor->setColorDialogTitle( tr( 
"Select Symbol Stroke Color" ) );
 
 3407   btnStrokeColor->setContext( QStringLiteral( 
"symbology" ) );
 
 3409   mColorDDBtn->registerLinkedWidget( btnColor );
 
 3410   mStrokeColorDDBtn->registerLinkedWidget( btnStrokeColor );
 
 3412   spinOffsetX->setClearValue( 0.0 );
 
 3413   spinOffsetY->setClearValue( 0.0 );
 
 3414   spinAngle->setClearValue( 0.0 );
 
 3420     mSizeDDBtn->setSymbol( mAssistantPreviewSymbol );
 
 3423   connect( mFontStyleComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::mFontStyleComboBox_currentIndexChanged );
 
 3425   connect( cboJoinStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::penJoinStyleChanged );
 
 3428   connect( cboJoinStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::penJoinStyleChanged );
 
 3430   connect( spinOffsetX, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::setOffset );
 
 3431   connect( spinOffsetY, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::setOffset );
 
 3442   if ( layer->
layerType() != QLatin1String( 
"FontMarker" ) )
 
 3451   mFontStyleComboBox->blockSignals( 
true );
 
 3452   populateFontStyleComboBox();
 
 3453   mFontStyleComboBox->blockSignals( 
false );
 
 3471   mCharPreview->setFont( mRefFont );
 
 3477   mSizeUnitWidget->blockSignals( 
true );
 
 3480   mSizeUnitWidget->blockSignals( 
false );
 
 3482   mStrokeWidthUnitWidget->blockSignals( 
true );
 
 3485   mStrokeWidthUnitWidget->blockSignals( 
false );
 
 3487   mOffsetUnitWidget->blockSignals( 
true );
 
 3490   mOffsetUnitWidget->blockSignals( 
false );
 
 3511   updateAssistantSymbol();
 
 3524     mRefFont.setFamily( font.family() );
 
 3526     mCharPreview->setFont( mRefFont );
 
 3527     populateFontStyleComboBox();
 
 3532 void QgsFontMarkerSymbolLayerWidget::setFontStyle( 
const QString &style )
 
 3539     mCharPreview->setFont( mRefFont );
 
 3571   mCharPreview->setText( text );
 
 3573   if ( text.isEmpty() )
 
 3577   QString character = text;
 
 3578   if ( text.contains( QRegularExpression( QStringLiteral( 
"^0x[0-9a-fA-F]{1,4}$" ) ) ) )
 
 3581     unsigned int value = text.toUInt( &ok, 0 );
 
 3584       character = QChar( value );
 
 3585       mCharPreview->setText( character );
 
 3606   if ( 
mLayer->
character().length() > 1 || QGuiApplication::keyboardModifiers() & Qt::ControlModifier )
 
 3608     mCharLineEdit->insert( chr );
 
 3614   mCharPreview->setText( chr );
 
 3618 void QgsFontMarkerSymbolLayerWidget::setOffset()
 
 3620   mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
 3624 void QgsFontMarkerSymbolLayerWidget::penJoinStyleChanged()
 
 3630 void QgsFontMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
 
 3640 void QgsFontMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 3650 void QgsFontMarkerSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
 
 3660 void QgsFontMarkerSymbolLayerWidget::populateFontStyleComboBox()
 
 3662   mFontStyleComboBox->clear();
 
 3663   QStringList styles = mFontDB.styles( mRefFont.family() );
 
 3664   const auto constStyles = styles;
 
 3665   for ( 
const QString &style : constStyles )
 
 3667     mFontStyleComboBox->addItem( style );
 
 3670   QString targetStyle = mFontDB.styleString( mRefFont );
 
 3671   if ( !styles.contains( targetStyle ) )
 
 3673     QFont f = QFont( mRefFont.family() );
 
 3674     targetStyle = QFontInfo( f ).styleName();
 
 3675     mRefFont.setStyleName( targetStyle );
 
 3678   int stylIndx = mFontStyleComboBox->findText( targetStyle );
 
 3679   if ( stylIndx > -1 )
 
 3684   mFontStyleComboBox->setCurrentIndex( curIndx );
 
 3687 void QgsFontMarkerSymbolLayerWidget::mFontStyleComboBox_currentIndexChanged( 
int index )
 
 3690   setFontStyle( mFontStyleComboBox->currentText() );
 
 3693 void QgsFontMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged( 
int index )
 
 3702 void QgsFontMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged( 
int index )
 
 3711 void QgsFontMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged( 
double d )
 
 3720 void QgsFontMarkerSymbolLayerWidget::updateAssistantSymbol()
 
 3722   for ( 
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1 ; i >= 0; --i )
 
 3724     mAssistantPreviewSymbol->deleteSymbolLayer( i );
 
 3726   mAssistantPreviewSymbol->appendSymbolLayer( 
mLayer->
clone() );
 
 3729     mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
 
 3741   connect( mDrawInsideCheckBox, &QCheckBox::stateChanged, 
this, &QgsCentroidFillSymbolLayerWidget::mDrawInsideCheckBox_stateChanged );
 
 3742   connect( mDrawAllPartsCheckBox, &QCheckBox::stateChanged, 
this, &QgsCentroidFillSymbolLayerWidget::mDrawAllPartsCheckBox_stateChanged );
 
 3743   connect( mClipPointsCheckBox, &QCheckBox::stateChanged, 
this, &QgsCentroidFillSymbolLayerWidget::mClipPointsCheckBox_stateChanged );
 
 3744   connect( mClipOnCurrentPartOnlyCheckBox, &QCheckBox::stateChanged, 
this, &QgsCentroidFillSymbolLayerWidget::mClipOnCurrentPartOnlyCheckBox_stateChanged );
 
 3749   if ( layer->
layerType() != QLatin1String( 
"CentroidFill" ) )
 
 3767 void QgsCentroidFillSymbolLayerWidget::mDrawInsideCheckBox_stateChanged( 
int state )
 
 3773 void QgsCentroidFillSymbolLayerWidget::mDrawAllPartsCheckBox_stateChanged( 
int state )
 
 3779 void QgsCentroidFillSymbolLayerWidget::mClipPointsCheckBox_stateChanged( 
int state )
 
 3785 void QgsCentroidFillSymbolLayerWidget::mClipOnCurrentPartOnlyCheckBox_stateChanged( 
int state )
 
 3800   mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral( 
"/UI/lastRasterMarkerImageDir" ) );
 
 3804   connect( mRotationSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::setAngle );
 
 3806   connect( mWidthSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::setWidth );
 
 3807   connect( mHeightSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::setHeight );
 
 3815   mSpinOffsetX->setClearValue( 0.0 );
 
 3816   mSpinOffsetY->setClearValue( 0.0 );
 
 3817   mRotationSpinBox->setClearValue( 0.0 );
 
 3819   connect( mSpinOffsetX, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::setOffset );
 
 3820   connect( mSpinOffsetY, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::setOffset );
 
 3823   connect( mHorizontalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
 
 3824   connect( mVerticalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
 
 3834   if ( layer->
layerType() != QLatin1String( 
"RasterMarker" ) )
 
 3845   mHeightSpinBox->blockSignals( 
true );
 
 3846   if ( preservedAspectRatio )
 
 3855   mHeightSpinBox->blockSignals( 
false );
 
 3856   whileBlocking( mLockAspectRatio )->setLocked( preservedAspectRatio );
 
 3864   mSizeUnitWidget->blockSignals( 
true );
 
 3867   mSizeUnitWidget->blockSignals( 
false );
 
 3868   mOffsetUnitWidget->blockSignals( 
true );
 
 3871   mOffsetUnitWidget->blockSignals( 
false );
 
 3886   updatePreviewImage();
 
 3900 void QgsRasterMarkerSymbolLayerWidget::imageSourceChanged( 
const QString &text )
 
 3903   updatePreviewImage();
 
 3907 void QgsRasterMarkerSymbolLayerWidget::updatePreviewImage()
 
 3909   bool fitsInCache = 
false;
 
 3911   if ( image.isNull() )
 
 3913     mLabelImagePreview->setPixmap( QPixmap() );
 
 3917   QImage previewImage( 150, 150, QImage::Format_ARGB32 );
 
 3918   previewImage.fill( Qt::transparent );
 
 3919   QRect imageRect( ( 150 - image.width() ) / 2.0, ( 150 - image.height() ) / 2.0, image.width(), image.height() );
 
 3921   p.begin( &previewImage );
 
 3923   uchar pixDataRGB[] = { 150, 150, 150, 150,
 
 3928   QImage img( pixDataRGB, 2, 2, 8, QImage::Format_ARGB32 );
 
 3929   QPixmap pix = QPixmap::fromImage( img.scaled( 8, 8 ) );
 
 3930   QBrush checkerBrush;
 
 3931   checkerBrush.setTexture( pix );
 
 3932   p.fillRect( imageRect, checkerBrush );
 
 3939   p.drawImage( imageRect.left(), imageRect.top(), image );
 
 3941   mLabelImagePreview->setPixmap( QPixmap::fromImage( previewImage ) );
 
 3944 void QgsRasterMarkerSymbolLayerWidget::setWidth()
 
 3947   double fixedAspectRatio = 0.0;
 
 3948   mHeightSpinBox->blockSignals( 
true );
 
 3949   if ( defaultAspectRatio <= 0.0 )
 
 3951     mHeightSpinBox->setValue( mWidthSpinBox->value() );
 
 3953   else if ( mLockAspectRatio->locked() )
 
 3955     mHeightSpinBox->setValue( mWidthSpinBox->value() * defaultAspectRatio );
 
 3959     fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
 
 3961   mHeightSpinBox->blockSignals( 
false );
 
 3967 void QgsRasterMarkerSymbolLayerWidget::setHeight()
 
 3970   double fixedAspectRatio = 0.0;
 
 3971   mWidthSpinBox->blockSignals( 
true );
 
 3972   if ( defaultAspectRatio <= 0.0 )
 
 3974     mWidthSpinBox->setValue( mHeightSpinBox->value() );
 
 3976   else if ( mLockAspectRatio->locked() )
 
 3978     mWidthSpinBox->setValue( mHeightSpinBox->value() / defaultAspectRatio );
 
 3982     fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
 
 3984   mWidthSpinBox->blockSignals( 
false );
 
 3990 void QgsRasterMarkerSymbolLayerWidget::setLockAspectRatio( 
const bool locked )
 
 3993   if ( defaultAspectRatio <= 0.0 )
 
 4008 void QgsRasterMarkerSymbolLayerWidget::setAngle()
 
 4014 void QgsRasterMarkerSymbolLayerWidget::setOpacity( 
double value )
 
 4018   updatePreviewImage();
 
 4021 void QgsRasterMarkerSymbolLayerWidget::setOffset()
 
 4023   mLayer->
setOffset( QPointF( mSpinOffsetX->value(), mSpinOffsetY->value() ) );
 
 4027 void QgsRasterMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
 
 4037 void QgsRasterMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 4047 void QgsRasterMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged( 
int index )
 
 4056 void QgsRasterMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged( 
int index )
 
 4073   mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral( 
"/UI/lastRasterMarkerImageDir" ) );
 
 4077   connect( mRotationSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterFillSymbolLayerWidget::mRotationSpinBox_valueChanged );
 
 4079   connect( mWidthSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterFillSymbolLayerWidget::mWidthSpinBox_valueChanged );
 
 4086   mSpinOffsetX->setClearValue( 0.0 );
 
 4087   mSpinOffsetY->setClearValue( 0.0 );
 
 4088   mRotationSpinBox->setClearValue( 0.0 );
 
 4090   connect( cboCoordinateMode, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsRasterFillSymbolLayerWidget::setCoordinateMode );
 
 4091   connect( mSpinOffsetX, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterFillSymbolLayerWidget::offsetChanged );
 
 4092   connect( mSpinOffsetY, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterFillSymbolLayerWidget::offsetChanged );
 
 4104   if ( layer->
layerType() != QLatin1String( 
"RasterFill" ) )
 
 4117   cboCoordinateMode->blockSignals( 
true );
 
 4121       cboCoordinateMode->setCurrentIndex( 1 );
 
 4125       cboCoordinateMode->setCurrentIndex( 0 );
 
 4128   cboCoordinateMode->blockSignals( 
false );
 
 4134   mOffsetUnitWidget->blockSignals( 
true );
 
 4137   mOffsetUnitWidget->blockSignals( 
false );
 
 4140   mWidthUnitWidget->blockSignals( 
true );
 
 4143   mWidthUnitWidget->blockSignals( 
false );
 
 4145   updatePreviewImage();
 
 4159 void QgsRasterFillSymbolLayerWidget::imageSourceChanged( 
const QString &text )
 
 4162   updatePreviewImage();
 
 4166 void QgsRasterFillSymbolLayerWidget::setCoordinateMode( 
int index )
 
 4183 void QgsRasterFillSymbolLayerWidget::opacityChanged( 
double value )
 
 4192   updatePreviewImage();
 
 4195 void QgsRasterFillSymbolLayerWidget::offsetChanged()
 
 4197   mLayer->
setOffset( QPointF( mSpinOffsetX->value(), mSpinOffsetY->value() ) );
 
 4201 void QgsRasterFillSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 4212 void QgsRasterFillSymbolLayerWidget::mRotationSpinBox_valueChanged( 
double d )
 
 4221 void QgsRasterFillSymbolLayerWidget::mWidthUnitWidget_changed()
 
 4232 void QgsRasterFillSymbolLayerWidget::mWidthSpinBox_valueChanged( 
double d )
 
 4242 void QgsRasterFillSymbolLayerWidget::updatePreviewImage()
 
 4244   bool fitsInCache = 
false;
 
 4246   if ( image.isNull() )
 
 4248     mLabelImagePreview->setPixmap( QPixmap() );
 
 4252   QImage previewImage( 150, 150, QImage::Format_ARGB32 );
 
 4253   previewImage.fill( Qt::transparent );
 
 4254   QRect imageRect( ( 150 - image.width() ) / 2.0, ( 150 - image.height() ) / 2.0, image.width(), image.height() );
 
 4256   p.begin( &previewImage );
 
 4258   uchar pixDataRGB[] = { 150, 150, 150, 150,
 
 4263   QImage img( pixDataRGB, 2, 2, 8, QImage::Format_ARGB32 );
 
 4264   QPixmap pix = QPixmap::fromImage( img.scaled( 8, 8 ) );
 
 4265   QBrush checkerBrush;
 
 4266   checkerBrush.setTexture( pix );
 
 4267   p.fillRect( imageRect, checkerBrush );
 
 4274   p.drawImage( imageRect.left(), imageRect.top(), image );
 
 4276   mLabelImagePreview->setPixmap( QPixmap::fromImage( previewImage ) );
 
 4285   modificationExpressionSelector->setMultiLine( 
true );
 
 4286   modificationExpressionSelector->setLayer( 
const_cast<QgsVectorLayer *
>( vl ) );
 
 4287   modificationExpressionSelector->registerExpressionContextGenerator( 
this );
 
 4292   connect( cbxGeometryType, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsGeometryGeneratorSymbolLayerWidget::updateSymbolType );
 
 4299   cbxGeometryType->setCurrentIndex( cbxGeometryType->findData( 
static_cast< int >( mLayer->
symbolType() ) ) );
 
 4307 void QgsGeometryGeneratorSymbolLayerWidget::updateExpression( 
const QString &
string )
 
 4314 void QgsGeometryGeneratorSymbolLayerWidget::updateSymbolType()
 
 4334   mPointCountSpinBox->setShowClearButton( 
true );
 
 4335   mPointCountSpinBox->setClearValue( 100 );
 
 4336   mSeedSpinBox->setShowClearButton( 
true );
 
 4337   mSeedSpinBox->setClearValue( 0 );
 
 4339   connect( mCountMethodComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsRandomMarkerFillSymbolLayerWidget::countMethodChanged );
 
 4340   connect( mPointCountSpinBox, 
static_cast < void ( QSpinBox::* )( 
int ) 
> ( &QSpinBox::valueChanged ), 
this, &QgsRandomMarkerFillSymbolLayerWidget::countChanged );
 
 4341   connect( mDensityAreaSpinBox, 
static_cast < void ( QDoubleSpinBox::* )( 
double ) 
> ( &QDoubleSpinBox::valueChanged ), 
this, &QgsRandomMarkerFillSymbolLayerWidget::densityAreaChanged );
 
 4342   connect( mSeedSpinBox, 
static_cast < void ( QSpinBox::* )( 
int ) 
> ( &QSpinBox::valueChanged ), 
this, &QgsRandomMarkerFillSymbolLayerWidget::seedChanged );
 
 4343   connect( mClipPointsCheckBox, &QCheckBox::toggled, 
this, [ = ]( 
bool checked )
 
 4360   if ( !layer || layer->
layerType() != QLatin1String( 
"RandomMarkerFill" ) )
 
 4370   bool showDensityBasedCountWidgets = 
false;
 
 4374       showDensityBasedCountWidgets = 
true;
 
 4379   mDensityAreaLabel->setVisible( showDensityBasedCountWidgets );
 
 4380   mDensityAreaSpinBox->setVisible( showDensityBasedCountWidgets );
 
 4381   mDensityAreaUnitWidget->setVisible( showDensityBasedCountWidgets );
 
 4382   mDensityAreaDdbtn->setVisible( showDensityBasedCountWidgets );
 
 4386   mDensityAreaUnitWidget->blockSignals( 
true );
 
 4389   mDensityAreaUnitWidget->blockSignals( 
false );
 
 4402 void QgsRandomMarkerFillSymbolLayerWidget::countMethodChanged( 
int )
 
 4405   bool showDensityBasedCountWidgets = 
false;
 
 4409       showDensityBasedCountWidgets = 
true;
 
 4414   mDensityAreaLabel->setVisible( showDensityBasedCountWidgets );
 
 4415   mDensityAreaSpinBox->setVisible( showDensityBasedCountWidgets );
 
 4416   mDensityAreaUnitWidget->setVisible( showDensityBasedCountWidgets );
 
 4417   mDensityAreaDdbtn->setVisible( showDensityBasedCountWidgets );
 
 4426 void QgsRandomMarkerFillSymbolLayerWidget::countChanged( 
int d )
 
 4435 void QgsRandomMarkerFillSymbolLayerWidget::densityAreaChanged( 
double d )
 
 4444 void QgsRandomMarkerFillSymbolLayerWidget::densityAreaUnitChanged()
 
 4454 void QgsRandomMarkerFillSymbolLayerWidget::seedChanged( 
int d )
 
static const double UI_SCALE_FACTOR
UI scaling factor.
void sourceChanged(const QString &source)
Emitted whenever the file source is changed in the widget.
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
static QgsImageCache * imageCache()
Returns the application's image cache, used for caching resampled versions of raster images.
static QgsSvgCache * svgCache()
Returns the application's SVG cache, used for caching SVG images and handling parameter replacement w...
static QString nameFromProperty(const QgsPropertyDefinition &def, bool joined=false)
Returns the name of the auxiliary field for a property definition.
bool exists(const QgsPropertyDefinition &definition) const
Returns true if the property is stored in the layer already, false otherwise.
void setPointOnAllParts(bool pointOnAllParts)
Sets whether a point is drawn for all parts or only on the biggest part of multi-part features.
bool pointOnSurface() const
void setClipOnCurrentPartOnly(bool clipOnCurrentPartOnly)
Sets whether point markers should be clipped to the current part boundary only.
void setClipPoints(bool clipPoints)
Sets whether point markers should be clipped to the polygon boundary.
bool pointOnAllParts() const
Returns whether a point is drawn for all parts or only on the biggest part of multi-part features.
bool clipPoints() const
Returns true if point markers should be clipped to the polygon boundary.
bool clipOnCurrentPartOnly() const
Returns true if point markers should be clipped to the current part boundary only.
void setPointOnSurface(bool pointOnSurface)
Abstract base class for color ramps.
A dialog to enter a custom dash space pattern for lines.
Single scope for storing variables and functions for use within a QgsExpressionContext.
void addVariable(const QgsExpressionContextScope::StaticVariable &variable)
Adds a variable into the context scope.
static QgsExpressionContextScope * updateSymbolScope(const QgsSymbol *symbol, QgsExpressionContextScope *symbolScope=nullptr)
Updates a symbol scope related to a QgsSymbol to an expression context.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
static const QString EXPR_GEOMETRY_PART_COUNT
Inbuilt variable name for geometry part count variable.
static const QString EXPR_GEOMETRY_POINT_COUNT
Inbuilt variable name for point count variable.
static const QString EXPR_CLUSTER_SIZE
Inbuilt variable name for cluster size variable.
static const QString EXPR_GEOMETRY_POINT_NUM
Inbuilt variable name for point number variable.
void setOriginalValueVariable(const QVariant &value)
Sets the original value variable value for the context.
static const QString EXPR_GEOMETRY_RING_NUM
Inbuilt variable name for geometry ring number variable.
static const QString EXPR_GEOMETRY_PART_NUM
Inbuilt variable name for geometry part number variable.
static const QString EXPR_SYMBOL_COLOR
Inbuilt variable name for symbol color variable.
QgsExpressionContextScope * lastScope()
Returns the last scope added to the context.
void appendScope(QgsExpressionContextScope *scope)
Appends a scope to the end of the context.
bool hasVariable(const QString &name) const
Check whether a variable is specified by any scope within the context.
void setHighlightedVariables(const QStringList &variableNames)
Sets the list of variable names within the context intended to be highlighted to the user.
static const QString EXPR_ORIGINAL_VALUE
Inbuilt variable name for value original value variable.
static const QString EXPR_CLUSTER_COLOR
Inbuilt variable name for cluster color variable.
void expressionChanged(const QString &expression)
Emitted when the expression is changed.
void setAngle(double angle)
Filled marker symbol layer, consisting of a shape which is rendered using a QgsFillSymbol.
QgsFilledMarkerSymbolLayer * clone() const override
Shall be reimplemented by subclasses to create a deep copy of the instance.
void setStrokeColor(const QColor &color) override
Set stroke color.
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the stroke width map unit scale.
double strokeWidth() const
Returns the marker's stroke width.
void setFontStyle(const QString &style)
Sets the font style for the font which will be used to render the point.
QString fontStyle() const
Returns the font style for the associated font which will be used to render the point.
QColor strokeColor() const override
Gets stroke color.
QString fontFamily() const
Returns the font family name for the associated font which will be used to render the point.
void setCharacter(QString chr)
Sets the character(s) used when rendering points.
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the stroke width unit.
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the stroke width unit.
void setFontFamily(const QString &family)
Sets the font family for the font which will be used to render the point.
const QgsMapUnitScale & strokeWidthMapUnitScale() const
Returns the stroke width map unit scale.
void setStrokeWidth(double width)
Set's the marker's stroke width.
void setPenJoinStyle(Qt::PenJoinStyle style)
Sets the stroke join style.
QgsFontMarkerSymbolLayer * clone() const override
Shall be reimplemented by subclasses to create a deep copy of the instance.
Qt::PenJoinStyle penJoinStyle() const
Returns the stroke join style.
QString character() const
Returns the character(s) used when rendering points.
static QString translateNamedStyle(const QString &namedStyle)
Returns the localized named style of a font, if such a translation is available.
static QString untranslateNamedStyle(const QString &namedStyle)
Returns the english named style of a font, if possible.
static bool updateFontViaStyle(QFont &f, const QString &fontstyle, bool fallback=false)
Updates font with named style and retain all font properties.
QString geometryExpression() const
Gets the expression to generate this geometry.
void setGeometryExpression(const QString &exp)
Set the expression to generate this geometry.
void setSymbolType(Qgis::SymbolType symbolType)
Set the type of symbol which should be created.
Qgis::SymbolType symbolType() const
Access the symbol type.
QgsColorRamp * colorRamp()
Returns the color ramp used for the gradient fill.
void setColorRamp(QgsColorRamp *ramp)
Sets the color ramp used for the gradient fill.
GradientCoordinateMode coordinateMode() const
Coordinate mode for gradient. Controls how the gradient stops are positioned.
QColor color2() const
Color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor.
void setGradientType(GradientType gradientType)
void setCoordinateMode(GradientCoordinateMode coordinateMode)
GradientSpread gradientSpread() const
Gradient spread mode. Controls how the gradient behaves outside of the predefined stops.
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the fill's offset.
bool referencePoint2IsCentroid() const
void setReferencePoint2(QPointF referencePoint)
End point of gradient fill, in the range [0,0] - [1,1].
void setGradientColorType(GradientColorType gradientColorType)
GradientColorType gradientColorType() const
Gradient color mode, controls how gradient color stops are created.
void setGradientSpread(GradientSpread gradientSpread)
void setReferencePoint2IsCentroid(bool isCentroid)
Sets the end point of the gradient to be the feature centroid.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
void setReferencePoint1IsCentroid(bool isCentroid)
Sets the starting point of the gradient to be the feature centroid.
void setOffset(QPointF offset)
Sets an offset by which polygons will be translated during rendering.
QPointF referencePoint1() const
void setReferencePoint1(QPointF referencePoint)
Starting point of gradient fill, in the range [0,0] - [1,1].
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
QPointF offset() const
Returns the offset by which polygons will be translated during rendering.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
GradientType gradientType() const
Type of gradient, e.g., linear or radial.
bool referencePoint1IsCentroid() const
QPointF referencePoint2() const
void setColor2(const QColor &color2)
Line symbol layer type which draws repeating line sections along a line feature.
void setHashLength(double length)
Sets the length of hash symbols.
double hashAngle() const
Returns the angle to use when drawing the hashed lines sections, in degrees clockwise.
QgsUnitTypes::RenderUnit hashLengthUnit() const
Returns the units for the length of hash symbols.
const QgsMapUnitScale & hashLengthMapUnitScale() const
Returns the map unit scale for the hash length.
void setHashLengthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the length of hash symbols.
void setHashLengthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the hash length.
double hashLength() const
Returns the length of hash symbols.
void setHashAngle(double angle)
Sets the angle to use when drawing the hashed lines sections, in degrees clockwise.
static QIcon iconLine()
Returns an icon representing line geometries.
static QIcon iconPolygon()
Returns an icon representing polygon geometries.
static QIcon iconPoint()
Returns an icon representing point geometries.
QImage pathAsImage(const QString &path, const QSize size, const bool keepAspectRatio, const double opacity, bool &fitsInCache, bool blocking=false, bool *isMissing=nullptr)
Returns the specified path rendered as an image.
A symbol fill consisting of repeated parallel lines.
void setMapUnitScale(const QgsMapUnitScale &scale) override
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the pattern's line offset.
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line distance.
double lineAngle() const
Returns the angle for the parallel lines used to fill the symbol.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the line pattern's offset.
void setDistance(double d)
Sets the distance between lines in the fill pattern.
void setDistanceUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the distance between lines in the fill pattern.
void setLineAngle(double a)
Sets the angle for the parallel lines used to fill the symbol.
double offset() const
Returns the offset distance for lines within the fill, which is the distance to offset the parallel l...
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the line pattern's offset.
double distance() const
Returns the distance between lines in the fill pattern.
QgsUnitTypes::RenderUnit distanceUnit() const
Returns the units for the distance between lines in the fill pattern.
void setOffset(double offset)
Sets the offset distance for lines within the fill, which is the distance to offset the parallel line...
const QgsMapUnitScale & distanceMapUnitScale() const
Returns the map unit scale for the pattern's line distance.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line offset.
RenderRingFilter
Options for filtering rings when the line symbol layer is being used to render a polygon's rings.
@ ExteriorRingOnly
Render the exterior ring only.
@ InteriorRingsOnly
Render the interior rings only.
@ AllRings
Render both exterior and interior rings.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the line's offset.
virtual void setWidth(double width)
Sets the width of the line symbol layer.
RenderRingFilter ringFilter() const
Returns the line symbol layer's ring filter, which controls which rings are rendered when the line sy...
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the line's offset.
void setWidthMapUnitScale(const QgsMapUnitScale &scale)
void setWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the line's width.
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the line's offset.
void setOffset(double offset)
Sets the line's offset.
QgsUnitTypes::RenderUnit widthUnit() const
Returns the units for the line's width.
virtual double width() const
Returns the estimated width for the line symbol layer.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the line's offset.
void setRingFilter(QgsLineSymbolLayer::RenderRingFilter filter)
Sets the line symbol layer's ring filter, which controls which rings are rendered when the line symbo...
double offset() const
Returns the line's offset.
const QgsMapUnitScale & widthMapUnitScale() const
A line symbol type, for rendering LineString and MultiLineString geometries.
Line symbol layer type which draws repeating marker symbols along a line feature.
virtual void setSize(double size)
Sets the symbol size.
QPointF offset() const
Returns the marker's offset, which is the horizontal and vertical displacement which the rendered mar...
HorizontalAnchorPoint
Symbol horizontal anchor points.
void setAngle(double angle)
Sets the rotation angle for the marker.
QgsUnitTypes::RenderUnit sizeUnit() const
Returns the units for the symbol's size.
void setSizeUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's size.
void setVerticalAnchorPoint(VerticalAnchorPoint v)
Sets the vertical anchor point for positioning the symbol.
void setHorizontalAnchorPoint(HorizontalAnchorPoint h)
Sets the horizontal anchor point for positioning the symbol.
void setOffset(QPointF offset)
Sets the marker's offset, which is the horizontal and vertical displacement which the rendered marker...
void setSizeMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the symbol's size.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the symbol's offset.
double size() const
Returns the symbol size.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the symbol's offset.
VerticalAnchorPoint verticalAnchorPoint() const
Returns the vertical anchor point for positioning the symbol.
HorizontalAnchorPoint horizontalAnchorPoint() const
Returns the horizontal anchor point for positioning the symbol.
VerticalAnchorPoint
Symbol vertical anchor points.
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's offset.
const QgsMapUnitScale & sizeMapUnitScale() const
Returns the map unit scale for the symbol's size.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the symbol's offset.
double angle() const
Returns the rotation angle for the marker, in degrees clockwise from north.
A marker symbol type, for rendering Point and MultiPoint geometries.
A dialog to create a new auxiliary field.
A dialog to create a new auxiliary layer.
void setDisplacementX(double d)
const QgsMapUnitScale & displacementYMapUnitScale() const
void setOffsetYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical offset for rows in the pattern.
void setOffsetX(double offset)
Sets the horizontal offset values for points in the pattern.
QgsUnitTypes::RenderUnit offsetYUnit() const
Returns the units for the vertical offset for rows in the pattern.
double displacementY() const
const QgsMapUnitScale & offsetYMapUnitScale() const
Returns the unit scale for the vertical offset between rows in the pattern.
QgsUnitTypes::RenderUnit displacementYUnit() const
Returns the units for the vertical displacement between rows in the pattern.
QgsUnitTypes::RenderUnit distanceYUnit() const
Returns the units for the vertical distance between points in the pattern.
double offsetY() const
Returns the vertical offset values for points in the pattern.
void setDisplacementY(double d)
const QgsMapUnitScale & distanceYMapUnitScale() const
void setDisplacementYMapUnitScale(const QgsMapUnitScale &scale)
void setOffsetY(double offset)
Sets the vertical offset values for points in the pattern.
QgsUnitTypes::RenderUnit offsetXUnit() const
Returns the units for the horizontal offset for rows in the pattern.
void setDistanceXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal distance between points in the pattern.
void setDistanceXMapUnitScale(const QgsMapUnitScale &scale)
const QgsMapUnitScale & offsetXMapUnitScale() const
Returns the unit scale for the horizontal offset for rows in the pattern.
void setOffsetYMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the vertical offset for rows in the pattern.
void setDistanceY(double d)
void setDisplacementYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical displacement between rows in the pattern.
void setDistanceX(double d)
double offsetX() const
Returns the horizontal offset values for points in the pattern.
void setDisplacementXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal displacement between rows in the pattern.
void setDisplacementXMapUnitScale(const QgsMapUnitScale &scale)
void setDistanceYMapUnitScale(const QgsMapUnitScale &scale)
QgsUnitTypes::RenderUnit displacementXUnit() const
Returns the units for the horizontal displacement between rows in the pattern.
double displacementX() const
void setOffsetXMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the horizontal offset for rows in the pattern.
void setOffsetXUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the horizontal offset between rows in the pattern.
const QgsMapUnitScale & distanceXMapUnitScale() const
QgsUnitTypes::RenderUnit distanceXUnit() const
Returns the units for the horizontal distance between points in the pattern.
void setDistanceYUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the vertical distance between points in the pattern.
const QgsMapUnitScale & displacementXMapUnitScale() const
QgsProperty property(int key) const override
Returns a matching property from the collection, if one exists.
Definition for a property.
A store for object properties.
void setField(const QString &field)
Sets the field name the property references.
A fill symbol layer which places markers at random locations within polygons.
QgsUnitTypes::RenderUnit densityAreaUnit() const
Returns the units for the density area.
int pointCount() const
Returns the count of random points to render in the fill.
unsigned long seed() const
Returns the random number seed to use when generating points, or 0 if a truly random sequence will be...
void setCountMethod(CountMethod method)
Sets the count method used to randomly fill the polygon.
void setDensityAreaUnitScale(const QgsMapUnitScale &scale)
Sets the map scale for the density area.
void setDensityAreaUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the density area.
bool clipPoints() const
Returns true if point markers should be clipped to the polygon boundary.
void setClipPoints(bool clipped)
Sets whether point markers should be clipped to the polygon boundary.
void setSeed(unsigned long seed)
Sets the random number seed to use when generating points, or 0 if a truly random sequence will be us...
const QgsMapUnitScale & densityAreaUnitScale() const
Returns the map scale for the density area.
void setPointCount(int count)
Sets the count of random points to render in the fill.
CountMethod
Methods to define the number of points randomly filling the polygon.
@ AbsoluteCount
The point count is used as an absolute count of markers.
@ DensityBasedCount
The point count is part of a marker density count.
double densityArea() const
Returns the density area used to count the number of points to randomly fill the polygon.
void setDensityArea(double area)
Sets the density area used to count the number of points to randomly fill the polygon.
CountMethod countMethod() const
Returns the count method used to randomly fill the polygon.
A class for filling symbols with a repeated raster image.
double width() const
Returns the width used for scaling the image used in the fill.
void setWidthUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units for the image's width.
@ Feature
Tiling is based on feature bounding box.
@ Viewport
Tiling is based on complete map viewport.
void setOffsetUnit(const QgsUnitTypes::RenderUnit unit)
Sets the units for the fill's offset.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
QgsUnitTypes::RenderUnit widthUnit() const
Returns the units for the image's width.
void setWidth(const double width)
Sets the width for scaling the image used in the fill.
double opacity() const
Returns the opacity for the raster image used in the fill.
const QgsMapUnitScale & widthMapUnitScale() const
Returns the map unit scale for the image's width.
void setOpacity(double opacity)
Sets the opacity for the raster image used in the fill.
void setWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the image's width.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
QString imageFilePath() const
The path to the raster image used for the fill.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
void setImageFilePath(const QString &imagePath)
Sets the path to the raster image used for the fill.
void setCoordinateMode(FillCoordinateMode mode)
Set the coordinate mode for fill.
QPointF offset() const
Returns the offset for the fill.
void setOffset(QPointF offset)
Sets the offset for the fill.
FillCoordinateMode coordinateMode() const
Coordinate mode for fill.
Raster marker symbol layer class.
void setOpacity(double opacity)
Set the marker opacity.
QString path() const
Returns the marker raster image path.
void setPath(const QString &path)
Set the marker raster image path.
double defaultAspectRatio() const
Returns the default marker aspect ratio between width and height, 0 if not yet calculated.
void setFixedAspectRatio(double ratio)
Set the marker aspect ratio between width and height to be used in rendering, if the value set is low...
bool preservedAspectRatio() const
Returns the preserved aspect ratio value, true if fixed aspect ratio has been lower or equal to 0.
double fixedAspectRatio() const
Returns the marker aspect ratio between width and height to be used in rendering, if the value set is...
double opacity() const
Returns the marker opacity.
A class for filling symbols with a repeated SVG file.
void setParameters(const QMap< QString, QgsProperty > ¶meters)
Sets the dynamic SVG parameters.
QString svgFilePath() const
Returns the path to the SVG file used to render the fill.
void setSvgStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's stroke.
void setPatternWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the width of the SVG images in the pattern.
QColor svgStrokeColor() const
Returns the stroke color used for rendering the SVG content.
const QgsMapUnitScale & svgStrokeWidthMapUnitScale() const
Returns the map unit scale for the pattern's stroke.
void setSvgFillColor(const QColor &c)
Sets the fill color used for rendering the SVG content.
QgsUnitTypes::RenderUnit svgStrokeWidthUnit() const
Returns the units for the stroke width.
double svgStrokeWidth() const
Returns the stroke width used for rendering the SVG content.
void setSvgStrokeWidth(double w)
Sets the stroke width used for rendering the SVG content.
void setSvgFilePath(const QString &svgPath)
Sets the path to the SVG file to render in the fill.
QColor svgFillColor() const
Returns the fill color used for rendering the SVG content.
const QgsMapUnitScale & patternWidthMapUnitScale() const
Returns the map unit scale for the pattern's width.
void setSvgStrokeColor(const QColor &c)
Sets the stroke color used for rendering the SVG content.
void setSvgStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the stroke width.
void setPatternWidth(double width)
Sets the width to render the SVG content as within the fill (i.e.
double patternWidth() const
Returns the width of the rendered SVG content within the fill (i.e.
QgsUnitTypes::RenderUnit patternWidthUnit() const
Returns the units for the width of the SVG images in the pattern.
void setPatternWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's width.
int blurRadius() const
Returns the blur radius, which controls the amount of blurring applied to the fill.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
QgsColorRamp * colorRamp()
Returns the color ramp used for the shapeburst fill.
void setOffset(QPointF offset)
Sets the offset for the shapeburst fill.
const QgsMapUnitScale & distanceMapUnitScale() const
void setBlurRadius(int blurRadius)
Sets the blur radius, which controls the amount of blurring applied to the fill.
void setUseWholeShape(bool useWholeShape)
Sets whether the shapeburst fill should be drawn using the entire shape.
QColor color2() const
Returns the color used for the endpoint of the shapeburst fill.
void setDistanceUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
QgsUnitTypes::RenderUnit distanceUnit() const
Returns the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
void setIgnoreRings(bool ignoreRings)
Sets whether the shapeburst fill should ignore polygon rings when calculating the buffered shading.
void setMaxDistance(double maxDistance)
Sets the maximum distance to shape inside of the shape from the polygon's boundary.
void setColor2(const QColor &color2)
Sets the color for the endpoint of the shapeburst fill.
const QgsMapUnitScale & offsetMapUnitScale() const
void setColorType(ShapeburstColorType colorType)
Sets the color mode to use for the shapeburst fill.
QPointF offset() const
Returns the offset for the shapeburst fill.
bool useWholeShape() const
Returns whether the shapeburst fill is set to cover the entire shape.
ShapeburstColorType colorType() const
Returns the color mode used for the shapeburst fill.
bool ignoreRings() const
Returns whether the shapeburst fill is set to ignore polygon interior rings.
double maxDistance() const
Returns the maximum distance from the shape's boundary which is shaded.
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units used for the offset of the shapeburst fill.
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the units used for the offset for the shapeburst fill.
void setColorRamp(QgsColorRamp *ramp)
Sets the color ramp used to draw the shapeburst fill.
Qt::PenJoinStyle penJoinStyle() const
QColor strokeColor() const override
Gets stroke color.
void setBrushStyle(Qt::BrushStyle style)
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the width of the fill's stroke.
void setPenJoinStyle(Qt::PenJoinStyle style)
Qt::PenStyle strokeStyle() const
double strokeWidth() const
void setStrokeWidth(double strokeWidth)
void setStrokeStyle(Qt::PenStyle strokeStyle)
const QgsMapUnitScale & strokeWidthMapUnitScale() const
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
QPointF offset()
Returns the offset by which polygons will be translated during rendering.
void setOffset(QPointF offset)
Sets an offset by which polygons will be translated during rendering.
void setStrokeColor(const QColor &strokeColor) override
Set stroke color.
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the fill's offset.
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the width of the fill's stroke.
Qt::BrushStyle brushStyle() const
A simple line symbol layer, which renders lines using a line in a variety of styles (e....
QgsUnitTypes::RenderUnit dashPatternOffsetUnit() const
Returns the units for the dash pattern offset.
void setDrawInsidePolygon(bool drawInsidePolygon)
Sets whether the line should only be drawn inside polygons, and any portion of the line which falls o...
bool tweakDashPatternOnCorners() const
Returns true if dash patterns tweaks should be applied on sharp corners, to ensure that a double-leng...
void setPenCapStyle(Qt::PenCapStyle style)
Sets the pen cap style used to render the line (e.g.
const QgsMapUnitScale & trimDistanceStartMapUnitScale() const
Returns the map unit scale for the trim distance for the start of the line.
Qt::PenJoinStyle penJoinStyle() const
Returns the pen join style used to render the line (e.g.
void setDashPatternOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the dash pattern offset.
QgsUnitTypes::RenderUnit trimDistanceStartUnit() const
Returns the unit for the trim distance for the start of the line.
void setCustomDashPatternMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for lengths used in the custom dash pattern.
QgsUnitTypes::RenderUnit customDashPatternUnit() const
Returns the units for lengths used in the custom dash pattern.
void setTrimDistanceEndMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the trim distance for the end of the line.
QVector< qreal > customDashVector() const
Returns the custom dash vector, which is the pattern of alternating drawn/skipped lengths used while ...
void setTrimDistanceEnd(double distance)
Sets the trim distance for the end of the line, which dictates a length from the end of the line at w...
void setCustomDashPatternUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for lengths used in the custom dash pattern.
double trimDistanceStart() const
Returns the trim distance for the start of the line, which dictates a length from the start of the li...
void setUseCustomDashPattern(bool b)
Sets whether the line uses a custom dash pattern.
void setTweakDashPatternOnCorners(bool enabled)
Sets whether dash patterns tweaks should be applied on sharp corners, to ensure that a double-length ...
double trimDistanceEnd() const
Returns the trim distance for the end of the line, which dictates a length from the end of the line a...
void setCustomDashVector(const QVector< qreal > &vector)
Sets the custom dash vector, which is the pattern of alternating drawn/skipped lengths used while ren...
bool useCustomDashPattern() const
Returns true if the line uses a custom dash pattern.
QgsUnitTypes::RenderUnit trimDistanceEndUnit() const
Returns the unit for the trim distance for the end of the line.
void setDashPatternOffset(double offset)
Sets the dash pattern offset, which dictates how far along the dash pattern the pattern should start ...
const QgsMapUnitScale & dashPatternOffsetMapUnitScale() const
Returns the map unit scale for the dash pattern offset value.
void setDashPatternOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the dash pattern offset.
QgsSimpleLineSymbolLayer * clone() const override
Shall be reimplemented by subclasses to create a deep copy of the instance.
void setPenStyle(Qt::PenStyle style)
Sets the pen style used to render the line (e.g.
Qt::PenStyle penStyle() const
Returns the pen style used to render the line (e.g.
void setPenJoinStyle(Qt::PenJoinStyle style)
Sets the pen join style used to render the line (e.g.
double dashPatternOffset() const
Returns the dash pattern offset, which dictates how far along the dash pattern the pattern should sta...
void setAlignDashPattern(bool enabled)
Sets whether dash patterns should be aligned to the start and end of lines, by applying subtle tweaks...
void setTrimDistanceStartUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the trim distance for the start of the line.
void setTrimDistanceStartMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the trim distance for the start of the line.
void setTrimDistanceEndUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the trim distance for the end of the line.
Qt::PenCapStyle penCapStyle() const
Returns the pen cap style used to render the line (e.g.
const QgsMapUnitScale & trimDistanceEndMapUnitScale() const
Returns the map unit scale for the trim distance for the end of the line.
const QgsMapUnitScale & customDashPatternMapUnitScale() const
Returns the map unit scale for lengths used in the custom dash pattern.
bool drawInsidePolygon() const
Returns true if the line should only be drawn inside polygons, and any portion of the line which fall...
void setMapUnitScale(const QgsMapUnitScale &scale) override
void setTrimDistanceStart(double distance)
Sets the trim distance for the start of the line, which dictates a length from the start of the line ...
bool alignDashPattern() const
Returns true if dash patterns should be aligned to the start and end of lines, by applying subtle twe...
static bool shapeIsFilled(QgsSimpleMarkerSymbolLayerBase::Shape shape)
Returns true if a symbol shape has a fill.
static QList< QgsSimpleMarkerSymbolLayerBase::Shape > availableShapes()
Returns a list of all available shape types.
QgsSimpleMarkerSymbolLayerBase::Shape shape() const
Returns the shape for the rendered marker symbol.
void setShape(QgsSimpleMarkerSymbolLayerBase::Shape shape)
Sets the rendered marker shape.
static QString encodeShape(QgsSimpleMarkerSymbolLayerBase::Shape shape)
Encodes a shape to its string representation.
Shape
Marker symbol shapes.
Simple marker symbol layer, consisting of a rendered shape with solid fill color and an stroke.
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit u)
Sets the unit for the width of the marker's stroke.
void setColor(const QColor &color) override
The fill color.
Qt::PenJoinStyle penJoinStyle() const
Returns the marker's stroke join style (e.g., miter, bevel, etc).
QgsSimpleMarkerSymbolLayer * clone() const override
Shall be reimplemented by subclasses to create a deep copy of the instance.
Qt::PenCapStyle penCapStyle() const
Returns the marker's stroke cap style (e.g., flat, round, etc).
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map scale for the width of the marker's stroke.
void setStrokeStyle(Qt::PenStyle strokeStyle)
Sets the marker's stroke style (e.g., solid, dashed, etc)
const QgsMapUnitScale & strokeWidthMapUnitScale() const
Returns the map scale for the width of the marker's stroke.
QColor fillColor() const override
Gets fill color.
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the unit for the width of the marker's stroke.
void setPenJoinStyle(Qt::PenJoinStyle style)
Sets the marker's stroke join style (e.g., miter, bevel, etc).
QColor strokeColor() const override
Returns the marker's stroke color.
void setStrokeWidth(double w)
Sets the width of the marker's stroke.
void setStrokeColor(const QColor &color) override
Sets the marker's stroke color.
Qt::PenStyle strokeStyle() const
Returns the marker's stroke style (e.g., solid, dashed, etc)
void setPenCapStyle(Qt::PenCapStyle style)
Sets the marker's stroke cap style (e.g., flat, round, etc).
double strokeWidth() const
Returns the width of the marker's stroke.
void containsParams(const QString &path, bool &hasFillParam, QColor &defaultFillColor, bool &hasStrokeParam, QColor &defaultStrokeColor, bool &hasStrokeWidthParam, double &defaultStrokeWidth, bool blocking=false) const
Tests if an SVG file contains parameters for fill, stroke color, stroke width.
QgsSvgMarkerSymbolLayer * clone() const override
Shall be reimplemented by subclasses to create a deep copy of the instance.
QColor fillColor() const override
Gets fill color.
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
QString path() const
Returns the marker SVG path.
bool preservedAspectRatio() const
Returns the preserved aspect ratio value, true if fixed aspect ratio has been lower or equal to 0.
void setStrokeWidth(double w)
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the stroke width.
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the stroke width.
const QgsMapUnitScale & strokeWidthMapUnitScale() const
double fixedAspectRatio() const
Returns the marker aspect ratio between width and height to be used in rendering, if the value set is...
void setStrokeColor(const QColor &c) override
Set stroke color.
void setMapUnitScale(const QgsMapUnitScale &scale) override
QColor strokeColor() const override
Gets stroke color.
void setFillColor(const QColor &color) override
Set fill color.
double strokeWidth() const
QMap< QString, QgsProperty > parameters() const
Returns the dynamic SVG parameters.
void setParameters(const QMap< QString, QgsProperty > ¶meters)
Sets the dynamic SVG parameters.
void setFixedAspectRatio(double ratio)
Set the marker aspect ratio between width and height to be used in rendering, if the value set is low...
void setPath(const QString &path)
Set the marker SVG path.
double defaultAspectRatio() const
Returns the default marker aspect ratio between width and height, 0 if not yet calculated.
void sourceChanged(const QString &source)
Emitted whenever the SVG source is changed in the widget.
static QPixmap symbolPreviewPixmap(const QgsSymbol *symbol, QSize size, int padding=0, QgsRenderContext *customContext=nullptr, bool selected=false, const QgsExpressionContext *expressionContext=nullptr, const QgsLegendPatchShape *shape=nullptr)
Returns a pixmap preview for a color ramp.
static QIcon symbolPreviewIcon(const QgsSymbol *symbol, QSize size, int padding=0, QgsLegendPatchShape *shape=nullptr)
Returns an icon preview for a color ramp.
static QIcon symbolLayerPreviewIcon(const QgsSymbolLayer *layer, QgsUnitTypes::RenderUnit u, QSize size, const QgsMapUnitScale &scale=QgsMapUnitScale())
Draws a symbol layer preview to an icon.
Property
Data definable properties.
@ PropertyGradientReference1X
Gradient reference point 1 x.
@ PropertyShapeburstIgnoreRings
Shapeburst ignore rings.
@ PropertyGradientReference2X
Gradient reference point 2 x.
@ PropertyStrokeStyle
Stroke style (eg solid, dashed)
@ PropertyPlacement
Line marker placement.
@ PropertyHorizontalAnchor
Horizontal anchor point.
@ PropertyDistanceX
Horizontal distance between points.
@ PropertyFile
Filename, eg for svg files.
@ PropertyGradientType
Gradient fill type.
@ PropertyCapStyle
Line cap style.
@ PropertyAngle
Symbol angle.
@ PropertyDistanceY
Vertical distance between points.
@ PropertyDisplacementX
Horizontal displacement.
@ PropertyVerticalAnchor
Vertical anchor point.
@ PropertyGradientSpread
Gradient spread mode.
@ PropertyOffsetY
Vertical offset.
@ PropertyGradientReference1Y
Gradient reference point 1 y.
@ PropertyLineDistance
Distance between lines, or length of lines for hash line symbols.
@ PropertyOffsetAlongLine
Offset along line.
@ PropertyBlurRadius
Shapeburst blur radius.
@ PropertyGradientReference2Y
Gradient reference point 2 y.
@ PropertyDensityArea
Density area.
@ PropertyGradientReference1IsCentroid
Gradient reference point 1 is centroid.
@ PropertyCustomDash
Custom dash pattern.
@ PropertyShapeburstUseWholeShape
Shapeburst use whole shape.
@ PropertySize
Symbol size.
@ PropertyOffsetX
Horizontal offset.
@ PropertyJoinStyle
Line join style.
@ PropertyTrimEnd
Trim distance from end of line (since QGIS 3.20)
@ PropertyOpacity
Opacity.
@ PropertySecondaryColor
Secondary color (eg for gradient fills)
@ PropertyCharacter
Character, eg for font marker symbol layers.
@ PropertyCoordinateMode
Gradient coordinate mode.
@ PropertyLineAngle
Line angle, or angle of hash lines for hash line symbols.
@ PropertyShapeburstMaxDistance
Shapeburst fill from edge distance.
@ PropertyTrimStart
Trim distance from start of line (since QGIS 3.20)
@ PropertyOffset
Symbol offset.
@ PropertyStrokeWidth
Stroke width.
@ PropertyDashPatternOffset
Dash pattern offset,.
@ PropertyFillColor
Fill color.
@ PropertyFontStyle
Font style.
@ PropertyHeight
Symbol height.
@ PropertyClipPoints
Whether markers should be clipped to polygon boundaries.
@ PropertyFontFamily
Font family.
@ PropertyPointCount
Point count.
@ PropertyRandomSeed
Random number seed.
@ PropertyName
Name, eg shape name for simple markers.
@ PropertyAverageAngleLength
Length to average symbol angles over.
@ PropertyInterval
Line marker interval.
@ PropertyFillStyle
Fill style (eg solid, dots)
@ PropertyDisplacementY
Vertical displacement.
@ PropertyStrokeColor
Stroke color.
@ PropertyGradientReference2IsCentroid
Gradient reference point 2 is centroid.
@ PropertyWidth
Symbol width.
virtual QColor color() const
The fill color.
virtual QString layerType() const =0
Returns a string that represents this layer type.
virtual void setDataDefinedProperty(Property key, const QgsProperty &property)
Sets a data defined property for the layer.
static const QgsPropertiesDefinition & propertyDefinitions()
Returns the symbol layer property definitions.
virtual void setColor(const QColor &color)
The fill color.
QgsPropertyCollection & dataDefinedProperties()
Returns a reference to the symbol layer's property collection, used for data defined overrides.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
QList< QgsExpressionContextScope > additionalExpressionContextScopes() const
Returns the list of additional expression context scopes to show as available within the layer.
QList< QgsExpressionContextScope * > globalProjectAtlasMapLayerScopes(const QgsMapLayer *layer) const
Returns list of scopes: global, project, atlas, map, layer.
QgsExpressionContext * expressionContext() const
Returns the expression context used for the widget, if set.
QgsMapCanvas * mapCanvas() const
Returns the map canvas associated with the widget.
Qgis::SymbolType symbolType() const
Returns the associated symbol type, if the widget is being shown as a subcomponent of a parent symbol...
QgsMessageBar * messageBar() const
Returns the message bar associated with the widget.
bool rotateSymbols() const
Returns true if the repeating symbols be rotated to match their line segment orientation.
double averageAngleLength() const
Returns the length of line over which the line's direction is averaged when calculating individual sy...
const QgsMapUnitScale & intervalMapUnitScale() const
Returns the map unit scale for the interval between symbols.
void setMapUnitScale(const QgsMapUnitScale &scale) FINAL
void setRotateSymbols(bool rotate)
Sets whether the repeating symbols should be rotated to match their line segment orientation.
Placement placement() const
Returns the placement of the symbols.
@ Vertex
Place symbols on every vertex in the line.
@ LastVertex
Place symbols on the last vertex in the line.
@ CentralPoint
Place symbols at the mid point of the line.
@ FirstVertex
Place symbols on the first vertex in the line.
@ SegmentCenter
Place symbols at the center of every line segment.
@ Interval
Place symbols at regular intervals.
@ CurvePoint
Place symbols at every virtual curve point in the line (used when rendering curved geometry types onl...
const QgsMapUnitScale & averageAngleMapUnitScale() const
Returns the map unit scale for the length over which the line's direction is averaged when calculatin...
double interval() const
Returns the interval between individual symbols.
void setAverageAngleMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the length over which the line's direction is averaged when calculating i...
double offsetAlongLine() const
Returns the offset along the line for the symbol placement.
void setOffsetAlongLine(double offsetAlongLine)
Sets the the offset along the line for the symbol placement.
void setPlacement(Placement placement)
Sets the placement of the symbols.
void setOffsetAlongLineUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit used for calculating the offset along line for symbols.
void setInterval(double interval)
Sets the interval between individual symbols.
const QgsMapUnitScale & offsetAlongLineMapUnitScale() const
Returns the map unit scale used for calculating the offset in map units along line for symbols.
QgsUnitTypes::RenderUnit averageAngleUnit() const
Returns the unit for the length over which the line's direction is averaged when calculating individu...
QgsUnitTypes::RenderUnit offsetAlongLineUnit() const
Returns the unit used for calculating the offset along line for symbols.
QgsUnitTypes::RenderUnit intervalUnit() const
Returns the units for the interval between symbols.
void setAverageAngleUnit(QgsUnitTypes::RenderUnit unit)
Sets the unit for the length over which the line's direction is averaged when calculating individual ...
void setIntervalUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the interval between symbols.
void setIntervalMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the interval between symbols.
void setOffsetAlongLineMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for calculating the offset in map units along line for symbols.
void setAverageAngleLength(double length)
Sets the length of line over which the line's direction is averaged when calculating individual symbo...
QList< QgsUnitTypes::RenderUnit > RenderUnitList
List of render units.
@ RenderMetersInMapUnits
Meters value as Map units.
@ RenderPercentage
Percentage of another measurement (e.g., canvas size, feature size)
@ RenderPoints
Points (e.g., for font sizes)
@ RenderMillimeters
Millimeters.
@ RenderMapUnits
Map units.
Represents a vector layer which manages a vector based data sets.
QgsAuxiliaryLayer * auxiliaryLayer()
Returns the current auxiliary layer.
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.
QList< QgsSymbolLayer * > QgsSymbolLayerList
Single variable definition for use within a QgsExpressionContextScope.