18#include "moc_qgssymbollayerwidget.cpp"
49#include <QAbstractButton>
50#include <QButtonGroup>
51#include <QColorDialog>
56#include <QStandardItemModel>
57#include <QSvgRenderer>
61#include <QInputDialog>
63#include <QRegularExpression>
69 return *lExpressionContext;
80 expContext << symbolScope;
102 QStringList highlights;
108 << QStringLiteral(
"symbol_layer_count" ) << QStringLiteral(
"symbol_layer_index" ) << QStringLiteral(
"symbol_frame" );
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() );
149void 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 )
325void 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 const 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();
455void QgsSimpleLineSymbolLayerWidget::penWidthChanged()
462void QgsSimpleLineSymbolLayerWidget::colorChanged(
const QColor &color )
468void QgsSimpleLineSymbolLayerWidget::penStyleChanged()
477void QgsSimpleLineSymbolLayerWidget::offsetChanged()
484void QgsSimpleLineSymbolLayerWidget::patternOffsetChanged()
491void QgsSimpleLineSymbolLayerWidget::mCustomCheckBox_stateChanged(
int state )
493 const bool checked = ( state == Qt::Checked );
494 mChangePatternButton->setEnabled( checked );
495 label_3->setEnabled( !checked );
496 cboPenStyle->setEnabled( !checked );
502void QgsSimpleLineSymbolLayerWidget::mChangePatternButton_clicked()
509 widget->
setUnit( mDashPatternUnitWidget->unit() );
521 d.setUnit( mDashPatternUnitWidget->unit() );
522 if ( d.exec() == QDialog::Accepted )
530void QgsSimpleLineSymbolLayerWidget::mPenWidthUnitWidget_changed()
541void QgsSimpleLineSymbolLayerWidget::mOffsetUnitWidget_changed()
551void QgsSimpleLineSymbolLayerWidget::mDashPatternUnitWidget_changed()
562void QgsSimpleLineSymbolLayerWidget::mDrawInsideCheckBox_stateChanged(
int state )
564 const bool checked = ( state == Qt::Checked );
569void QgsSimpleLineSymbolLayerWidget::patternOffsetUnitChanged()
586 std::unique_ptr< QgsSimpleLineSymbolLayer > layerCopy(
mLayer->
clone() );
591 const 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 const std::unique_ptr< QgsLineSymbol > previewSymbol = std::make_unique< QgsLineSymbol >(
QgsSymbolLayerList() << layerCopy.release() );
613 mChangePatternButton->setIconSize( currentIconSize );
614 mChangePatternButton->setIcon( icon );
618 const int width =
static_cast< int >(
Qgis::UI_SCALE_FACTOR * fontMetrics().horizontalAdvance(
'X' ) * 23 );
619 const 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' width=\"%4\">" ).arg( QString( data.toBase64() ) ).arg( width ) );
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 const 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 )
733 if (
static_cast< Qgis::MarkerShape >( lstNames->item( i )->data( Qt::UserRole ).toInt() ) == shape )
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();
815void QgsSimpleMarkerSymbolLayerWidget::setShape()
834void QgsSimpleMarkerSymbolLayerWidget::penJoinStyleChanged()
840void QgsSimpleMarkerSymbolLayerWidget::penCapStyleChanged()
846void QgsSimpleMarkerSymbolLayerWidget::setSize()
852void QgsSimpleMarkerSymbolLayerWidget::setAngle()
858void QgsSimpleMarkerSymbolLayerWidget::setOffset()
860 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
864void QgsSimpleMarkerSymbolLayerWidget::mStrokeStyleComboBox_currentIndexChanged(
int index )
875void QgsSimpleMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged(
double d )
884void QgsSimpleMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
894void QgsSimpleMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
904void QgsSimpleMarkerSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
914void QgsSimpleMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged(
int index )
923void QgsSimpleMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged(
int index )
932void 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 );
1056void QgsSimpleFillSymbolLayerWidget::setBrushStyle()
1062void QgsSimpleFillSymbolLayerWidget::strokeWidthChanged()
1068void QgsSimpleFillSymbolLayerWidget::strokeStyleChanged()
1075void QgsSimpleFillSymbolLayerWidget::offsetChanged()
1077 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
1081void QgsSimpleFillSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
1091void 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 const 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 )
1172 if (
static_cast< Qgis::MarkerShape >( lstNames->item( i )->data( Qt::UserRole ).toInt() ) == shape )
1174 lstNames->setCurrentRow( i );
1183 mSizeUnitWidget->blockSignals(
true );
1186 mSizeUnitWidget->blockSignals(
false );
1187 mOffsetUnitWidget->blockSignals(
true );
1190 mOffsetUnitWidget->blockSignals(
false );
1203 updateAssistantSymbol();
1211void QgsFilledMarkerSymbolLayerWidget::setShape()
1217void QgsFilledMarkerSymbolLayerWidget::setSize()
1223void QgsFilledMarkerSymbolLayerWidget::setAngle()
1229void QgsFilledMarkerSymbolLayerWidget::setOffset()
1231 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
1235void QgsFilledMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
1245void QgsFilledMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
1255void QgsFilledMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged(
int index )
1264void QgsFilledMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged(
int index )
1273void 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 );
1493void 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 );
1590void QgsGradientFillSymbolLayerWidget::offsetChanged()
1592 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
1596void QgsGradientFillSymbolLayerWidget::referencePointChanged()
1605void QgsGradientFillSymbolLayerWidget::mSpinAngle_valueChanged(
double value )
1611void 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 );
1794void QgsShapeburstFillSymbolLayerWidget::colorModeChanged()
1801 if ( radioTwoColor->isChecked() )
1812void QgsShapeburstFillSymbolLayerWidget::mSpinBlurRadius_valueChanged(
int value )
1821void QgsShapeburstFillSymbolLayerWidget::mSpinMaxDistance_valueChanged(
double value )
1830void QgsShapeburstFillSymbolLayerWidget::mDistanceUnitWidget_changed()
1840void QgsShapeburstFillSymbolLayerWidget::mRadioUseWholeShape_toggled(
bool value )
1845 mDistanceUnitWidget->setEnabled( !value );
1850void QgsShapeburstFillSymbolLayerWidget::applyColorRamp()
1860void QgsShapeburstFillSymbolLayerWidget::offsetChanged()
1864 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
1869void QgsShapeburstFillSymbolLayerWidget::mOffsetUnitWidget_changed()
1880void QgsShapeburstFillSymbolLayerWidget::mIgnoreRingsCheckBox_stateChanged(
int state )
1882 const bool checked = ( state == Qt::Checked );
1911 connect( mRingFilterComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ](
int )
1920 spinOffset->setClearValue( 0.0 );
1921 mSpinOffsetAlongLine->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( mCheckInterval, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1930 connect( mCheckVertex, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1931 connect( mCheckVertexLast, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1932 connect( mCheckVertexFirst, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1933 connect( mCheckCentralPoint, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1934 connect( mCheckCurvePoint, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1935 connect( mCheckSegmentCentralPoint, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1936 connect( mCheckPlaceOnEveryPart, &QCheckBox::toggled,
this, [ = ]
1948 if ( layer->
layerType() != QLatin1String(
"MarkerLine" ) )
1955 spinInterval->blockSignals(
true );
1957 spinInterval->blockSignals(
false );
1958 mSpinOffsetAlongLine->blockSignals(
true );
1960 mSpinOffsetAlongLine->blockSignals(
false );
1961 chkRotateMarker->blockSignals(
true );
1963 chkRotateMarker->blockSignals(
false );
1964 spinOffset->blockSignals(
true );
1966 spinOffset->blockSignals(
false );
1981 mIntervalUnitWidget->blockSignals(
true );
1984 mIntervalUnitWidget->blockSignals(
false );
1985 mOffsetUnitWidget->blockSignals(
true );
1988 mOffsetUnitWidget->blockSignals(
false );
1989 mOffsetAlongLineUnitWidget->blockSignals(
true );
1992 mOffsetAlongLineUnitWidget->blockSignals(
false );
2023 mRingFilterComboBox->hide();
2024 mRingsLabel->hide();
2045void QgsMarkerLineSymbolLayerWidget::setRotate()
2047 mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( mCheckInterval->isChecked() || mCheckCentralPoint->isChecked() ) );
2048 mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
2054void QgsMarkerLineSymbolLayerWidget::setOffset()
2060void QgsMarkerLineSymbolLayerWidget::setPlacement()
2062 const bool interval = mCheckInterval->isChecked();
2063 spinInterval->setEnabled( interval );
2064 mSpinOffsetAlongLine->setEnabled( mCheckInterval->isChecked() || mCheckVertexLast->isChecked() || mCheckVertexFirst->isChecked() );
2065 mOffsetAlongLineUnitWidget->setEnabled( mSpinOffsetAlongLine->isEnabled() );
2066 mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( mCheckInterval->isChecked() || mCheckCentralPoint->isChecked() ) );
2067 mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
2068 mCheckPlaceOnEveryPart->setEnabled( mCheckVertexLast->isChecked() || mCheckVertexFirst->isChecked() );
2071 if ( mCheckInterval->isChecked() )
2073 if ( mCheckVertex->isChecked() )
2075 if ( mCheckVertexLast->isChecked() )
2077 if ( mCheckVertexFirst->isChecked() )
2079 if ( mCheckCurvePoint->isChecked() )
2081 if ( mCheckSegmentCentralPoint->isChecked() )
2083 if ( mCheckCentralPoint->isChecked() )
2090void QgsMarkerLineSymbolLayerWidget::mIntervalUnitWidget_changed()
2100void QgsMarkerLineSymbolLayerWidget::mOffsetUnitWidget_changed()
2110void QgsMarkerLineSymbolLayerWidget::mOffsetAlongLineUnitWidget_changed()
2120void QgsMarkerLineSymbolLayerWidget::averageAngleUnitChanged()
2130void QgsMarkerLineSymbolLayerWidget::setAverageAngle(
double val )
2167 connect( mRingFilterComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ](
int )
2176 spinOffset->setClearValue( 0.0 );
2177 mSpinOffsetAlongLine->setClearValue( 0.0 );
2178 mHashRotationSpinBox->setClearValue( 0 );
2179 mSpinAverageAngleLength->setClearValue( 4.0 );
2181 connect( spinInterval,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsHashedLineSymbolLayerWidget::setInterval );
2182 connect( mSpinOffsetAlongLine,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsHashedLineSymbolLayerWidget::setOffsetAlongLine );
2183 connect( mSpinHashLength,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsHashedLineSymbolLayerWidget::setHashLength );
2184 connect( mHashRotationSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsHashedLineSymbolLayerWidget::setHashAngle );
2185 connect( chkRotateMarker, &QAbstractButton::clicked,
this, &QgsHashedLineSymbolLayerWidget::setRotate );
2186 connect( spinOffset,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsHashedLineSymbolLayerWidget::setOffset );
2187 connect( mSpinAverageAngleLength,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsHashedLineSymbolLayerWidget::setAverageAngle );
2189 connect( mCheckInterval, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2190 connect( mCheckVertex, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2191 connect( mCheckVertexLast, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2192 connect( mCheckVertexFirst, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2193 connect( mCheckCentralPoint, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2194 connect( mCheckCurvePoint, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2195 connect( mCheckSegmentCentralPoint, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2197 connect( mCheckPlaceOnEveryPart, &QCheckBox::toggled,
this, [ = ]
2209 if ( layer->
layerType() != QLatin1String(
"HashLine" ) )
2216 spinInterval->blockSignals(
true );
2217 spinInterval->setValue( mLayer->
interval() );
2218 spinInterval->blockSignals(
false );
2219 mSpinOffsetAlongLine->blockSignals(
true );
2221 mSpinOffsetAlongLine->blockSignals(
false );
2224 chkRotateMarker->blockSignals(
true );
2226 chkRotateMarker->blockSignals(
false );
2227 spinOffset->blockSignals(
true );
2228 spinOffset->setValue( mLayer->
offset() );
2229 spinOffset->blockSignals(
false );
2244 mIntervalUnitWidget->blockSignals(
true );
2245 mIntervalUnitWidget->setUnit( mLayer->
intervalUnit() );
2247 mIntervalUnitWidget->blockSignals(
false );
2248 mOffsetUnitWidget->blockSignals(
true );
2249 mOffsetUnitWidget->setUnit( mLayer->
offsetUnit() );
2251 mOffsetUnitWidget->blockSignals(
false );
2252 mOffsetAlongLineUnitWidget->blockSignals(
true );
2255 mOffsetAlongLineUnitWidget->blockSignals(
false );
2262 whileBlocking( mRingFilterComboBox )->setCurrentIndex( mRingFilterComboBox->findData( mLayer->
ringFilter() ) );
2289 mRingFilterComboBox->hide();
2290 mRingsLabel->hide();
2299void QgsHashedLineSymbolLayerWidget::setInterval(
double val )
2305void QgsHashedLineSymbolLayerWidget::setOffsetAlongLine(
double val )
2311void QgsHashedLineSymbolLayerWidget::setHashLength(
double val )
2317void QgsHashedLineSymbolLayerWidget::setHashAngle(
double val )
2323void QgsHashedLineSymbolLayerWidget::setRotate()
2325 mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( mCheckInterval->isChecked() || mCheckCentralPoint->isChecked() ) );
2326 mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
2332void QgsHashedLineSymbolLayerWidget::setOffset()
2334 mLayer->
setOffset( spinOffset->value() );
2338void QgsHashedLineSymbolLayerWidget::setPlacement()
2340 const bool interval = mCheckInterval->isChecked();
2341 spinInterval->setEnabled( interval );
2342 mSpinOffsetAlongLine->setEnabled( mCheckInterval->isChecked() || mCheckVertexLast->isChecked() || mCheckVertexFirst->isChecked() );
2343 mOffsetAlongLineUnitWidget->setEnabled( mSpinOffsetAlongLine->isEnabled() );
2344 mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( mCheckInterval->isChecked() || mCheckCentralPoint->isChecked() ) );
2345 mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
2346 mCheckPlaceOnEveryPart->setEnabled( mCheckVertexLast->isChecked() || mCheckVertexFirst->isChecked() );
2349 if ( mCheckInterval->isChecked() )
2351 if ( mCheckVertex->isChecked() )
2353 if ( mCheckVertexLast->isChecked() )
2355 if ( mCheckVertexFirst->isChecked() )
2357 if ( mCheckCurvePoint->isChecked() )
2359 if ( mCheckSegmentCentralPoint->isChecked() )
2361 if ( mCheckCentralPoint->isChecked() )
2368void QgsHashedLineSymbolLayerWidget::mIntervalUnitWidget_changed()
2378void QgsHashedLineSymbolLayerWidget::mOffsetUnitWidget_changed()
2388void QgsHashedLineSymbolLayerWidget::mOffsetAlongLineUnitWidget_changed()
2398void QgsHashedLineSymbolLayerWidget::hashLengthUnitWidgetChanged()
2408void QgsHashedLineSymbolLayerWidget::averageAngleUnitChanged()
2418void QgsHashedLineSymbolLayerWidget::setAverageAngle(
double val )
2437 mSvgSelectorWidget->setAllowParameters(
true );
2438 mSvgSelectorWidget->sourceLineEdit()->setPropertyOverrideToolButtonVisible(
true );
2439 mSvgSelectorWidget->sourceLineEdit()->setLastPathSettingsKey( QStringLiteral(
"/UI/lastSVGMarkerDir" ) );
2440 mSvgSelectorWidget->initParametersModel(
this, vl );
2444 connect( mChangeStrokeColorButton, &
QgsColorButton::colorChanged,
this, &QgsSvgMarkerSymbolLayerWidget::mChangeStrokeColorButton_colorChanged );
2445 connect( mStrokeWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
2449 connect( mHorizontalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
2450 connect( mVerticalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
2457 mChangeColorButton->setAllowOpacity(
true );
2458 mChangeColorButton->setColorDialogTitle( tr(
"Select Fill color" ) );
2459 mChangeColorButton->setContext( QStringLiteral(
"symbology" ) );
2460 mChangeStrokeColorButton->setAllowOpacity(
true );
2461 mChangeStrokeColorButton->setColorDialogTitle( tr(
"Select Stroke Color" ) );
2462 mChangeStrokeColorButton->setContext( QStringLiteral(
"symbology" ) );
2464 mFillColorDDBtn->registerLinkedWidget( mChangeColorButton );
2465 mStrokeColorDDBtn->registerLinkedWidget( mChangeStrokeColorButton );
2467 spinOffsetX->setClearValue( 0.0 );
2468 spinOffsetY->setClearValue( 0.0 );
2469 spinAngle->setClearValue( 0.0 );
2471 connect( spinWidth,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::setWidth );
2472 connect( spinHeight,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::setHeight );
2474 connect( spinAngle,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::setAngle );
2475 connect( spinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::setOffset );
2476 connect( spinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::setOffset );
2487 mWidthDDBtn->setSymbol( mAssistantPreviewSymbol );
2488 mHeightDDBtn->setSymbol( mAssistantPreviewSymbol );
2495#include <QAbstractListModel>
2496#include <QPixmapCache>
2510 bool hasFillParam, hasFillOpacityParam, hasStrokeParam, hasStrokeWidthParam, hasStrokeOpacityParam;
2511 QColor defaultFill, defaultStroke;
2512 double defaultStrokeWidth, defaultFillOpacity, defaultStrokeOpacity;
2513 bool hasDefaultFillColor, hasDefaultFillOpacity, hasDefaultStrokeColor, hasDefaultStrokeWidth, hasDefaultStrokeOpacity;
2515 hasFillOpacityParam, hasDefaultFillOpacity, defaultFillOpacity,
2516 hasStrokeParam, hasDefaultStrokeColor, defaultStroke,
2517 hasStrokeWidthParam, hasDefaultStrokeWidth, defaultStrokeWidth,
2518 hasStrokeOpacityParam, hasDefaultStrokeOpacity, defaultStrokeOpacity );
2519 mChangeColorButton->setEnabled( hasFillParam );
2520 mChangeColorButton->setAllowOpacity( hasFillOpacityParam );
2521 mChangeStrokeColorButton->setEnabled( hasStrokeParam );
2522 mChangeStrokeColorButton->setAllowOpacity( hasStrokeOpacityParam );
2523 mStrokeWidthSpinBox->setEnabled( hasStrokeWidthParam );
2528 const double existingOpacity = hasFillOpacityParam ? fill.alphaF() : 1.0;
2529 if ( hasDefaultFillColor && !skipDefaultColors )
2533 fill.setAlphaF( hasDefaultFillOpacity ? defaultFillOpacity : existingOpacity );
2534 mChangeColorButton->setColor( fill );
2536 if ( hasStrokeParam )
2539 const double existingOpacity = hasStrokeOpacityParam ? stroke.alphaF() : 1.0;
2540 if ( hasDefaultStrokeColor && !skipDefaultColors )
2542 stroke = defaultStroke;
2544 stroke.setAlphaF( hasDefaultStrokeOpacity ? defaultStrokeOpacity : existingOpacity );
2545 mChangeStrokeColorButton->setColor( stroke );
2548 whileBlocking( mSvgSelectorWidget->sourceLineEdit() )->setSource( layer->
path() );
2550 mStrokeWidthSpinBox->blockSignals(
true );
2551 mStrokeWidthSpinBox->setValue( hasDefaultStrokeWidth ? defaultStrokeWidth : layer->
strokeWidth() );
2552 mStrokeWidthSpinBox->blockSignals(
false );
2555 spinHeight->blockSignals(
true );
2556 if ( preservedAspectRatio )
2565 spinHeight->blockSignals(
false );
2566 whileBlocking( mLockAspectRatio )->setLocked( preservedAspectRatio );
2569void QgsSvgMarkerSymbolLayerWidget::updateAssistantSymbol()
2571 for (
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1 ; i >= 0; --i )
2573 mAssistantPreviewSymbol->deleteSymbolLayer( i );
2575 mAssistantPreviewSymbol->appendSymbolLayer(
mLayer->
clone() );
2578 mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
2589 if ( layer->
layerType() != QLatin1String(
"SvgMarker" ) )
2596 mSvgSelectorWidget->setSvgPath(
mLayer->
path() );
2599 spinWidth->blockSignals(
true );
2601 spinWidth->blockSignals(
false );
2602 spinAngle->blockSignals(
true );
2604 spinAngle->blockSignals(
false );
2607 spinOffsetX->blockSignals(
true );
2609 spinOffsetX->blockSignals(
false );
2610 spinOffsetY->blockSignals(
true );
2612 spinOffsetY->blockSignals(
false );
2614 mSizeUnitWidget->blockSignals(
true );
2617 mSizeUnitWidget->blockSignals(
false );
2618 mStrokeWidthUnitWidget->blockSignals(
true );
2621 mStrokeWidthUnitWidget->blockSignals(
false );
2622 mOffsetUnitWidget->blockSignals(
true );
2625 mOffsetUnitWidget->blockSignals(
false );
2628 mHorizontalAnchorComboBox->blockSignals(
true );
2629 mVerticalAnchorComboBox->blockSignals(
true );
2632 mHorizontalAnchorComboBox->blockSignals(
false );
2633 mVerticalAnchorComboBox->blockSignals(
false );
2649 updateAssistantSymbol();
2666 whileBlocking( mSvgSelectorWidget->sourceLineEdit() )->setSource( name );
2675 whileBlocking( mSvgSelectorWidget )->setSvgParameters( parameters );
2681void QgsSvgMarkerSymbolLayerWidget::setWidth()
2684 double fixedAspectRatio = 0.0;
2685 spinHeight->blockSignals(
true );
2686 if ( defaultAspectRatio <= 0.0 )
2688 spinHeight->setValue( spinWidth->value() );
2690 else if ( mLockAspectRatio->locked() )
2692 spinHeight->setValue( spinWidth->value() * defaultAspectRatio );
2696 fixedAspectRatio = spinHeight->value() / spinWidth->value();
2698 spinHeight->blockSignals(
false );
2704void QgsSvgMarkerSymbolLayerWidget::setHeight()
2707 double fixedAspectRatio = 0.0;
2708 spinWidth->blockSignals(
true );
2709 if ( defaultAspectRatio <= 0.0 )
2711 spinWidth->setValue( spinHeight->value() );
2713 else if ( mLockAspectRatio->locked() )
2715 spinWidth->setValue( spinHeight->value() / defaultAspectRatio );
2719 fixedAspectRatio = spinHeight->value() / spinWidth->value();
2721 spinWidth->blockSignals(
false );
2727void QgsSvgMarkerSymbolLayerWidget::lockAspectRatioChanged(
const bool locked )
2731 if ( defaultAspectRatio <= 0.0 )
2747void QgsSvgMarkerSymbolLayerWidget::setAngle()
2753void QgsSvgMarkerSymbolLayerWidget::setOffset()
2755 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
2759void QgsSvgMarkerSymbolLayerWidget::svgSourceChanged(
const QString &text )
2766void QgsSvgMarkerSymbolLayerWidget::mChangeColorButton_colorChanged(
const QColor &color )
2777void QgsSvgMarkerSymbolLayerWidget::mChangeStrokeColorButton_colorChanged(
const QColor &color )
2788void QgsSvgMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged(
double d )
2797void QgsSvgMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
2807void QgsSvgMarkerSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
2817void QgsSvgMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
2827void QgsSvgMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged(
int index )
2836void QgsSvgMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged(
int index )
2852 mSvgSelectorWidget->setAllowParameters(
true );
2853 mSvgSelectorWidget->sourceLineEdit()->setPropertyOverrideToolButtonVisible(
true );
2855 connect( mTextureWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSVGFillSymbolLayerWidget::mTextureWidthSpinBox_valueChanged );
2857 connect( mRotationSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSVGFillSymbolLayerWidget::mRotationSpinBox_valueChanged );
2859 connect( mChangeStrokeColorButton, &
QgsColorButton::colorChanged,
this, &QgsSVGFillSymbolLayerWidget::mChangeStrokeColorButton_colorChanged );
2860 connect( mStrokeWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSVGFillSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
2868 mRotationSpinBox->setClearValue( 0.0 );
2870 mChangeColorButton->setColorDialogTitle( tr(
"Select Fill Color" ) );
2871 mChangeColorButton->setContext( QStringLiteral(
"symbology" ) );
2872 mChangeStrokeColorButton->setColorDialogTitle( tr(
"Select Stroke Color" ) );
2873 mChangeStrokeColorButton->setContext( QStringLiteral(
"symbology" ) );
2875 mFilColorDDBtn->registerLinkedWidget( mChangeColorButton );
2876 mStrokeColorDDBtn->registerLinkedWidget( mChangeStrokeColorButton );
2889 if ( layer->
layerType() != QLatin1String(
"SVGFill" ) )
2898 mTextureWidthSpinBox->blockSignals(
true );
2899 mTextureWidthSpinBox->setValue( width );
2900 mTextureWidthSpinBox->blockSignals(
false );
2902 mRotationSpinBox->blockSignals(
true );
2904 mRotationSpinBox->blockSignals(
false );
2905 mTextureWidthUnitWidget->blockSignals(
true );
2908 mTextureWidthUnitWidget->blockSignals(
false );
2909 mSvgStrokeWidthUnitWidget->blockSignals(
true );
2912 mSvgStrokeWidthUnitWidget->blockSignals(
false );
2913 mChangeColorButton->blockSignals(
true );
2915 mChangeColorButton->blockSignals(
false );
2916 mChangeStrokeColorButton->blockSignals(
true );
2918 mChangeStrokeColorButton->blockSignals(
false );
2919 mStrokeWidthSpinBox->blockSignals(
true );
2921 mStrokeWidthSpinBox->blockSignals(
false );
2945void QgsSVGFillSymbolLayerWidget::mTextureWidthSpinBox_valueChanged(
double d )
2954void QgsSVGFillSymbolLayerWidget::svgSourceChanged(
const QString &text )
2966void QgsSVGFillSymbolLayerWidget::setFile(
const QString &name )
2969 whileBlocking( mSvgSelectorWidget->sourceLineEdit() )->setSource( name );
2975void QgsSVGFillSymbolLayerWidget::setSvgParameters(
const QMap<QString, QgsProperty> ¶meters )
2978 whileBlocking( mSvgSelectorWidget )->setSvgParameters( parameters );
2985void QgsSVGFillSymbolLayerWidget::mRotationSpinBox_valueChanged(
double d )
2997 bool hasFillParam, hasFillOpacityParam, hasStrokeParam, hasStrokeWidthParam, hasStrokeOpacityParam;
2998 QColor defaultFill, defaultStroke;
2999 double defaultStrokeWidth, defaultFillOpacity, defaultStrokeOpacity;
3000 bool hasDefaultFillColor, hasDefaultFillOpacity, hasDefaultStrokeColor, hasDefaultStrokeWidth, hasDefaultStrokeOpacity;
3002 hasFillOpacityParam, hasDefaultFillOpacity, defaultFillOpacity,
3003 hasStrokeParam, hasDefaultStrokeColor, defaultStroke,
3004 hasStrokeWidthParam, hasDefaultStrokeWidth, defaultStrokeWidth,
3005 hasStrokeOpacityParam, hasDefaultStrokeOpacity, defaultStrokeOpacity );
3008 QColor fill = mChangeColorButton->color();
3009 const double newOpacity = hasFillOpacityParam ? fill.alphaF() : 1.0;
3010 if ( hasDefaultFillColor )
3014 fill.setAlphaF( hasDefaultFillOpacity ? defaultFillOpacity : newOpacity );
3015 mChangeColorButton->setColor( fill );
3017 mChangeColorButton->setEnabled( hasFillParam );
3018 mChangeColorButton->setAllowOpacity( hasFillOpacityParam );
3021 QColor stroke = mChangeStrokeColorButton->color();
3022 const double newOpacity = hasStrokeOpacityParam ? stroke.alphaF() : 1.0;
3023 if ( hasDefaultStrokeColor )
3025 stroke = defaultStroke;
3027 stroke.setAlphaF( hasDefaultStrokeOpacity ? defaultStrokeOpacity : newOpacity );
3028 mChangeStrokeColorButton->setColor( stroke );
3030 mChangeStrokeColorButton->setEnabled( hasStrokeParam );
3031 mChangeStrokeColorButton->setAllowOpacity( hasStrokeOpacityParam );
3032 if ( hasDefaultStrokeWidth && resetValues )
3034 mStrokeWidthSpinBox->setValue( defaultStrokeWidth );
3036 mStrokeWidthSpinBox->setEnabled( hasStrokeWidthParam );
3039void QgsSVGFillSymbolLayerWidget::mChangeColorButton_colorChanged(
const QColor &color )
3050void QgsSVGFillSymbolLayerWidget::mChangeStrokeColorButton_colorChanged(
const QColor &color )
3061void QgsSVGFillSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged(
double d )
3070void QgsSVGFillSymbolLayerWidget::mTextureWidthUnitWidget_changed()
3080void QgsSVGFillSymbolLayerWidget::mSvgStrokeWidthUnitWidget_changed()
3096 connect( mAngleSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsLinePatternFillSymbolLayerWidget::mAngleSpinBox_valueChanged );
3097 connect( mDistanceSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsLinePatternFillSymbolLayerWidget::mDistanceSpinBox_valueChanged );
3098 connect( mOffsetSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsLinePatternFillSymbolLayerWidget::mOffsetSpinBox_valueChanged );
3105 mOffsetSpinBox->setClearValue( 0 );
3106 mAngleSpinBox->setClearValue( 0 );
3110 connect( mCoordinateReferenceComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
3122 connect( mClipModeComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
3135 if ( layer->
layerType() != QLatin1String(
"LinePatternFill" ) )
3149 mDistanceUnitWidget->blockSignals(
true );
3152 mDistanceUnitWidget->blockSignals(
false );
3153 mOffsetUnitWidget->blockSignals(
true );
3156 mOffsetUnitWidget->blockSignals(
false );
3174void QgsLinePatternFillSymbolLayerWidget::mAngleSpinBox_valueChanged(
double d )
3183void QgsLinePatternFillSymbolLayerWidget::mDistanceSpinBox_valueChanged(
double d )
3192void QgsLinePatternFillSymbolLayerWidget::mOffsetSpinBox_valueChanged(
double d )
3201void QgsLinePatternFillSymbolLayerWidget::mDistanceUnitWidget_changed()
3211void QgsLinePatternFillSymbolLayerWidget::mOffsetUnitWidget_changed()
3227 connect( mHorizontalDistanceSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceSpinBox_valueChanged );
3228 connect( mVerticalDistanceSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceSpinBox_valueChanged );
3229 connect( mHorizontalDisplacementSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementSpinBox_valueChanged );
3230 connect( mVerticalDisplacementSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementSpinBox_valueChanged );
3231 connect( mHorizontalOffsetSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetSpinBox_valueChanged );
3232 connect( mVerticalOffsetSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetSpinBox_valueChanged );
3233 connect( mHorizontalDistanceUnitWidget, &
QgsUnitSelectionWidget::changed,
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceUnitWidget_changed );
3234 connect( mVerticalDistanceUnitWidget, &
QgsUnitSelectionWidget::changed,
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceUnitWidget_changed );
3235 connect( mHorizontalDisplacementUnitWidget, &
QgsUnitSelectionWidget::changed,
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementUnitWidget_changed );
3236 connect( mVerticalDisplacementUnitWidget, &
QgsUnitSelectionWidget::changed,
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementUnitWidget_changed );
3237 connect( mHorizontalOffsetUnitWidget, &
QgsUnitSelectionWidget::changed,
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetUnitWidget_changed );
3238 connect( mVerticalOffsetUnitWidget, &
QgsUnitSelectionWidget::changed,
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetUnitWidget_changed );
3256 connect( mClipModeComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
3267 connect( mCoordinateReferenceComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
3276 mSeedSpinBox->setShowClearButton(
true );
3277 mSeedSpinBox->setClearValue( 0 );
3278 mRandomXSpinBox->setClearValue( 0 );
3279 mRandomYSpinBox->setClearValue( 0 );
3285 connect( mRandomXSpinBox, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double d )
3293 connect( mRandomYSpinBox, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double d )
3319 connect( mSeedSpinBox, qOverload< int > ( &QSpinBox::valueChanged ),
this, [ = ](
int v )
3328 mAngleSpinBox->setShowClearButton(
true );
3329 mAngleSpinBox->setClearValue( 0 );
3330 connect( mAngleSpinBox, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double d )
3342 if ( !layer || layer->
layerType() != QLatin1String(
"PointPatternFill" ) )
3356 mHorizontalDistanceUnitWidget->blockSignals(
true );
3359 mHorizontalDistanceUnitWidget->blockSignals(
false );
3360 mVerticalDistanceUnitWidget->blockSignals(
true );
3363 mVerticalDistanceUnitWidget->blockSignals(
false );
3364 mHorizontalDisplacementUnitWidget->blockSignals(
true );
3367 mHorizontalDisplacementUnitWidget->blockSignals(
false );
3368 mVerticalDisplacementUnitWidget->blockSignals(
true );
3371 mVerticalDisplacementUnitWidget->blockSignals(
false );
3372 mHorizontalOffsetUnitWidget->blockSignals(
true );
3375 mHorizontalOffsetUnitWidget->blockSignals(
false );
3376 mVerticalOffsetUnitWidget->blockSignals(
true );
3379 mVerticalOffsetUnitWidget->blockSignals(
false );
3411void QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceSpinBox_valueChanged(
double d )
3420void QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceSpinBox_valueChanged(
double d )
3429void QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementSpinBox_valueChanged(
double d )
3438void QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementSpinBox_valueChanged(
double d )
3447void QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetSpinBox_valueChanged(
double d )
3456void QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetSpinBox_valueChanged(
double d )
3465void QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceUnitWidget_changed()
3475void QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceUnitWidget_changed()
3485void QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementUnitWidget_changed()
3495void QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementUnitWidget_changed()
3505void QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetUnitWidget_changed()
3515void QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetUnitWidget_changed()
3536 connect( mStrokeWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsFontMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
3537 connect( mHorizontalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsFontMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
3538 connect( mVerticalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsFontMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
3548 scrollArea->setVerticalOnly(
true );
3550 btnColor->setAllowOpacity(
true );
3551 btnColor->setColorDialogTitle( tr(
"Select Symbol Fill Color" ) );
3552 btnColor->setContext( QStringLiteral(
"symbology" ) );
3553 btnStrokeColor->setAllowOpacity(
true );
3554 btnStrokeColor->setColorDialogTitle( tr(
"Select Symbol Stroke Color" ) );
3555 btnStrokeColor->setContext( QStringLiteral(
"symbology" ) );
3557 mColorDDBtn->registerLinkedWidget( btnColor );
3558 mStrokeColorDDBtn->registerLinkedWidget( btnStrokeColor );
3560 spinOffsetX->setClearValue( 0.0 );
3561 spinOffsetY->setClearValue( 0.0 );
3562 spinAngle->setClearValue( 0.0 );
3568 mSizeDDBtn->setSymbol( mAssistantPreviewSymbol );
3571 connect( mFontStyleComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsFontMarkerSymbolLayerWidget::mFontStyleComboBox_currentIndexChanged );
3573 connect( cboJoinStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsFontMarkerSymbolLayerWidget::penJoinStyleChanged );
3576 connect( cboJoinStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsFontMarkerSymbolLayerWidget::penJoinStyleChanged );
3578 connect( spinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsFontMarkerSymbolLayerWidget::setOffset );
3579 connect( spinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsFontMarkerSymbolLayerWidget::setOffset );
3590 if ( layer->
layerType() != QLatin1String(
"FontMarker" ) )
3599 mFontStyleComboBox->blockSignals(
true );
3600 populateFontStyleComboBox();
3601 mFontStyleComboBox->blockSignals(
false );
3619 mCharPreview->
setFont( mRefFont );
3625 mSizeUnitWidget->blockSignals(
true );
3628 mSizeUnitWidget->blockSignals(
false );
3630 mStrokeWidthUnitWidget->blockSignals(
true );
3633 mStrokeWidthUnitWidget->blockSignals(
false );
3635 mOffsetUnitWidget->blockSignals(
true );
3638 mOffsetUnitWidget->blockSignals(
false );
3659 updateAssistantSymbol();
3674 mCharPreview->setFont( mRefFont );
3675 populateFontStyleComboBox();
3680void QgsFontMarkerSymbolLayerWidget::setFontStyle(
const QString &style )
3687 mCharPreview->setFont( mRefFont );
3719 mCharPreview->setText( text );
3721 if ( text.isEmpty() )
3725 QString character = text;
3726 if ( text.contains( QRegularExpression( QStringLiteral(
"^0x[0-9a-fA-F]{1,4}$" ) ) ) )
3729 const unsigned int value = text.toUInt( &ok, 0 );
3732 character = QChar( value );
3733 mCharPreview->setText( character );
3754 if (
mLayer->
character().length() > 1 || QGuiApplication::keyboardModifiers() & Qt::ControlModifier )
3756 mCharLineEdit->insert( chr );
3762 mCharPreview->setText( chr );
3766void QgsFontMarkerSymbolLayerWidget::setOffset()
3768 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
3772void QgsFontMarkerSymbolLayerWidget::penJoinStyleChanged()
3778void QgsFontMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
3788void QgsFontMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
3798void QgsFontMarkerSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
3808void QgsFontMarkerSymbolLayerWidget::populateFontStyleComboBox()
3810 mFontStyleComboBox->clear();
3811 const QStringList styles = mFontDB.styles( mRefFont.family() );
3812 const auto constStyles = styles;
3813 for (
const QString &style : constStyles )
3815 mFontStyleComboBox->addItem( style );
3818 QString targetStyle = mFontDB.styleString( mRefFont );
3819 if ( !styles.contains( targetStyle ) )
3822 targetStyle = QFontInfo( f ).styleName();
3823 mRefFont.setStyleName( targetStyle );
3826 const int stylIndx = mFontStyleComboBox->findText( targetStyle );
3827 if ( stylIndx > -1 )
3832 mFontStyleComboBox->setCurrentIndex( curIndx );
3835void QgsFontMarkerSymbolLayerWidget::mFontStyleComboBox_currentIndexChanged(
int index )
3838 setFontStyle( mFontStyleComboBox->currentText() );
3841void QgsFontMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged(
int index )
3850void QgsFontMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged(
int index )
3859void QgsFontMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged(
double d )
3868void QgsFontMarkerSymbolLayerWidget::updateAssistantSymbol()
3870 for (
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1 ; i >= 0; --i )
3872 mAssistantPreviewSymbol->deleteSymbolLayer( i );
3874 mAssistantPreviewSymbol->appendSymbolLayer(
mLayer->
clone() );
3877 mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
3889 connect( mDrawInsideCheckBox, &QCheckBox::stateChanged,
this, &QgsCentroidFillSymbolLayerWidget::mDrawInsideCheckBox_stateChanged );
3890 connect( mDrawAllPartsCheckBox, &QCheckBox::stateChanged,
this, &QgsCentroidFillSymbolLayerWidget::mDrawAllPartsCheckBox_stateChanged );
3891 connect( mClipPointsCheckBox, &QCheckBox::stateChanged,
this, &QgsCentroidFillSymbolLayerWidget::mClipPointsCheckBox_stateChanged );
3892 connect( mClipOnCurrentPartOnlyCheckBox, &QCheckBox::stateChanged,
this, &QgsCentroidFillSymbolLayerWidget::mClipOnCurrentPartOnlyCheckBox_stateChanged );
3897 if ( layer->
layerType() != QLatin1String(
"CentroidFill" ) )
3915void QgsCentroidFillSymbolLayerWidget::mDrawInsideCheckBox_stateChanged(
int state )
3921void QgsCentroidFillSymbolLayerWidget::mDrawAllPartsCheckBox_stateChanged(
int state )
3927void QgsCentroidFillSymbolLayerWidget::mClipPointsCheckBox_stateChanged(
int state )
3933void QgsCentroidFillSymbolLayerWidget::mClipOnCurrentPartOnlyCheckBox_stateChanged(
int state )
3948 mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral(
"/UI/lastRasterMarkerImageDir" ) );
3952 connect( mRotationSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::setAngle );
3954 connect( mWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::setWidth );
3955 connect( mHeightSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::setHeight );
3963 mSpinOffsetX->setClearValue( 0.0 );
3964 mSpinOffsetY->setClearValue( 0.0 );
3965 mRotationSpinBox->setClearValue( 0.0 );
3967 connect( mSpinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::setOffset );
3968 connect( mSpinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::setOffset );
3971 connect( mHorizontalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
3972 connect( mVerticalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
3982 if ( layer->
layerType() != QLatin1String(
"RasterMarker" ) )
3993 mHeightSpinBox->blockSignals(
true );
3994 if ( preservedAspectRatio )
4003 mHeightSpinBox->blockSignals(
false );
4004 whileBlocking( mLockAspectRatio )->setLocked( preservedAspectRatio );
4012 mSizeUnitWidget->blockSignals(
true );
4015 mSizeUnitWidget->blockSignals(
false );
4016 mOffsetUnitWidget->blockSignals(
true );
4019 mOffsetUnitWidget->blockSignals(
false );
4034 updatePreviewImage();
4048void QgsRasterMarkerSymbolLayerWidget::imageSourceChanged(
const QString &text )
4051 updatePreviewImage();
4055void QgsRasterMarkerSymbolLayerWidget::updatePreviewImage()
4057 bool fitsInCache =
false;
4059 if ( image.isNull() )
4061 mLabelImagePreview->setPixmap( QPixmap() );
4065 QImage previewImage( 150, 150, QImage::Format_ARGB32 );
4066 previewImage.fill( Qt::transparent );
4067 const QRect imageRect( ( 150 - image.width() ) / 2.0, ( 150 - image.height() ) / 2.0, image.width(), image.height() );
4069 p.begin( &previewImage );
4071 uchar pixDataRGB[] = { 150, 150, 150, 150,
4076 const QImage img( pixDataRGB, 2, 2, 8, QImage::Format_ARGB32 );
4077 const QPixmap pix = QPixmap::fromImage( img.scaled( 8, 8 ) );
4078 QBrush checkerBrush;
4079 checkerBrush.setTexture( pix );
4080 p.fillRect( imageRect, checkerBrush );
4087 p.drawImage( imageRect.left(), imageRect.top(), image );
4089 mLabelImagePreview->setPixmap( QPixmap::fromImage( previewImage ) );
4092void QgsRasterMarkerSymbolLayerWidget::setWidth()
4095 double fixedAspectRatio = 0.0;
4096 mHeightSpinBox->blockSignals(
true );
4097 if ( defaultAspectRatio <= 0.0 )
4099 mHeightSpinBox->setValue( mWidthSpinBox->value() );
4101 else if ( mLockAspectRatio->locked() )
4103 mHeightSpinBox->setValue( mWidthSpinBox->value() * defaultAspectRatio );
4107 fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
4109 mHeightSpinBox->blockSignals(
false );
4115void QgsRasterMarkerSymbolLayerWidget::setHeight()
4118 double fixedAspectRatio = 0.0;
4119 mWidthSpinBox->blockSignals(
true );
4120 if ( defaultAspectRatio <= 0.0 )
4122 mWidthSpinBox->setValue( mHeightSpinBox->value() );
4124 else if ( mLockAspectRatio->locked() )
4126 mWidthSpinBox->setValue( mHeightSpinBox->value() / defaultAspectRatio );
4130 fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
4132 mWidthSpinBox->blockSignals(
false );
4138void QgsRasterMarkerSymbolLayerWidget::setLockAspectRatio(
const bool locked )
4141 if ( defaultAspectRatio <= 0.0 )
4156void QgsRasterMarkerSymbolLayerWidget::setAngle()
4162void QgsRasterMarkerSymbolLayerWidget::setOpacity(
double value )
4166 updatePreviewImage();
4169void QgsRasterMarkerSymbolLayerWidget::setOffset()
4171 mLayer->
setOffset( QPointF( mSpinOffsetX->value(), mSpinOffsetY->value() ) );
4175void QgsRasterMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
4185void QgsRasterMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
4195void QgsRasterMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged(
int index )
4204void QgsRasterMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged(
int index )
4223 mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral(
"/UI/lastAnimatedMarkerImageDir" ) );
4227 connect( mRotationSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::setAngle );
4229 connect( mWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::setWidth );
4230 connect( mHeightSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::setHeight );
4233 mFrameRateSpin->setClearValue( 10 );
4234 mFrameRateSpin->setShowClearButton(
true );
4235 connect( mFrameRateSpin, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
4246 mSpinOffsetX->setClearValue( 0.0 );
4247 mSpinOffsetY->setClearValue( 0.0 );
4248 mRotationSpinBox->setClearValue( 0.0 );
4250 connect( mSpinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::setOffset );
4251 connect( mSpinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::setOffset );
4254 connect( mHorizontalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
4255 connect( mVerticalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
4265 if ( layer->
layerType() != QLatin1String(
"AnimatedMarker" ) )
4275 if ( firstFrameTime > 0 )
4277 mFrameRateSpin->setClearValue( 1000 / firstFrameTime );
4281 mFrameRateSpin->setClearValue( 10 );
4286 mHeightSpinBox->blockSignals(
true );
4287 if ( preservedAspectRatio )
4296 mHeightSpinBox->blockSignals(
false );
4297 whileBlocking( mLockAspectRatio )->setLocked( preservedAspectRatio );
4307 mSizeUnitWidget->blockSignals(
true );
4310 mSizeUnitWidget->blockSignals(
false );
4311 mOffsetUnitWidget->blockSignals(
true );
4314 mOffsetUnitWidget->blockSignals(
false );
4329 updatePreviewImage();
4343void QgsAnimatedMarkerSymbolLayerWidget::imageSourceChanged(
const QString &text )
4348 if ( firstFrameTime > 0 )
4350 mFrameRateSpin->setClearValue( 1000 / firstFrameTime );
4354 mFrameRateSpin->setClearValue( 10 );
4356 updatePreviewImage();
4360void QgsAnimatedMarkerSymbolLayerWidget::updatePreviewImage()
4362 if ( mPreviewMovie )
4364 mLabelImagePreview->setMovie(
nullptr );
4365 mPreviewMovie->deleteLater();
4366 mPreviewMovie =
nullptr;
4369 mPreviewMovie =
new QMovie(
mLayer->
path(), QByteArray(),
this );
4370 mPreviewMovie->setScaledSize( QSize( 150, 150 ) );
4371 mLabelImagePreview->setMovie( mPreviewMovie );
4372 mPreviewMovie->start();
4375void QgsAnimatedMarkerSymbolLayerWidget::setWidth()
4378 double fixedAspectRatio = 0.0;
4379 mHeightSpinBox->blockSignals(
true );
4380 if ( defaultAspectRatio <= 0.0 )
4382 mHeightSpinBox->setValue( mWidthSpinBox->value() );
4384 else if ( mLockAspectRatio->locked() )
4386 mHeightSpinBox->setValue( mWidthSpinBox->value() * defaultAspectRatio );
4390 fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
4392 mHeightSpinBox->blockSignals(
false );
4398void QgsAnimatedMarkerSymbolLayerWidget::setHeight()
4401 double fixedAspectRatio = 0.0;
4402 mWidthSpinBox->blockSignals(
true );
4403 if ( defaultAspectRatio <= 0.0 )
4405 mWidthSpinBox->setValue( mHeightSpinBox->value() );
4407 else if ( mLockAspectRatio->locked() )
4409 mWidthSpinBox->setValue( mHeightSpinBox->value() / defaultAspectRatio );
4413 fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
4415 mWidthSpinBox->blockSignals(
false );
4421void QgsAnimatedMarkerSymbolLayerWidget::setLockAspectRatio(
const bool locked )
4424 if ( defaultAspectRatio <= 0.0 )
4439void QgsAnimatedMarkerSymbolLayerWidget::setAngle()
4445void QgsAnimatedMarkerSymbolLayerWidget::setOpacity(
double value )
4449 updatePreviewImage();
4452void QgsAnimatedMarkerSymbolLayerWidget::setOffset()
4454 mLayer->
setOffset( QPointF( mSpinOffsetX->value(), mSpinOffsetY->value() ) );
4458void QgsAnimatedMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
4468void QgsAnimatedMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
4478void QgsAnimatedMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged(
int index )
4487void QgsAnimatedMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged(
int index )
4504 mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral(
"/UI/lastRasterMarkerImageDir" ) );
4508 connect( mRotationSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterFillSymbolLayerWidget::mRotationSpinBox_valueChanged );
4521 connect( mWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double d )
4531 connect( mHeightSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double d )
4546 mSpinOffsetX->setClearValue( 0.0 );
4547 mSpinOffsetY->setClearValue( 0.0 );
4548 mRotationSpinBox->setClearValue( 0.0 );
4550 connect( cboCoordinateMode,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsRasterFillSymbolLayerWidget::setCoordinateMode );
4551 connect( mSpinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterFillSymbolLayerWidget::offsetChanged );
4552 connect( mSpinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterFillSymbolLayerWidget::offsetChanged );
4564 if ( layer->
layerType() != QLatin1String(
"RasterFill" ) )
4577 cboCoordinateMode->blockSignals(
true );
4581 cboCoordinateMode->setCurrentIndex( 1 );
4585 cboCoordinateMode->setCurrentIndex( 0 );
4588 cboCoordinateMode->blockSignals(
false );
4594 mOffsetUnitWidget->blockSignals(
true );
4597 mOffsetUnitWidget->blockSignals(
false );
4600 mSizeUnitWidget->blockSignals(
true );
4603 mSizeUnitWidget->blockSignals(
false );
4607 updatePreviewImage();
4622void QgsRasterFillSymbolLayerWidget::imageSourceChanged(
const QString &text )
4625 updatePreviewImage();
4629void QgsRasterFillSymbolLayerWidget::setCoordinateMode(
int index )
4646void QgsRasterFillSymbolLayerWidget::opacityChanged(
double value )
4655 updatePreviewImage();
4658void QgsRasterFillSymbolLayerWidget::offsetChanged()
4660 mLayer->
setOffset( QPointF( mSpinOffsetX->value(), mSpinOffsetY->value() ) );
4664void QgsRasterFillSymbolLayerWidget::mOffsetUnitWidget_changed()
4675void QgsRasterFillSymbolLayerWidget::mRotationSpinBox_valueChanged(
double d )
4684void QgsRasterFillSymbolLayerWidget::updatePreviewImage()
4686 bool fitsInCache =
false;
4688 if ( image.isNull() )
4690 mLabelImagePreview->setPixmap( QPixmap() );
4694 QImage previewImage( 150, 150, QImage::Format_ARGB32 );
4695 previewImage.fill( Qt::transparent );
4696 const QRect imageRect( ( 150 - image.width() ) / 2.0, ( 150 - image.height() ) / 2.0, image.width(), image.height() );
4698 p.begin( &previewImage );
4700 uchar pixDataRGB[] = { 150, 150, 150, 150,
4705 const QImage img( pixDataRGB, 2, 2, 8, QImage::Format_ARGB32 );
4706 const QPixmap pix = QPixmap::fromImage( img.scaled( 8, 8 ) );
4707 QBrush checkerBrush;
4708 checkerBrush.setTexture( pix );
4709 p.fillRect( imageRect, checkerBrush );
4716 p.drawImage( imageRect.left(), imageRect.top(), image );
4718 mLabelImagePreview->setPixmap( QPixmap::fromImage( previewImage ) );
4732 mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral(
"/UI/lastRasterMarkerImageDir" ) );
4749 connect( spinWidth, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ]
4769 spinOffset->setClearValue( 0.0 );
4770 connect( spinOffset, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double val )
4779 connect( cboCapStyle, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
4787 connect( cboJoinStyle, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
4802 updatePreviewImage();
4815 if ( layer->
layerType() != QLatin1String(
"RasterLine" ) )
4839 updatePreviewImage();
4854void QgsRasterLineSymbolLayerWidget::imageSourceChanged(
const QString &text )
4857 updatePreviewImage();
4861void QgsRasterLineSymbolLayerWidget::updatePreviewImage()
4863 bool fitsInCache =
false;
4865 if ( image.isNull() )
4867 mLabelImagePreview->setPixmap( QPixmap() );
4871 QImage previewImage( 150, 150, QImage::Format_ARGB32 );
4872 previewImage.fill( Qt::transparent );
4873 const QRect imageRect( ( 150 - image.width() ) / 2.0, ( 150 - image.height() ) / 2.0, image.width(), image.height() );
4875 p.begin( &previewImage );
4877 uchar pixDataRGB[] = { 150, 150, 150, 150,
4882 const QImage img( pixDataRGB, 2, 2, 8, QImage::Format_ARGB32 );
4883 const QPixmap pix = QPixmap::fromImage( img.scaled( 8, 8 ) );
4884 QBrush checkerBrush;
4885 checkerBrush.setTexture( pix );
4886 p.fillRect( imageRect, checkerBrush );
4893 p.drawImage( imageRect.left(), imageRect.top(), image );
4895 mLabelImagePreview->setPixmap( QPixmap::fromImage( previewImage ) );
4909 modificationExpressionSelector->setMultiLine(
true );
4910 modificationExpressionSelector->setLayer(
const_cast<QgsVectorLayer *
>( vl ) );
4911 modificationExpressionSelector->registerExpressionContextGenerator(
this );
4922 mUnitWidget->setShowMapScaleButton(
false );
4925 connect( cbxGeometryType,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsGeometryGeneratorSymbolLayerWidget::updateSymbolType );
4928 if ( !mBlockSignals )
4930 mLayer->
setUnits( mUnitWidget->unit() );
4941 cbxGeometryType->setCurrentIndex( cbxGeometryType->findData(
static_cast< int >( mLayer->
symbolType() ) ) );
4942 mUnitWidget->setUnit( mLayer->
units() );
4951void QgsGeometryGeneratorSymbolLayerWidget::updateExpression(
const QString &
string )
4958void QgsGeometryGeneratorSymbolLayerWidget::updateSymbolType()
4961 std::unique_ptr< QgsSymbol > subSymbol( mLayer->
subSymbol()->
clone() );
4976 for (
int i = 0; i < subSymbol->symbolLayerCount(); ++i )
4979 layers << subSymbol->symbolLayer( i )->clone();
4982 if ( !layers.empty() )
4992 for (
int i = 0; i < subSymbol->symbolLayerCount(); ++i )
4993 layers << subSymbol->symbolLayer( i )->clone();
5015 mPointCountSpinBox->setShowClearButton(
true );
5016 mPointCountSpinBox->setClearValue( 100 );
5017 mSeedSpinBox->setShowClearButton(
true );
5018 mSeedSpinBox->setClearValue( 0 );
5020 connect( mCountMethodComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsRandomMarkerFillSymbolLayerWidget::countMethodChanged );
5021 connect( mPointCountSpinBox,
static_cast < void ( QSpinBox::* )(
int )
> ( &QSpinBox::valueChanged ),
this, &QgsRandomMarkerFillSymbolLayerWidget::countChanged );
5022 connect( mDensityAreaSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRandomMarkerFillSymbolLayerWidget::densityAreaChanged );
5023 connect( mSeedSpinBox,
static_cast < void ( QSpinBox::* )(
int )
> ( &QSpinBox::valueChanged ),
this, &QgsRandomMarkerFillSymbolLayerWidget::seedChanged );
5024 connect( mClipPointsCheckBox, &QCheckBox::toggled,
this, [ = ](
bool checked )
5041 if ( !layer || layer->
layerType() != QLatin1String(
"RandomMarkerFill" ) )
5051 bool showDensityBasedCountWidgets =
false;
5055 showDensityBasedCountWidgets =
true;
5060 mDensityAreaLabel->setVisible( showDensityBasedCountWidgets );
5061 mDensityAreaSpinBox->setVisible( showDensityBasedCountWidgets );
5062 mDensityAreaUnitWidget->setVisible( showDensityBasedCountWidgets );
5063 mDensityAreaDdbtn->setVisible( showDensityBasedCountWidgets );
5065 whileBlocking( mCountMethodComboBox )->setCurrentIndex( mCountMethodComboBox->findData(
static_cast< int >( mLayer->
countMethod() ) ) );
5067 mDensityAreaUnitWidget->blockSignals(
true );
5070 mDensityAreaUnitWidget->blockSignals(
false );
5083void QgsRandomMarkerFillSymbolLayerWidget::countMethodChanged(
int )
5086 bool showDensityBasedCountWidgets =
false;
5090 showDensityBasedCountWidgets =
true;
5095 mDensityAreaLabel->setVisible( showDensityBasedCountWidgets );
5096 mDensityAreaSpinBox->setVisible( showDensityBasedCountWidgets );
5097 mDensityAreaUnitWidget->setVisible( showDensityBasedCountWidgets );
5098 mDensityAreaDdbtn->setVisible( showDensityBasedCountWidgets );
5107void QgsRandomMarkerFillSymbolLayerWidget::countChanged(
int d )
5116void QgsRandomMarkerFillSymbolLayerWidget::densityAreaChanged(
double d )
5125void QgsRandomMarkerFillSymbolLayerWidget::densityAreaUnitChanged()
5135void QgsRandomMarkerFillSymbolLayerWidget::seedChanged(
int d )
5154 btnColorRamp->setShowGradientOnly(
true );
5156 btnChangeColor->setAllowOpacity(
true );
5157 btnChangeColor->setColorDialogTitle( tr(
"Select Gradient Color" ) );
5158 btnChangeColor->setContext( QStringLiteral(
"symbology" ) );
5159 btnChangeColor->setShowNoColor(
true );
5160 btnChangeColor->setNoColorString( tr(
"Transparent" ) );
5161 btnChangeColor2->setAllowOpacity(
true );
5162 btnChangeColor2->setColorDialogTitle( tr(
"Select Gradient Color" ) );
5163 btnChangeColor2->setContext( QStringLiteral(
"symbology" ) );
5164 btnChangeColor2->setShowNoColor(
true );
5165 btnChangeColor2->setNoColorString( tr(
"Transparent" ) );
5167 mStartColorDDBtn->registerLinkedWidget( btnChangeColor );
5168 mEndColorDDBtn->registerLinkedWidget( btnChangeColor2 );
5188 if ( btnColorRamp->isNull() )
5198 connect( radioTwoColor, &QAbstractButton::toggled,
this, [ = ]
5202 if ( radioTwoColor->isChecked() )
5204 mLayer->setGradientColorType( Qgis::GradientColorSource::SimpleTwoColor );
5205 btnChangeColor->setEnabled( true );
5206 btnChangeColor2->setEnabled( true );
5207 btnColorRamp->setEnabled( false );
5211 mLayer->setGradientColorType( Qgis::GradientColorSource::ColorRamp );
5212 btnColorRamp->setEnabled( true );
5213 btnChangeColor->setEnabled( false );
5214 btnChangeColor2->setEnabled( false );
5235 connect( spinWidth,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, [ = ]
5254 spinOffset->setClearValue( 0.0 );
5255 connect( spinOffset, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double val )
5264 connect( cboCapStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, [ = ]
5272 connect( cboJoinStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, [ = ]
5289 if ( layer->
layerType() != QLatin1String(
"Lineburst" ) )
5300 btnChangeColor->blockSignals(
true );
5302 btnChangeColor->blockSignals(
false );
5303 btnChangeColor2->blockSignals(
true );
5305 btnChangeColor2->blockSignals(
false );
5309 radioTwoColor->setChecked(
true );
5310 btnColorRamp->setEnabled(
false );
5314 radioColorRamp->setChecked(
true );
5315 btnChangeColor->setEnabled(
false );
5316 btnChangeColor2->setEnabled(
false );
5322 btnColorRamp->blockSignals(
true );
5324 btnColorRamp->blockSignals(
false );
5376 connect( spinWidth,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, [ = ]
5380 mLayer->
setWidth( spinWidth->value() );
5395 spinOffset->setClearValue( 0.0 );
5396 connect( spinOffset, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double val )
5405 connect( cboCapStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, [ = ]
5413 connect( cboJoinStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, [ = ]
5432 if ( layer->
layerType() != QLatin1String(
"FilledLine" ) )
5485 mSpinSkipMultiples->setClearValue( 0, tr(
"Not set" ) );
5486 mSpinLabelOffsetX->setClearValue( 0 );
5487 mSpinLabelOffsetY->setClearValue( 0 );
5488 mSpinAverageAngleLength->setClearValue( 4.0 );
5494 connect( mComboQuantity, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
5496 if ( mLayer && !mBlockChangesSignal )
5504 if ( mLayer && !mBlockChangesSignal )
5510 connect( spinInterval, qOverload< double >( &QgsDoubleSpinBox::valueChanged ),
this, [ = ]
5512 if ( mLayer && !mBlockChangesSignal )
5518 connect( mSpinSkipMultiples, qOverload< double >( &QgsDoubleSpinBox::valueChanged ),
this, [ = ]
5520 if ( mLayer && !mBlockChangesSignal )
5526 connect( mCheckRotate, &QCheckBox::toggled,
this, [ = ](
bool checked )
5528 if ( mLayer && !mBlockChangesSignal )
5533 mSpinAverageAngleLength->setEnabled( checked );
5534 mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
5536 connect( mCheckShowMarker, &QCheckBox::toggled,
this, [ = ](
bool checked )
5538 if ( mLayer && !mBlockChangesSignal )
5545 connect( mSpinLabelOffsetX, qOverload< double >( &QgsDoubleSpinBox::valueChanged ),
this, [ = ]
5547 if ( mLayer && !mBlockChangesSignal )
5549 mLayer->
setLabelOffset( QPointF( mSpinLabelOffsetX->value(), mSpinLabelOffsetY->value() ) );
5553 connect( mSpinLabelOffsetY, qOverload< double >( &QgsDoubleSpinBox::valueChanged ),
this, [ = ]
5555 if ( mLayer && !mBlockChangesSignal )
5557 mLayer->
setLabelOffset( QPointF( mSpinLabelOffsetX->value(), mSpinLabelOffsetY->value() ) );
5563 if ( mLayer && !mBlockChangesSignal )
5571 connect( mComboPlacement, qOverload< int>( &QComboBox::currentIndexChanged ),
this, [ = ]
5573 if ( mLayer && !mBlockChangesSignal )
5577 switch ( placement )
5582 mIntervalWidget->show();
5585 mIntervalWidget->hide();
5592 connect( mSpinAverageAngleLength, qOverload< double >( &QgsDoubleSpinBox::valueChanged ),
this, [ = ]
5594 if ( mLayer && !mBlockChangesSignal )
5602 if ( mLayer && !mBlockChangesSignal )
5610 connect( mNumberFormatPushButton, &QPushButton::clicked,
this, &QgsLinearReferencingSymbolLayerWidget::changeNumberFormat );
5612 mTextFormatButton->registerExpressionContextGenerator(
this );
5620 if ( !layer || layer->
layerType() != QLatin1String(
"LinearReferencing" ) )
5624 mLayer = qgis::down_cast<QgsLinearReferencingSymbolLayer *>( layer );
5626 mBlockChangesSignal =
true;
5628 mComboPlacement->setCurrentIndex( mComboPlacement->findData( QVariant::fromValue( mLayer->
placement() ) ) );
5634 mIntervalWidget->show();
5637 mIntervalWidget->hide();
5641 mComboQuantity->setCurrentIndex( mComboQuantity->findData( QVariant::fromValue( mLayer->
labelSource() ) ) );
5643 mTextFormatButton->setTextFormat( mLayer->
textFormat() );
5644 spinInterval->setValue( mLayer->
interval() );
5647 mCheckShowMarker->setChecked( mLayer->
showMarker() );
5648 mSpinLabelOffsetX->setValue( mLayer->
labelOffset().x() );
5649 mSpinLabelOffsetY->setValue( mLayer->
labelOffset().y() );
5657 mSpinAverageAngleLength->setEnabled( mCheckRotate->isChecked() );
5658 mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
5665 mBlockChangesSignal =
false;
5680void QgsLinearReferencingSymbolLayerWidget::changeNumberFormat()
5691 if ( !mBlockChangesSignal )
5703 dialog.registerExpressionContextGenerator(
this );
5704 if ( dialog.exec() )
@ CurvePoint
Place symbols at every virtual curve point in the line (used when rendering curved geometry types onl...
@ InnerVertices
Inner vertices (i.e. all vertices except the first and last vertex)
@ LastVertex
Place symbols on the last vertex in the line.
@ CentralPoint
Place symbols at the mid point of the line.
@ SegmentCenter
Place symbols at the center of every line segment.
@ Vertex
Place symbols on every vertex in the line.
@ Interval
Place symbols at regular intervals.
@ FirstVertex
Place symbols on the first vertex in the line.
MarkerClipMode
Marker clipping modes.
@ CompletelyWithin
Render complete markers wherever the completely fall within the polygon shape.
@ NoClipping
No clipping, render complete markers.
@ Shape
Clip to polygon shape.
@ CentroidWithin
Render complete markers wherever their centroid falls within the polygon shape.
LineClipMode
Line clipping modes.
@ NoClipping
Lines are not clipped, will extend to shape's bounding box.
@ ClipPainterOnly
Applying clipping on the painter only (i.e. line endpoints will coincide with polygon bounding box,...
@ ClipToIntersection
Clip lines to intersection with polygon shape (slower) (i.e. line endpoints will coincide with polygo...
@ ColorRamp
Gradient color ramp.
@ SimpleTwoColor
Simple two color gradient.
@ Reflect
Reflect gradient.
@ Pad
Pad out gradient using colors at endpoint of gradient.
PointCountMethod
Methods which define the number of points randomly filling a polygon.
@ Absolute
The point count is used as an absolute count of markers.
@ DensityBased
The point count is part of a marker density count.
MarkerShape
Marker shapes.
LinearReferencingPlacement
Defines how/where the labels should be placed in a linear referencing symbol layer.
@ IntervalZ
Place labels at regular intervals, linearly interpolated using Z values.
@ Vertex
Place labels on every vertex in the line.
@ IntervalM
Place labels at regular intervals, linearly interpolated using M values.
@ IntervalCartesian2D
Place labels at regular intervals, using Cartesian distance calculations on a 2D plane.
LinearReferencingLabelSource
Defines what quantity to use for the labels shown in a linear referencing symbol layer.
@ CartesianDistance2D
Distance along line, calculated using Cartesian calculations on a 2D plane.
@ Percentage
Percentage of another measurement (e.g., canvas size, feature size)
@ Millimeters
Millimeters.
@ Points
Points (e.g., for font sizes)
@ MetersInMapUnits
Meters value as Map units.
@ Conical
Conical (polar) gradient.
@ Radial
Radial (circular) gradient.
SymbolCoordinateReference
Symbol coordinate reference modes.
@ Feature
Relative to feature/shape being rendered.
@ Viewport
Relative to the whole viewport/output device.
QFlags< MarkerLinePlacement > MarkerLinePlacements
static const double UI_SCALE_FACTOR
UI scaling factor.
void setPenJoinStyle(Qt::PenJoinStyle style)
Sets the pen join style used to render the line (e.g.
Qt::PenCapStyle penCapStyle() const
Returns the pen cap style used to render the line (e.g.
Qt::PenJoinStyle penJoinStyle() const
Returns the pen join style used to render the line (e.g.
void setPenCapStyle(Qt::PenCapStyle style)
Sets the pen cap style used to render the line (e.g.
void sourceChanged(const QString &source)
Emitted whenever the file source is changed in the widget.
Animated marker symbol layer class.
void setFrameRate(double rate)
Sets the marker frame rate in frame per second.
double frameRate() const
Returns the marker frame rate in frame per second.
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.
A fill symbol layer which renders a marker symbol at the centroid of a polygon geometry.
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.
double angle() const
Returns the rotation angle of the fill symbol, in degrees clockwise.
void setAngle(double angle)
Sets the rotation angle of the pattern, in degrees clockwise.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
A line symbol layer type which fills a stroked line with a QgsFillSymbol.
void setPenJoinStyle(Qt::PenJoinStyle style)
Sets the pen join style used to render the line (e.g.
Qt::PenCapStyle penCapStyle() const
Returns the pen cap style used to render the line (e.g.
void setMapUnitScale(const QgsMapUnitScale &scale) override
Qt::PenJoinStyle penJoinStyle() const
Returns the pen join style used to render the line (e.g.
void setPenCapStyle(Qt::PenCapStyle style)
Sets the pen cap style used to render the line (e.g.
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 setStrokeWidthUnit(Qgis::RenderUnit unit)
Sets the stroke width unit.
void setStrokeColor(const QColor &color) override
Sets the stroke color for the symbol layer.
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the stroke width map unit scale.
Qgis::RenderUnit strokeWidthUnit() const
Returns the stroke width unit.
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
Returns the stroke color for the symbol layer.
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.
void setFontFamily(const QString &family)
Sets the font family for the font which will be used to render the point.
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.
const QgsMapUnitScale & strokeWidthMapUnitScale() const
Returns the stroke width map unit scale.
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 QFont createFont(const QString &family, int pointSize=-1, int weight=-1, bool italic=false)
Creates a font with the specified family.
static bool updateFontViaStyle(QFont &f, const QString &fontstyle, bool fallback=false)
Updates font with named style and retain all font properties.
static void setFontFamily(QFont &font, const QString &family)
Sets the family for a font object.
A symbol layer subclass which alters rendered feature shapes through the use of QGIS expressions.
Qgis::RenderUnit units() const
Returns the unit for the geometry expression.
QString geometryExpression() const
Gets the expression to generate this geometry.
void setUnits(Qgis::RenderUnit units)
Sets the units for the geometry expression.
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.
bool setSubSymbol(QgsSymbol *symbol) override
Sets layer's subsymbol. takes ownership of the passed symbol.
Qgis::SymbolType symbolType() const
Access the symbol type.
QgsSymbol * subSymbol() override
Returns the symbol's sub symbol, if present.
A fill symbol layer which draws a smooth color gradient over a polygon.
void setColorRamp(QgsColorRamp *ramp)
Sets the color ramp used for the gradient fill.
QColor color2() const
Returns the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoC...
void setGradientSpread(Qgis::GradientSpread gradientSpread)
Sets the gradient spread mode, which controls how the gradient behaves outside of the predefined stop...
Qgis::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
Qgis::SymbolCoordinateReference coordinateMode() const
Returns the coordinate mode for gradient, which controls how the gradient stops are positioned.
bool referencePoint2IsCentroid() const
Returns whether the end point for the gradient is taken from the feature centroid.
void setGradientType(Qgis::GradientType gradientType)
Sets the type of gradient, e.g., linear or radial.
void setReferencePoint2(QPointF referencePoint)
Sets the end point of gradient fill, in the range [0,0] - [1,1].
void setOffsetUnit(Qgis::RenderUnit unit)
Sets the unit for the fill's offset.
void setCoordinateMode(Qgis::SymbolCoordinateReference coordinateMode)
Sets the coordinate mode for gradient, which controls how the gradient stops are positioned.
void setReferencePoint2IsCentroid(bool isCentroid)
Sets whether the end point for the gradient is taken from the feature centroid.
void setReferencePoint1IsCentroid(bool isCentroid)
Sets whether the starting point for the gradient is taken from the feature centroid.
void setOffset(QPointF offset)
Sets an offset by which polygons will be translated during rendering.
void setGradientColorType(Qgis::GradientColorSource gradientColorType)
Sets the gradient color mode, which controls how gradient color stops are created.
QPointF referencePoint1() const
Returns the starting point of gradient fill, in the range [0,0] - [1,1].
Qgis::GradientSpread gradientSpread() const
Returns the gradient spread mode, which controls how the gradient behaves outside of the predefined s...
QgsColorRamp * colorRamp()
Returns the color ramp used for the gradient fill.
void setReferencePoint1(QPointF referencePoint)
Sets the 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.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
Qgis::GradientColorSource gradientColorType() const
Returns the gradient color mode, which controls how gradient color stops are created.
QPointF offset() const
Returns the offset by which polygons will be translated during rendering.
Qgis::GradientType gradientType() const
Returns the type of gradient, e.g., linear or radial.
bool referencePoint1IsCentroid() const
Returns whether the starting point for the gradient is taken from the feature centroid.
QPointF referencePoint2() const
Returns the end point of gradient fill, in the range [0,0] - [1,1].
void setColor2(const QColor &color2)
Sets the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColo...
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.
const QgsMapUnitScale & hashLengthMapUnitScale() const
Returns the map unit scale for the hash length.
void setHashLengthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the hash length.
Qgis::RenderUnit hashLengthUnit() const
Returns the units for the length of hash symbols.
double hashLength() const
Returns the length of hash symbols.
void setHashLengthUnit(Qgis::RenderUnit unit)
Sets the unit for 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.
int nextFrameDelay(const QString &path, int currentFrame=0, bool blocking=false)
For image formats that support animation, this function returns the number of milliseconds to wait un...
QImage pathAsImage(const QString &path, const QSize size, const bool keepAspectRatio, const double opacity, bool &fitsInCache, bool blocking=false, double targetDpi=96, int frameNumber=-1, bool *isMissing=nullptr)
Returns the specified path rendered as an image.
Qgis::SymbolCoordinateReference coordinateReference() const
Returns the coordinate reference mode for fill which controls how the top left corner of the image fi...
void setCoordinateReference(Qgis::SymbolCoordinateReference coordinateReference)
Sets the coordinate reference mode for fill which controls how the top left corner of the image fill ...
A symbol fill consisting of repeated parallel lines.
Qgis::RenderUnit distanceUnit() const
Returns the units for the distance between lines in the fill pattern.
void setMapUnitScale(const QgsMapUnitScale &scale) override
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line distance.
Qgis::LineClipMode clipMode() const
Returns the line clipping mode, which defines how lines are clipped at the edges of shapes.
double lineAngle() const
Returns the angle for the parallel lines used to fill the symbol.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the pattern's line offset.
void setDistance(double d)
Sets the distance between lines in the fill pattern.
void setClipMode(Qgis::LineClipMode mode)
Sets the line clipping mode, which defines how lines are clipped at the edges of shapes.
void setOffsetUnit(Qgis::RenderUnit unit)
Sets the unit for the line pattern's offset.
const QgsMapUnitScale & distanceMapUnitScale() const
Returns the map unit scale for the pattern's line distance.
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 setDistanceUnit(Qgis::RenderUnit unit)
Sets the unit for the distance between lines in the fill pattern.
double distance() const
Returns 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...
Qgis::RenderUnit offsetUnit() const
Returns the units for the line pattern's offset.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's line offset.
Abstract base class for line symbol layers.
const QgsMapUnitScale & widthMapUnitScale() const
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.
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...
void setWidthMapUnitScale(const QgsMapUnitScale &scale)
void setOffset(double offset)
Sets the line's offset.
void setOffsetUnit(Qgis::RenderUnit unit)
Sets the unit for the line's offset.
void setWidthUnit(Qgis::RenderUnit unit)
Sets 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 & offsetMapUnitScale() const
Returns the map unit scale for the line's offset.
Qgis::RenderUnit offsetUnit() const
Returns the units for the line's offset.
Qgis::RenderUnit widthUnit() const
Returns the units for the line's width.
A line symbol type, for rendering LineString and MultiLineString geometries.
double averageAngleLength() const
Returns the length of line over which the line's direction is averaged when calculating individual la...
void setShowMarker(bool show)
Sets whether a marker symbol should be shown corresponding to the labeled point on line.
void setAverageAngleUnit(Qgis::RenderUnit unit)
Sets the unit for the length over which the line's direction is averaged when calculating individual ...
void setAverageAngleMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the length over which the line's direction is averaged when calculating i...
void setSkipMultiplesOf(double multiple)
Sets the multiple distance to skip labels for.
Qgis::RenderUnit labelOffsetUnit() const
Returns the unit used for the offset between the line and linear referencing labels.
void setLabelOffset(const QPointF &offset)
Sets the offset between the line and linear referencing labels.
QgsTextFormat textFormat() const
Returns the text format used to render the layer.
bool rotateLabels() const
Returns true if the labels and symbols are to be rotated to match their line segment orientation.
bool showMarker() const
Returns true if a marker symbol should be shown corresponding to the labeled point on line.
void setNumericFormat(QgsNumericFormat *format)
Sets the numeric format used to format the labels for the layer.
QgsNumericFormat * numericFormat() const
Returns the numeric format used to format the labels for the layer.
QPointF labelOffset() const
Returns the offset between the line and linear referencing labels.
const QgsMapUnitScale & labelOffsetMapUnitScale() const
Returns the map unit scale used for calculating the offset between the line and linear referencing la...
void setInterval(double interval)
Sets the interval between labels.
void setLabelSource(Qgis::LinearReferencingLabelSource source)
Sets the label source, which dictates what quantity to use for the labels shown.
Qgis::RenderUnit averageAngleUnit() const
Returns the unit for the length over which the line's direction is averaged when calculating individu...
void setRotateLabels(bool rotate)
Sets whether the labels and symbols should be rotated to match their line segment orientation.
void setTextFormat(const QgsTextFormat &format)
Sets the text format used to render the layer.
const QgsMapUnitScale & averageAngleMapUnitScale() const
Returns the map unit scale for the length over which the line's direction is averaged when calculatin...
void setLabelOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for calculating the offset between the line and linear referencing label...
void setLabelOffsetUnit(Qgis::RenderUnit unit)
Sets the unit used for the offset between the line and linear referencing labels.
Qgis::LinearReferencingLabelSource labelSource() const
Returns the label source, which dictates what quantity to use for the labels shown.
double skipMultiplesOf() const
Returns the multiple distance to skip labels for.
void setPlacement(Qgis::LinearReferencingPlacement placement)
Sets the placement mode for the labels.
double interval() const
Returns the interval between labels.
void setAverageAngleLength(double length)
Sets the length of line over which the line's direction is averaged when calculating individual label...
Qgis::LinearReferencingPlacement placement() const
Returns the placement mode for the labels.
Line symbol layer type which draws a gradient pattern perpendicularly along a line.
void setColorRamp(QgsColorRamp *ramp)
Sets the color ramp used for the gradient line.
QColor color2() const
Returns the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoC...
Qgis::GradientColorSource gradientColorType() const
Returns the gradient color mode, which controls how gradient color stops are created.
void setColor2(const QColor &color2)
Sets the color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColo...
QgsColorRamp * colorRamp()
Returns the color ramp used for the gradient line.
Struct for storing maximum and minimum scales for measurements in map units.
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 setOffsetUnit(Qgis::RenderUnit unit)
Sets the units for the symbol's offset.
void setAngle(double angle)
Sets the rotation angle for the marker.
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.
const QgsMapUnitScale & sizeMapUnitScale() const
Returns the map unit scale for the symbol's size.
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.
double size() const
Returns the symbol size.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the symbol's offset.
Qgis::RenderUnit offsetUnit() const
Returns the units for the symbol's offset.
VerticalAnchorPoint verticalAnchorPoint() const
Returns the vertical anchor point for positioning the symbol.
Qgis::RenderUnit sizeUnit() const
Returns the units for the symbol's size.
HorizontalAnchorPoint horizontalAnchorPoint() const
Returns the horizontal anchor point for positioning the symbol.
void setSizeUnit(Qgis::RenderUnit unit)
Sets the units for the symbol's size.
VerticalAnchorPoint
Symbol vertical anchor points.
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.
A fill symbol layer which fills polygon shapes with repeating marker symbols.
const QgsMapUnitScale & distanceYMapUnitScale() const
Returns the map unit scale for the vertical distance between points in the pattern.
void setDisplacementX(double d)
Sets the horizontal displacement for odd numbered rows in the pattern.
void setOffsetXUnit(Qgis::RenderUnit unit)
Sets the units for the horizontal offset between rows in the pattern.
Qgis::RenderUnit offsetYUnit() const
Returns the units for the vertical offset for rows in the pattern.
const QgsMapUnitScale & randomDeviationXMapUnitScale() const
Returns the unit scale for the horizontal random deviation of points in the pattern.
void setOffsetX(double offset)
Sets the horizontal offset values for points in the pattern.
double maximumRandomDeviationY() const
Returns the maximum vertical random deviation of points in the pattern.
void setDistanceYUnit(Qgis::RenderUnit unit)
Sets the unit for the vertical distance between points in the pattern.
double distanceX() const
Returns the horizontal distance between rendered markers in the fill.
Qgis::RenderUnit randomDeviationYUnit() const
Returns the units for the vertical random deviation of points in the pattern.
double displacementY() const
Returns the vertical displacement for odd numbered columns in the pattern.
void setDisplacementYUnit(Qgis::RenderUnit unit)
Sets the units for the vertical displacement between rows in the pattern.
void setRandomDeviationYUnit(Qgis::RenderUnit unit)
Sets the unit for the vertical random deviation of points in the pattern.
const QgsMapUnitScale & distanceXMapUnitScale() const
Returns the map unit scale for the horizontal distance between points in the pattern.
void setRandomDeviationYMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the vertical random deviation of points in the pattern.
unsigned long seed() const
Returns the random number seed to use when randomly shifting points, or 0 if a truly random sequence ...
Qgis::MarkerClipMode clipMode() const
Returns the marker clipping mode, which defines how markers are clipped at the edges of shapes.
void setRandomDeviationXMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the horizontal random deviation of points in the pattern.
Qgis::RenderUnit distanceXUnit() const
Returns the units for the horizontal distance between points in the pattern.
double offsetY() const
Returns the vertical offset values for points in the pattern.
void setDisplacementY(double d)
Sets the vertical displacement for odd numbered columns in the pattern.
void setMaximumRandomDeviationX(double deviation)
Sets the maximum horizontal random deviation of points in the pattern.
void setDisplacementYMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the vertical displacement between odd numbered columns in the pattern.
void setMapUnitScale(const QgsMapUnitScale &scale) override
void setSeed(unsigned long seed)
Sets the random number seed to use when randomly shifting points, or 0 if a truly random sequence wil...
void setOffsetY(double offset)
Sets the vertical offset values for points in the pattern.
const QgsMapUnitScale & offsetXMapUnitScale() const
Returns the unit scale for the horizontal offset for rows in the pattern.
const QgsMapUnitScale & displacementXMapUnitScale() const
Returns the map unit scale for the horizontal displacement between odd numbered rows in the pattern.
const QgsMapUnitScale & offsetYMapUnitScale() const
Returns the unit scale for the vertical offset between rows in the pattern.
void setDistanceXMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the horizontal distance between points in the pattern.
Qgis::RenderUnit distanceYUnit() const
Returns the units for the vertical distance between points in the pattern.
const QgsMapUnitScale & displacementYMapUnitScale() const
Returns the map unit scale for the vertical displacement between odd numbered columns in the pattern.
void setDistanceXUnit(Qgis::RenderUnit unit)
Sets the unit for the horizontal distance between points in the pattern.
void setOffsetYUnit(Qgis::RenderUnit unit)
Sets the units for the vertical offset for rows in the pattern.
const QgsMapUnitScale & randomDeviationYMapUnitScale() const
Returns the unit scale for the vertical random deviation of points in the pattern.
Qgis::RenderUnit offsetXUnit() const
Returns the units 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)
Sets the vertical distance between rendered markers in the fill.
Qgis::RenderUnit displacementXUnit() const
Returns the units for the horizontal displacement between rows in the pattern.
Qgis::RenderUnit randomDeviationXUnit() const
Returns the units for the horizontal random deviation of points in the pattern.
void setDisplacementXUnit(Qgis::RenderUnit unit)
Sets the units for the horizontal displacement between rows in the pattern.
void setDistanceX(double d)
Sets the horizontal distance between rendered markers in the fill.
double offsetX() const
Returns the horizontal offset values for points in the pattern.
void setRandomDeviationXUnit(Qgis::RenderUnit unit)
Sets the unit for the horizontal random deviation of points in the pattern.
double maximumRandomDeviationX() const
Returns the maximum horizontal random deviation of points in the pattern.
void setDisplacementXMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the horizontal displacement between odd numbered rows in the pattern.
void setMaximumRandomDeviationY(double deviation)
Sets the maximum vertical random deviation of points in the pattern.
void setDistanceYMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the vertical distance between points in the pattern.
Qgis::RenderUnit displacementYUnit() const
Returns the units for the vertical displacement between rows in the pattern.
double displacementX() const
Returns the horizontal displacement for odd numbered rows in the pattern.
void setOffsetXMapUnitScale(const QgsMapUnitScale &scale)
Sets the unit scale for the horizontal offset for rows in the pattern.
double distanceY() const
Returns the vertical distance between rendered markers in the fill.
void setClipMode(Qgis::MarkerClipMode mode)
Sets the marker clipping mode, which defines how markers are clipped at the edges of shapes.
QgsProperty property(int key) const final
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.
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 setDensityAreaUnitScale(const QgsMapUnitScale &scale)
Sets the map scale for the density area.
void setMapUnitScale(const QgsMapUnitScale &scale) override
void setCountMethod(Qgis::PointCountMethod method)
Sets the count method used to randomly fill the polygon.
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...
void setPointCount(int count)
Sets the count of random points to render in the fill.
Qgis::RenderUnit densityAreaUnit() const
Returns the units for the density area.
Qgis::PointCountMethod countMethod() const
Returns the count method used to randomly fill the polygon.
void setDensityAreaUnit(Qgis::RenderUnit unit)
Sets the units for the density area.
const QgsMapUnitScale & densityAreaUnitScale() const
Returns the map scale for the density area.
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.
A class for filling symbols with a repeated raster image.
const QgsMapUnitScale & sizeMapUnitScale() const
Returns the map unit scale for the image's width and height.
double width() const
Returns the width used for scaling the image used in the fill.
void setOffsetUnit(const Qgis::RenderUnit unit)
Sets the units for the fill's offset.
void setHeight(double height)
Sets the height for scaling the image.
Qgis::SymbolCoordinateReference coordinateMode() const
Coordinate mode for fill.
Qgis::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
double opacity() const
Returns the opacity for the raster image used in the fill.
void setSizeUnit(Qgis::RenderUnit unit)
Sets the unit for the image's width and height.
void setOpacity(double opacity)
Sets the opacity for the raster image used in the fill.
Qgis::RenderUnit sizeUnit() const
Returns the units for the image's width and height.
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.
void setImageFilePath(const QString &imagePath)
Sets the path to the raster image used for the fill.
double height() const
Returns the height used for scaling the image used in the fill.
void setWidth(double width)
Sets the width for scaling the image used in the fill.
void setSizeMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the image's width and height.
QPointF offset() const
Returns the offset for the fill.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
void setOffset(QPointF offset)
Sets the offset for the fill.
void setCoordinateMode(Qgis::SymbolCoordinateReference mode)
Set the coordinate mode for fill.
Line symbol layer type which draws line sections using a raster image file.
double opacity() const
Returns the line opacity.
QString path() const
Returns the raster image path.
void setPath(const QString &path)
Set the raster image path.
void setOpacity(double opacity)
Set the line opacity.
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.
QColor svgStrokeColor() const
Returns the stroke color used for rendering the SVG content.
void setSvgStrokeWidthUnit(Qgis::RenderUnit unit)
Sets the unit for the stroke width.
Qgis::RenderUnit patternWidthUnit() const
Returns the units for the width of the SVG images in the pattern.
void setSvgFillColor(const QColor &c)
Sets the fill color used for rendering the SVG content.
const QgsMapUnitScale & svgStrokeWidthMapUnitScale() const
Returns the map unit scale for the pattern's stroke.
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 setPatternWidthUnit(Qgis::RenderUnit unit)
Sets the unit for the width of the SVG images in the pattern.
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.
void setSvgStrokeColor(const QColor &c)
Sets the stroke color used for rendering the SVG content.
const QgsMapUnitScale & patternWidthMapUnitScale() const
Returns the map unit scale for the pattern's width.
Qgis::RenderUnit svgStrokeWidthUnit() const
Returns the units 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.
void setPatternWidthMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the pattern's width.
Stores properties relating to a screen.
Qgis::RenderUnit offsetUnit() const
Returns the units used for the offset of the shapeburst fill.
QgsColorRamp * colorRamp()
Returns the color ramp used for the shapeburst fill.
int blurRadius() const
Returns the blur radius, which controls the amount of blurring applied to the fill.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
void setOffsetUnit(Qgis::RenderUnit unit)
Sets the units used for the offset for the shapeburst fill.
void setOffset(QPointF offset)
Sets the offset for the shapeburst fill.
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 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.
Qgis::RenderUnit distanceUnit() const
Returns the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
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.
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.
const QgsMapUnitScale & offsetMapUnitScale() const
void setDistanceUnit(Qgis::RenderUnit unit)
Sets the unit for the maximum distance to shade inside of the shape from the polygon's boundary.
void setDistanceMapUnitScale(const QgsMapUnitScale &scale)
void setColorType(Qgis::GradientColorSource colorType)
Sets the color mode to use for the shapeburst fill.
Qgis::GradientColorSource colorType() const
Returns the color mode used for the shapeburst fill.
const QgsMapUnitScale & distanceMapUnitScale() const
void setColorRamp(QgsColorRamp *ramp)
Sets the color ramp used to draw the shapeburst fill.
Renders polygons using a single fill and stroke color.
Qgis::RenderUnit strokeWidthUnit() const
Returns the units for the width of the fill's stroke.
Qt::PenJoinStyle penJoinStyle() const
QColor strokeColor() const override
Returns the stroke color for the symbol layer.
void setBrushStyle(Qt::BrushStyle style)
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
const QgsMapUnitScale & strokeWidthMapUnitScale() const
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the fill's offset.
void setStrokeWidthUnit(Qgis::RenderUnit unit)
Sets 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)
QPointF offset() const
Returns the offset by which polygons will be translated during rendering.
Qgis::RenderUnit offsetUnit() const
Returns the units for the fill's offset.
void setStrokeStyle(Qt::PenStyle strokeStyle)
void setOffsetUnit(Qgis::RenderUnit unit)
Sets the unit for the fill's offset.
void setOffset(QPointF offset)
Sets an offset by which polygons will be translated during rendering.
void setStrokeColor(const QColor &strokeColor) override
Sets the stroke color for the symbol layer.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the fill's offset.
Qt::BrushStyle brushStyle() const
A simple line symbol layer, which renders lines using a line in a variety of styles (e....
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...
const QgsMapUnitScale & customDashPatternMapUnitScale() const
Returns the map unit scale for lengths used in the custom dash pattern.
void setPenCapStyle(Qt::PenCapStyle style)
Sets 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.
QVector< qreal > customDashVector() const
Returns the custom dash vector, which is the pattern of alternating drawn/skipped lengths used while ...
Qt::PenJoinStyle penJoinStyle() const
Returns the pen join 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.
void setCustomDashPatternMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale 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.
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...
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 ...
Qgis::RenderUnit customDashPatternUnit() const
Returns the units for lengths used in the custom dash pattern.
double trimDistanceEnd() const
Returns the trim distance for the end of the line, which dictates a length from the end of the line a...
Qgis::RenderUnit dashPatternOffsetUnit() const
Returns the units for the dash pattern offset.
const QgsMapUnitScale & dashPatternOffsetMapUnitScale() const
Returns the map unit scale for the dash pattern offset value.
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.
void setDashPatternOffset(double offset)
Sets the dash pattern offset, which dictates how far along the dash pattern the pattern should start ...
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 setTrimDistanceStartMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the trim distance for the start of the line.
Qgis::RenderUnit trimDistanceStartUnit() const
Returns the unit for the trim distance for the start of the line.
Qt::PenCapStyle penCapStyle() const
Returns the pen cap style used to render the line (e.g.
void setTrimDistanceEndUnit(Qgis::RenderUnit unit)
Sets the unit for the trim distance for the end of the line.
void setDashPatternOffsetUnit(Qgis::RenderUnit unit)
Sets the unit for the dash pattern offset.
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 ...
void setTrimDistanceStartUnit(Qgis::RenderUnit unit)
Sets the unit for the trim distance for the start of the line.
Qgis::RenderUnit trimDistanceEndUnit() const
Returns the unit for the trim distance for the end 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...
void setCustomDashPatternUnit(Qgis::RenderUnit unit)
Sets the unit for lengths used in the custom dash pattern.
static QList< Qgis::MarkerShape > availableShapes()
Returns a list of all available shape types.
static bool shapeIsFilled(Qgis::MarkerShape shape)
Returns true if a symbol shape has a fill.
Qgis::MarkerShape shape() const
Returns the shape for the rendered marker symbol.
static QString encodeShape(Qgis::MarkerShape shape)
Encodes a shape to its string representation.
void setShape(Qgis::MarkerShape shape)
Sets the rendered marker shape.
Simple marker symbol layer, consisting of a rendered shape with solid fill color and an stroke.
void setColor(const QColor &color) override
Sets the "representative" color for the symbol layer.
Qt::PenJoinStyle penJoinStyle() const
Returns the marker's stroke join style (e.g., miter, bevel, etc).
void setStrokeWidthUnit(Qgis::RenderUnit u)
Sets the unit for the width of the marker's stroke.
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
Returns the fill color for the symbol layer.
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)
Qgis::RenderUnit strokeWidthUnit() const
Returns the unit for the width of the marker's stroke.
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
Returns the fill color for the symbol layer.
const QgsMapUnitScale & strokeWidthMapUnitScale() const
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)
void setStrokeWidthUnit(Qgis::RenderUnit unit)
Sets the units for the stroke width.
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
Sets the stroke color for the symbol layer.
void setMapUnitScale(const QgsMapUnitScale &scale) override
QColor strokeColor() const override
Returns the stroke color for the symbol layer.
void setFillColor(const QColor &color) override
Sets the fill color for the symbol layer.
double strokeWidth() const
Qgis::RenderUnit strokeWidthUnit() const
Returns the units for the stroke width.
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.
static QIcon symbolLayerPreviewIcon(const QgsSymbolLayer *layer, Qgis::RenderUnit u, QSize size, const QgsMapUnitScale &scale=QgsMapUnitScale(), Qgis::SymbolType parentSymbolType=Qgis::SymbolType::Hybrid, QgsMapLayer *mapLayer=nullptr, const QgsScreenProperties &screen=QgsScreenProperties())
Draws a symbol layer preview to an icon.
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, const QgsScreenProperties &screen=QgsScreenProperties())
Returns a pixmap preview for a color ramp.
static QIcon symbolPreviewIcon(const QgsSymbol *symbol, QSize size, int padding=0, QgsLegendPatchShape *shape=nullptr, const QgsScreenProperties &screen=QgsScreenProperties())
Returns an icon preview for a color ramp.
Property
Data definable properties.
@ SkipMultiples
Skip multiples of.
@ GradientType
Gradient fill type.
@ SecondaryColor
Secondary color (eg for gradient fills)
@ File
Filename, eg for svg files.
@ VerticalAnchor
Vertical anchor point.
@ GradientReference2Y
Gradient reference point 2 y.
@ GradientReference1X
Gradient reference point 1 x.
@ OffsetY
Vertical offset.
@ OffsetX
Horizontal offset.
@ GradientReference1Y
Gradient reference point 1 y.
@ DashPatternOffset
Dash pattern offset,.
@ GradientSpread
Gradient spread mode.
@ OffsetAlongLine
Offset along line.
@ CustomDash
Custom dash pattern.
@ ShapeburstMaxDistance
Shapeburst fill from edge distance.
@ HorizontalAnchor
Horizontal anchor point.
@ StrokeStyle
Stroke style (eg solid, dashed)
@ Name
Name, eg shape name for simple markers.
@ DistanceY
Vertical distance between points.
@ DensityArea
Density area.
@ ClipPoints
Whether markers should be clipped to polygon boundaries.
@ LineClipping
Line clipping mode.
@ ShapeburstIgnoreRings
Shapeburst ignore rings.
@ Character
Character, eg for font marker symbol layers.
@ ShapeburstUseWholeShape
Shapeburst use whole shape.
@ DisplacementX
Horizontal displacement.
@ ShowMarker
Show markers.
@ CoordinateMode
Gradient coordinate mode.
@ FillStyle
Fill style (eg solid, dots)
@ GradientReference2X
Gradient reference point 2 x.
@ StrokeColor
Stroke color.
@ TrimStart
Trim distance from start of line.
@ CapStyle
Line cap style.
@ BlurRadius
Shapeburst blur radius.
@ Placement
Line marker placement.
@ MarkerClipping
Marker clipping mode.
@ RandomSeed
Random number seed.
@ LineAngle
Line angle, or angle of hash lines for hash line symbols.
@ JoinStyle
Line join style.
@ RandomOffsetY
Random offset Y.
@ DisplacementY
Vertical displacement.
@ DistanceX
Horizontal distance between points.
@ AverageAngleLength
Length to average symbol angles over.
@ GradientReference1IsCentroid
Gradient reference point 1 is centroid.
@ Interval
Line marker interval.
@ StrokeWidth
Stroke width.
@ GradientReference2IsCentroid
Gradient reference point 2 is centroid.
@ LineDistance
Distance between lines, or length of lines for hash line symbols.
@ RandomOffsetX
Random offset X.
@ TrimEnd
Trim distance from end of line.
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.
virtual void setColor(const QColor &color)
Sets the "representative" color for the symbol layer.
virtual QColor color() const
Returns the "representative" color of the symbol layer.
static const QgsPropertiesDefinition & propertyDefinitions()
Returns the symbol layer property definitions.
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.
virtual QgsSymbol * clone() const =0
Returns a deep copy of this symbol.
bool rotateSymbols() const
Returns true if the repeating symbols be rotated to match their line segment orientation.
bool placeOnEveryPart() const
Returns true if the placement applies for every part of multi-part feature geometries.
double averageAngleLength() const
Returns the length of line over which the line's direction is averaged when calculating individual sy...
void setMapUnitScale(const QgsMapUnitScale &scale) FINAL
void setRotateSymbols(bool rotate)
Sets whether the repeating symbols should be rotated to match their line segment orientation.
void setIntervalUnit(Qgis::RenderUnit unit)
Sets the units for the interval between symbols.
void setAverageAngleUnit(Qgis::RenderUnit unit)
Sets the unit for the length over which the line's direction is averaged when calculating individual ...
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 setOffsetAlongLineUnit(Qgis::RenderUnit unit)
Sets the unit used for calculating the offset along line for 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...
const QgsMapUnitScale & intervalMapUnitScale() const
Returns the map unit scale for the interval between symbols.
double offsetAlongLine() const
Returns the offset along the line for the symbol placement.
Qgis::MarkerLinePlacements placements() const
Returns the placement of the symbols.
void setOffsetAlongLine(double offsetAlongLine)
Sets the the offset along the line for the symbol placement.
Qgis::RenderUnit offsetAlongLineUnit() const
Returns the unit used for calculating the offset along line for symbols.
void setInterval(double interval)
Sets the interval between individual symbols.
Qgis::RenderUnit intervalUnit() const
Returns the units for the interval between symbols.
void setPlaceOnEveryPart(bool respect)
Sets whether the placement applies for every part of multi-part feature geometries.
void setPlacements(Qgis::MarkerLinePlacements placements)
Sets the placement of the symbols.
Qgis::RenderUnit averageAngleUnit() const
Returns the unit for the length over which the line's direction is averaged when calculating individu...
const QgsMapUnitScale & offsetAlongLineMapUnitScale() const
Returns the map unit scale used for calculating the offset in map units along line for 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< Qgis::RenderUnit > RenderUnitList
List of render units.
Represents a vector layer which manages a vector based data sets.
QgsAuxiliaryLayer * auxiliaryLayer()
Returns the current auxiliary layer.
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.