48#include <QAbstractButton>
49#include <QButtonGroup>
50#include <QColorDialog>
55#include <QStandardItemModel>
56#include <QSvgRenderer>
60#include <QInputDialog>
62#include <QRegularExpression>
68 return *lExpressionContext;
79 expContext << symbolScope;
101 QStringList highlights;
107 << QStringLiteral(
"symbol_layer_count" ) << QStringLiteral(
"symbol_layer_index" ) << QStringLiteral(
"symbol_frame" );
110 if ( expContext.
hasVariable( QStringLiteral(
"zoom_level" ) ) )
112 highlights << QStringLiteral(
"zoom_level" );
114 if ( expContext.
hasVariable( QStringLiteral(
"vector_tile_zoom" ) ) )
116 highlights << QStringLiteral(
"vector_tile_zoom" );
127 const auto unitSelectionWidgets = findChildren<QgsUnitSelectionWidget *>();
130 unitWidget->setMapCanvas( mContext.
mapCanvas() );
148void QgsSymbolLayerWidget::createAuxiliaryField()
169 if ( dlg.exec() == QDialog::Accepted )
170 def = dlg.propertyDefinition();
180 property.setActive(
true );
202 connect( mCustomCheckBox, &QCheckBox::stateChanged,
this, &QgsSimpleLineSymbolLayerWidget::mCustomCheckBox_stateChanged );
203 connect( mChangePatternButton, &QPushButton::clicked,
this, &QgsSimpleLineSymbolLayerWidget::mChangePatternButton_clicked );
207 connect( mDrawInsideCheckBox, &QCheckBox::stateChanged,
this, &QgsSimpleLineSymbolLayerWidget::mDrawInsideCheckBox_stateChanged );
209 connect( mCheckAlignDash, &QCheckBox::toggled,
this, [ = ]
211 mCheckDashCorners->setEnabled( mCheckAlignDash->isChecked() );
212 if ( !mCheckAlignDash->isChecked() )
213 mCheckDashCorners->setChecked(
false );
221 connect( mCheckDashCorners, &QCheckBox::toggled,
this, [ = ]
243 btnChangeColor->setAllowOpacity(
true );
244 btnChangeColor->setColorDialogTitle( tr(
"Select Line Color" ) );
245 btnChangeColor->setContext( QStringLiteral(
"symbology" ) );
247 mColorDDBtn->registerLinkedWidget( btnChangeColor );
252 connect( mRingFilterComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ](
int )
261 spinOffset->setClearValue( 0.0 );
262 spinPatternOffset->setClearValue( 0.0 );
264 mTrimStartDistanceSpin->setClearValue( 0.0 );
265 mTrimDistanceEndSpin->setClearValue( 0.0 );
271 mPenWidthDDBtn->setSymbol( mAssistantPreviewSymbol );
273 connect( spinWidth,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSimpleLineSymbolLayerWidget::penWidthChanged );
275 connect( cboPenStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSimpleLineSymbolLayerWidget::penStyleChanged );
276 connect( spinOffset,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSimpleLineSymbolLayerWidget::offsetChanged );
277 connect( cboCapStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSimpleLineSymbolLayerWidget::penStyleChanged );
278 connect( cboJoinStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSimpleLineSymbolLayerWidget::penStyleChanged );
279 connect( spinPatternOffset,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSimpleLineSymbolLayerWidget::patternOffsetChanged );
281 connect( mTrimStartDistanceSpin,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
298 connect( mTrimDistanceEndSpin,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
324void QgsSimpleLineSymbolLayerWidget::updateAssistantSymbol()
326 for (
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1 ; i >= 0; --i )
328 mAssistantPreviewSymbol->deleteSymbolLayer( i );
330 mAssistantPreviewSymbol->appendSymbolLayer(
mLayer->
clone() );
333 mAssistantPreviewSymbol->setDataDefinedWidth( ddWidth );
339 if ( !layer || layer->
layerType() != QLatin1String(
"SimpleLine" ) )
346 mPenWidthUnitWidget->blockSignals(
true );
349 mPenWidthUnitWidget->blockSignals(
false );
350 mOffsetUnitWidget->blockSignals(
true );
353 mOffsetUnitWidget->blockSignals(
false );
354 mDashPatternUnitWidget->blockSignals(
true );
357 mDashPatternUnitWidget->blockSignals(
false );
367 spinWidth->blockSignals(
true );
369 spinWidth->blockSignals(
false );
370 btnChangeColor->blockSignals(
true );
372 btnChangeColor->blockSignals(
false );
373 spinOffset->blockSignals(
true );
375 spinOffset->blockSignals(
false );
376 cboPenStyle->blockSignals(
true );
377 cboJoinStyle->blockSignals(
true );
378 cboCapStyle->blockSignals(
true );
382 cboPenStyle->blockSignals(
false );
383 cboJoinStyle->blockSignals(
false );
384 cboCapStyle->blockSignals(
false );
391 mChangePatternButton->setEnabled( useCustomDashPattern );
392 label_3->setEnabled( !useCustomDashPattern );
393 cboPenStyle->setEnabled( !useCustomDashPattern );
394 mCustomCheckBox->blockSignals(
true );
395 mCustomCheckBox->setCheckState( useCustomDashPattern ? Qt::Checked : Qt::Unchecked );
396 mCustomCheckBox->blockSignals(
false );
399 const QSize size = mChangePatternButton->minimumSizeHint();
401 mChangePatternButton->setMinimumSize( QSize( size.width(), std::max( size.height(), fontHeight ) ) );
405 whileBlocking( mDrawInsideCheckBox )->setCheckState( drawInsidePolygon ? Qt::Checked : Qt::Unchecked );
426 updateAssistantSymbol();
443 mDrawInsideCheckBox->hide();
444 mRingFilterComboBox->hide();
454void QgsSimpleLineSymbolLayerWidget::penWidthChanged()
461void QgsSimpleLineSymbolLayerWidget::colorChanged(
const QColor &color )
467void QgsSimpleLineSymbolLayerWidget::penStyleChanged()
476void QgsSimpleLineSymbolLayerWidget::offsetChanged()
483void QgsSimpleLineSymbolLayerWidget::patternOffsetChanged()
490void QgsSimpleLineSymbolLayerWidget::mCustomCheckBox_stateChanged(
int state )
492 const bool checked = ( state == Qt::Checked );
493 mChangePatternButton->setEnabled( checked );
494 label_3->setEnabled( !checked );
495 cboPenStyle->setEnabled( !checked );
501void QgsSimpleLineSymbolLayerWidget::mChangePatternButton_clicked()
508 widget->
setUnit( mDashPatternUnitWidget->unit() );
520 d.setUnit( mDashPatternUnitWidget->unit() );
521 if ( d.exec() == QDialog::Accepted )
529void QgsSimpleLineSymbolLayerWidget::mPenWidthUnitWidget_changed()
540void QgsSimpleLineSymbolLayerWidget::mOffsetUnitWidget_changed()
550void QgsSimpleLineSymbolLayerWidget::mDashPatternUnitWidget_changed()
561void QgsSimpleLineSymbolLayerWidget::mDrawInsideCheckBox_stateChanged(
int state )
563 const bool checked = ( state == Qt::Checked );
568void QgsSimpleLineSymbolLayerWidget::patternOffsetUnitChanged()
585 std::unique_ptr< QgsSimpleLineSymbolLayer > layerCopy(
mLayer->
clone() );
590 const QColor color = qApp->palette().color( QPalette::WindowText );
591 layerCopy->setColor( color );
593 layerCopy->setOffset( 0 );
594 layerCopy->setUseCustomDashPattern(
true );
596 QSize currentIconSize;
599 currentIconSize = QSize( mChangePatternButton->width() - 10, mChangePatternButton->height() - 6 );
601 currentIconSize = QSize( mChangePatternButton->width() - 10, mChangePatternButton->height() - 12 );
604 if ( !currentIconSize.isValid() || currentIconSize.width() <= 0 || currentIconSize.height() <= 0 )
610 const std::unique_ptr< QgsLineSymbol > previewSymbol = std::make_unique< QgsLineSymbol >(
QgsSymbolLayerList() << layerCopy.release() );
612 mChangePatternButton->setIconSize( currentIconSize );
613 mChangePatternButton->setIcon( icon );
617 const int width =
static_cast< int >(
Qgis::UI_SCALE_FACTOR * fontMetrics().horizontalAdvance(
'X' ) * 23 );
618 const int height =
static_cast< int >( width / 1.61803398875 );
622 QBuffer buffer( &data );
623 pm.save( &buffer,
"PNG", 100 );
624 mChangePatternButton->setToolTip( QStringLiteral(
"<img src='data:image/png;base64, %3' width=\"%4\">" ).arg( QString( data.toBase64() ) ).arg( width ) );
629 QgsSymbolLayerWidget::resizeEvent( event );
647 connect( mStrokeStyleComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSimpleMarkerSymbolLayerWidget::mStrokeStyleComboBox_currentIndexChanged );
648 connect( mStrokeWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSimpleMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
649 connect( mHorizontalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSimpleMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
650 connect( mVerticalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSimpleMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
658 btnChangeColorFill->setAllowOpacity(
true );
659 btnChangeColorFill->setColorDialogTitle( tr(
"Select Fill Color" ) );
660 btnChangeColorFill->setContext( QStringLiteral(
"symbology" ) );
661 btnChangeColorFill->setShowNoColor(
true );
662 btnChangeColorFill->setNoColorString( tr(
"Transparent Fill" ) );
663 btnChangeColorStroke->setAllowOpacity(
true );
664 btnChangeColorStroke->setColorDialogTitle( tr(
"Select Stroke Color" ) );
665 btnChangeColorStroke->setContext( QStringLiteral(
"symbology" ) );
666 btnChangeColorStroke->setShowNoColor(
true );
667 btnChangeColorStroke->setNoColorString( tr(
"Transparent Stroke" ) );
669 mFillColorDDBtn->registerLinkedWidget( btnChangeColorFill );
670 mStrokeColorDDBtn->registerLinkedWidget( btnChangeColorStroke );
672 spinOffsetX->setClearValue( 0.0 );
673 spinOffsetY->setClearValue( 0.0 );
674 spinAngle->setClearValue( 0.0 );
680 mSizeDDBtn->setSymbol( mAssistantPreviewSymbol );
682 int size = lstNames->iconSize().width();
684 size = std::max( 30,
static_cast< int >( std::round(
Qgis::UI_SCALE_FACTOR * fontMetrics().horizontalAdvance(
'X' ) * 3 ) ) );
686 lstNames->setGridSize( QSize( size * 1.2, size * 1.2 ) );
687 lstNames->setIconSize( QSize( size, size ) );
689 const double markerSize = size * 0.8;
695 lyr->
setColor( QColor( 200, 200, 200 ) );
698 QListWidgetItem *item =
new QListWidgetItem( icon, QString(), lstNames );
699 item->setData( Qt::UserRole,
static_cast< int >( shape ) );
704 lstNames->setMinimumHeight( lstNames->gridSize().height() * 3.1 );
706 connect( lstNames, &QListWidget::currentRowChanged,
this, &QgsSimpleMarkerSymbolLayerWidget::setShape );
709 connect( cboJoinStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSimpleMarkerSymbolLayerWidget::penJoinStyleChanged );
710 connect( cboCapStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSimpleMarkerSymbolLayerWidget::penCapStyleChanged );
711 connect( spinSize,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSimpleMarkerSymbolLayerWidget::setSize );
712 connect( spinAngle,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSimpleMarkerSymbolLayerWidget::setAngle );
713 connect( spinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSimpleMarkerSymbolLayerWidget::setOffset );
714 connect( spinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSimpleMarkerSymbolLayerWidget::setOffset );
722 if ( layer->
layerType() != QLatin1String(
"SimpleMarker" ) )
730 for (
int i = 0; i < lstNames->count(); ++i )
732 if (
static_cast< Qgis::MarkerShape >( lstNames->item( i )->data( Qt::UserRole ).toInt() ) == shape )
734 lstNames->setCurrentRow( i );
738 btnChangeColorStroke->blockSignals(
true );
740 btnChangeColorStroke->blockSignals(
false );
741 btnChangeColorFill->blockSignals(
true );
744 btnChangeColorFill->blockSignals(
false );
745 spinSize->blockSignals(
true );
747 spinSize->blockSignals(
false );
748 spinAngle->blockSignals(
true );
750 spinAngle->blockSignals(
false );
751 mStrokeStyleComboBox->blockSignals(
true );
753 mStrokeStyleComboBox->blockSignals(
false );
754 mStrokeWidthSpinBox->blockSignals(
true );
756 mStrokeWidthSpinBox->blockSignals(
false );
757 cboJoinStyle->blockSignals(
true );
759 cboJoinStyle->blockSignals(
false );
760 cboCapStyle->blockSignals(
true );
762 cboCapStyle->blockSignals(
false );
765 spinOffsetX->blockSignals(
true );
767 spinOffsetX->blockSignals(
false );
768 spinOffsetY->blockSignals(
true );
770 spinOffsetY->blockSignals(
false );
772 mSizeUnitWidget->blockSignals(
true );
775 mSizeUnitWidget->blockSignals(
false );
776 mOffsetUnitWidget->blockSignals(
true );
779 mOffsetUnitWidget->blockSignals(
false );
780 mStrokeWidthUnitWidget->blockSignals(
true );
783 mStrokeWidthUnitWidget->blockSignals(
false );
786 mHorizontalAnchorComboBox->blockSignals(
true );
787 mVerticalAnchorComboBox->blockSignals(
true );
790 mHorizontalAnchorComboBox->blockSignals(
false );
791 mVerticalAnchorComboBox->blockSignals(
false );
806 updateAssistantSymbol();
814void QgsSimpleMarkerSymbolLayerWidget::setShape()
833void QgsSimpleMarkerSymbolLayerWidget::penJoinStyleChanged()
839void QgsSimpleMarkerSymbolLayerWidget::penCapStyleChanged()
845void QgsSimpleMarkerSymbolLayerWidget::setSize()
851void QgsSimpleMarkerSymbolLayerWidget::setAngle()
857void QgsSimpleMarkerSymbolLayerWidget::setOffset()
859 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
863void QgsSimpleMarkerSymbolLayerWidget::mStrokeStyleComboBox_currentIndexChanged(
int index )
874void QgsSimpleMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged(
double d )
883void QgsSimpleMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
893void QgsSimpleMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
903void QgsSimpleMarkerSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
913void QgsSimpleMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged(
int index )
922void QgsSimpleMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged(
int index )
931void QgsSimpleMarkerSymbolLayerWidget::updateAssistantSymbol()
933 for (
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1 ; i >= 0; --i )
935 mAssistantPreviewSymbol->deleteSymbolLayer( i );
937 mAssistantPreviewSymbol->appendSymbolLayer(
mLayer->
clone() );
940 mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
959 btnChangeColor->setAllowOpacity(
true );
960 btnChangeColor->setColorDialogTitle( tr(
"Select Fill Color" ) );
961 btnChangeColor->setContext( QStringLiteral(
"symbology" ) );
962 btnChangeColor->setShowNoColor(
true );
963 btnChangeColor->setNoColorString( tr(
"Transparent Fill" ) );
964 btnChangeStrokeColor->setAllowOpacity(
true );
965 btnChangeStrokeColor->setColorDialogTitle( tr(
"Select Stroke Color" ) );
966 btnChangeStrokeColor->setContext( QStringLiteral(
"symbology" ) );
967 btnChangeStrokeColor->setShowNoColor(
true );
968 btnChangeStrokeColor->setNoColorString( tr(
"Transparent Stroke" ) );
970 spinOffsetX->setClearValue( 0.0 );
971 spinOffsetY->setClearValue( 0.0 );
974 connect( cboFillStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSimpleFillSymbolLayerWidget::setBrushStyle );
976 connect( spinStrokeWidth,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSimpleFillSymbolLayerWidget::strokeWidthChanged );
977 connect( cboStrokeStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSimpleFillSymbolLayerWidget::strokeStyleChanged );
978 connect( cboJoinStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSimpleFillSymbolLayerWidget::strokeStyleChanged );
979 connect( spinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSimpleFillSymbolLayerWidget::offsetChanged );
980 connect( spinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSimpleFillSymbolLayerWidget::offsetChanged );
982 mFillColorDDBtn->registerLinkedWidget( btnChangeColor );
983 mStrokeColorDDBtn->registerLinkedWidget( btnChangeStrokeColor );
988 if ( layer->
layerType() != QLatin1String(
"SimpleFill" ) )
995 btnChangeColor->blockSignals(
true );
997 btnChangeColor->blockSignals(
false );
998 cboFillStyle->blockSignals(
true );
1000 cboFillStyle->blockSignals(
false );
1001 btnChangeStrokeColor->blockSignals(
true );
1003 btnChangeStrokeColor->blockSignals(
false );
1004 cboStrokeStyle->blockSignals(
true );
1006 cboStrokeStyle->blockSignals(
false );
1007 spinStrokeWidth->blockSignals(
true );
1009 spinStrokeWidth->blockSignals(
false );
1010 cboJoinStyle->blockSignals(
true );
1012 cboJoinStyle->blockSignals(
false );
1013 spinOffsetX->blockSignals(
true );
1015 spinOffsetX->blockSignals(
false );
1016 spinOffsetY->blockSignals(
true );
1018 spinOffsetY->blockSignals(
false );
1020 mStrokeWidthUnitWidget->blockSignals(
true );
1023 mStrokeWidthUnitWidget->blockSignals(
false );
1024 mOffsetUnitWidget->blockSignals(
true );
1027 mOffsetUnitWidget->blockSignals(
false );
1055void QgsSimpleFillSymbolLayerWidget::setBrushStyle()
1061void QgsSimpleFillSymbolLayerWidget::strokeWidthChanged()
1067void QgsSimpleFillSymbolLayerWidget::strokeStyleChanged()
1074void QgsSimpleFillSymbolLayerWidget::offsetChanged()
1076 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
1080void QgsSimpleFillSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
1090void QgsSimpleFillSymbolLayerWidget::mOffsetUnitWidget_changed()
1110 connect( mHorizontalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsFilledMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
1111 connect( mVerticalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsFilledMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
1117 spinOffsetX->setClearValue( 0.0 );
1118 spinOffsetY->setClearValue( 0.0 );
1119 spinAngle->setClearValue( 0.0 );
1125 mSizeDDBtn->setSymbol( mAssistantPreviewSymbol );
1127 int size = lstNames->iconSize().width();
1128 size = std::max( 30,
static_cast< int >( std::round(
Qgis::UI_SCALE_FACTOR * fontMetrics().horizontalAdvance(
'X' ) * 3 ) ) );
1129 lstNames->setGridSize( QSize( size * 1.2, size * 1.2 ) );
1130 lstNames->setIconSize( QSize( size, size ) );
1132 const double markerSize = size * 0.8;
1138 lyr->
setColor( QColor( 200, 200, 200 ) );
1141 QListWidgetItem *item =
new QListWidgetItem( icon, QString(), lstNames );
1142 item->setData( Qt::UserRole,
static_cast< int >( shape ) );
1147 lstNames->setMinimumHeight( lstNames->gridSize().height() * 3.1 );
1149 connect( lstNames, &QListWidget::currentRowChanged,
this, &QgsFilledMarkerSymbolLayerWidget::setShape );
1150 connect( spinSize,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsFilledMarkerSymbolLayerWidget::setSize );
1151 connect( spinAngle,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsFilledMarkerSymbolLayerWidget::setAngle );
1152 connect( spinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsFilledMarkerSymbolLayerWidget::setOffset );
1153 connect( spinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsFilledMarkerSymbolLayerWidget::setOffset );
1161 if ( layer->
layerType() != QLatin1String(
"FilledMarker" ) )
1169 for (
int i = 0; i < lstNames->count(); ++i )
1171 if (
static_cast< Qgis::MarkerShape >( lstNames->item( i )->data( Qt::UserRole ).toInt() ) == shape )
1173 lstNames->setCurrentRow( i );
1182 mSizeUnitWidget->blockSignals(
true );
1185 mSizeUnitWidget->blockSignals(
false );
1186 mOffsetUnitWidget->blockSignals(
true );
1189 mOffsetUnitWidget->blockSignals(
false );
1202 updateAssistantSymbol();
1210void QgsFilledMarkerSymbolLayerWidget::setShape()
1216void QgsFilledMarkerSymbolLayerWidget::setSize()
1222void QgsFilledMarkerSymbolLayerWidget::setAngle()
1228void QgsFilledMarkerSymbolLayerWidget::setOffset()
1230 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
1234void QgsFilledMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
1244void QgsFilledMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
1254void QgsFilledMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged(
int index )
1263void QgsFilledMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged(
int index )
1272void QgsFilledMarkerSymbolLayerWidget::updateAssistantSymbol()
1274 for (
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1 ; i >= 0; --i )
1276 mAssistantPreviewSymbol->deleteSymbolLayer( i );
1278 mAssistantPreviewSymbol->appendSymbolLayer(
mLayer->
clone() );
1281 mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
1294 connect( mSpinAngle,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsGradientFillSymbolLayerWidget::mSpinAngle_valueChanged );
1298 btnColorRamp->setShowGradientOnly(
true );
1300 btnChangeColor->setAllowOpacity(
true );
1301 btnChangeColor->setColorDialogTitle( tr(
"Select Gradient Color" ) );
1302 btnChangeColor->setContext( QStringLiteral(
"symbology" ) );
1303 btnChangeColor->setShowNoColor(
true );
1304 btnChangeColor->setNoColorString( tr(
"Transparent" ) );
1305 btnChangeColor2->setAllowOpacity(
true );
1306 btnChangeColor2->setColorDialogTitle( tr(
"Select Gradient Color" ) );
1307 btnChangeColor2->setContext( QStringLiteral(
"symbology" ) );
1308 btnChangeColor2->setShowNoColor(
true );
1309 btnChangeColor2->setNoColorString( tr(
"Transparent" ) );
1311 mStartColorDDBtn->registerLinkedWidget( btnChangeColor );
1312 mEndColorDDBtn->registerLinkedWidget( btnChangeColor2 );
1314 spinOffsetX->setClearValue( 0.0 );
1315 spinOffsetY->setClearValue( 0.0 );
1316 mSpinAngle->setClearValue( 0.0 );
1324 connect( radioTwoColor, &QAbstractButton::toggled,
this, &QgsGradientFillSymbolLayerWidget::colorModeChanged );
1325 connect( spinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsGradientFillSymbolLayerWidget::offsetChanged );
1326 connect( spinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsGradientFillSymbolLayerWidget::offsetChanged );
1327 connect( spinRefPoint1X,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
1328 connect( spinRefPoint1Y,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
1329 connect( checkRefPoint1Centroid, &QAbstractButton::toggled,
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
1330 connect( spinRefPoint2X,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
1331 connect( spinRefPoint2Y,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
1332 connect( checkRefPoint2Centroid, &QAbstractButton::toggled,
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
1337 if ( layer->
layerType() != QLatin1String(
"GradientFill" ) )
1344 btnChangeColor->blockSignals(
true );
1346 btnChangeColor->blockSignals(
false );
1347 btnChangeColor2->blockSignals(
true );
1349 btnChangeColor2->blockSignals(
false );
1353 radioTwoColor->setChecked(
true );
1354 btnColorRamp->setEnabled(
false );
1358 radioColorRamp->setChecked(
true );
1359 btnChangeColor->setEnabled(
false );
1360 btnChangeColor2->setEnabled(
false );
1366 btnColorRamp->blockSignals(
true );
1368 btnColorRamp->blockSignals(
false );
1371 cboGradientType->blockSignals(
true );
1375 cboGradientType->setCurrentIndex( 0 );
1378 cboGradientType->setCurrentIndex( 1 );
1381 cboGradientType->setCurrentIndex( 2 );
1384 cboGradientType->blockSignals(
false );
1386 cboCoordinateMode->blockSignals(
true );
1390 cboCoordinateMode->setCurrentIndex( 1 );
1391 checkRefPoint1Centroid->setEnabled(
false );
1392 checkRefPoint2Centroid->setEnabled(
false );
1396 cboCoordinateMode->setCurrentIndex( 0 );
1399 cboCoordinateMode->blockSignals(
false );
1401 cboGradientSpread->blockSignals(
true );
1405 cboGradientSpread->setCurrentIndex( 0 );
1408 cboGradientSpread->setCurrentIndex( 1 );
1411 cboGradientSpread->setCurrentIndex( 2 );
1414 cboGradientSpread->blockSignals(
false );
1416 spinRefPoint1X->blockSignals(
true );
1418 spinRefPoint1X->blockSignals(
false );
1419 spinRefPoint1Y->blockSignals(
true );
1421 spinRefPoint1Y->blockSignals(
false );
1422 checkRefPoint1Centroid->blockSignals(
true );
1426 spinRefPoint1X->setEnabled(
false );
1427 spinRefPoint1Y->setEnabled(
false );
1429 checkRefPoint1Centroid->blockSignals(
false );
1430 spinRefPoint2X->blockSignals(
true );
1432 spinRefPoint2X->blockSignals(
false );
1433 spinRefPoint2Y->blockSignals(
true );
1435 spinRefPoint2Y->blockSignals(
false );
1436 checkRefPoint2Centroid->blockSignals(
true );
1440 spinRefPoint2X->setEnabled(
false );
1441 spinRefPoint2Y->setEnabled(
false );
1443 checkRefPoint2Centroid->blockSignals(
false );
1445 spinOffsetX->blockSignals(
true );
1447 spinOffsetX->blockSignals(
false );
1448 spinOffsetY->blockSignals(
true );
1450 spinOffsetY->blockSignals(
false );
1451 mSpinAngle->blockSignals(
true );
1453 mSpinAngle->blockSignals(
false );
1455 mOffsetUnitWidget->blockSignals(
true );
1458 mOffsetUnitWidget->blockSignals(
false );
1492void QgsGradientFillSymbolLayerWidget::colorModeChanged()
1494 if ( radioTwoColor->isChecked() )
1507 if ( btnColorRamp->isNull() )
1521 spinRefPoint1X->setValue( 0.5 );
1522 spinRefPoint1Y->setValue( 0 );
1523 spinRefPoint2X->setValue( 0.5 );
1524 spinRefPoint2Y->setValue( 1 );
1529 spinRefPoint1X->setValue( 0 );
1530 spinRefPoint1Y->setValue( 0 );
1531 spinRefPoint2X->setValue( 1 );
1532 spinRefPoint2Y->setValue( 1 );
1536 spinRefPoint1X->setValue( 0.5 );
1537 spinRefPoint1Y->setValue( 0.5 );
1538 spinRefPoint2X->setValue( 1 );
1539 spinRefPoint2Y->setValue( 1 );
1554 checkRefPoint1Centroid->setEnabled(
true );
1555 checkRefPoint2Centroid->setEnabled(
true );
1561 checkRefPoint1Centroid->setChecked( Qt::Unchecked );
1562 checkRefPoint1Centroid->setEnabled(
false );
1563 checkRefPoint2Centroid->setChecked( Qt::Unchecked );
1564 checkRefPoint2Centroid->setEnabled(
false );
1589void QgsGradientFillSymbolLayerWidget::offsetChanged()
1591 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
1595void QgsGradientFillSymbolLayerWidget::referencePointChanged()
1604void QgsGradientFillSymbolLayerWidget::mSpinAngle_valueChanged(
double value )
1610void QgsGradientFillSymbolLayerWidget::mOffsetUnitWidget_changed()
1628 connect( mSpinBlurRadius, qOverload< int >( &QSpinBox::valueChanged ),
this, &QgsShapeburstFillSymbolLayerWidget::mSpinBlurRadius_valueChanged );
1629 connect( mSpinMaxDistance, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, &QgsShapeburstFillSymbolLayerWidget::mSpinMaxDistance_valueChanged );
1631 connect( mRadioUseWholeShape, &QRadioButton::toggled,
this, &QgsShapeburstFillSymbolLayerWidget::mRadioUseWholeShape_toggled );
1633 connect( mIgnoreRingsCheckBox, &QCheckBox::stateChanged,
this, &QgsShapeburstFillSymbolLayerWidget::mIgnoreRingsCheckBox_stateChanged );
1639 QButtonGroup *group1 =
new QButtonGroup(
this );
1640 group1->addButton( radioColorRamp );
1641 group1->addButton( radioTwoColor );
1642 QButtonGroup *group2 =
new QButtonGroup(
this );
1643 group2->addButton( mRadioUseMaxDistance );
1644 group2->addButton( mRadioUseWholeShape );
1645 btnChangeColor->setAllowOpacity(
true );
1646 btnChangeColor->setColorDialogTitle( tr(
"Select Gradient Color" ) );
1647 btnChangeColor->setContext( QStringLiteral(
"symbology" ) );
1648 btnChangeColor->setShowNoColor(
true );
1649 btnChangeColor->setNoColorString( tr(
"Transparent" ) );
1650 btnChangeColor2->setAllowOpacity(
true );
1651 btnChangeColor2->setColorDialogTitle( tr(
"Select Gradient Color" ) );
1652 btnChangeColor2->setContext( QStringLiteral(
"symbology" ) );
1653 btnChangeColor2->setShowNoColor(
true );
1654 btnChangeColor2->setNoColorString( tr(
"Transparent" ) );
1656 mStartColorDDBtn->registerLinkedWidget( btnChangeColor );
1657 mEndColorDDBtn->registerLinkedWidget( btnChangeColor2 );
1659 spinOffsetX->setClearValue( 0.0 );
1660 spinOffsetY->setClearValue( 0.0 );
1661 mSpinMaxDistance->setClearValue( 5.0 );
1663 btnColorRamp->setShowGradientOnly(
true );
1669 connect( radioTwoColor, &QAbstractButton::toggled,
this, &QgsShapeburstFillSymbolLayerWidget::colorModeChanged );
1670 connect( spinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsShapeburstFillSymbolLayerWidget::offsetChanged );
1671 connect( spinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsShapeburstFillSymbolLayerWidget::offsetChanged );
1673 connect( mBlurSlider, &QAbstractSlider::valueChanged, mSpinBlurRadius, &QSpinBox::setValue );
1674 connect( mSpinBlurRadius,
static_cast < void ( QSpinBox::* )(
int )
> ( &QSpinBox::valueChanged ), mBlurSlider, &QAbstractSlider::setValue );
1679 if ( layer->
layerType() != QLatin1String(
"ShapeburstFill" ) )
1686 btnChangeColor->blockSignals(
true );
1688 btnChangeColor->blockSignals(
false );
1689 btnChangeColor2->blockSignals(
true );
1691 btnChangeColor2->blockSignals(
false );
1695 radioTwoColor->setChecked(
true );
1696 btnColorRamp->setEnabled(
false );
1700 radioColorRamp->setChecked(
true );
1701 btnChangeColor->setEnabled(
false );
1702 btnChangeColor2->setEnabled(
false );
1705 mSpinBlurRadius->blockSignals(
true );
1706 mBlurSlider->blockSignals(
true );
1709 mSpinBlurRadius->blockSignals(
false );
1710 mBlurSlider->blockSignals(
false );
1712 mSpinMaxDistance->blockSignals(
true );
1714 mSpinMaxDistance->blockSignals(
false );
1716 mRadioUseWholeShape->blockSignals(
true );
1717 mRadioUseMaxDistance->blockSignals(
true );
1720 mRadioUseWholeShape->setChecked(
true );
1721 mSpinMaxDistance->setEnabled(
false );
1722 mDistanceUnitWidget->setEnabled(
false );
1726 mRadioUseMaxDistance->setChecked(
true );
1727 mSpinMaxDistance->setEnabled(
true );
1728 mDistanceUnitWidget->setEnabled(
true );
1730 mRadioUseWholeShape->blockSignals(
false );
1731 mRadioUseMaxDistance->blockSignals(
false );
1733 mDistanceUnitWidget->blockSignals(
true );
1736 mDistanceUnitWidget->blockSignals(
false );
1738 mIgnoreRingsCheckBox->blockSignals(
true );
1739 mIgnoreRingsCheckBox->setCheckState(
mLayer->
ignoreRings() ? Qt::Checked : Qt::Unchecked );
1740 mIgnoreRingsCheckBox->blockSignals(
false );
1745 btnColorRamp->blockSignals(
true );
1747 btnColorRamp->blockSignals(
false );
1750 spinOffsetX->blockSignals(
true );
1752 spinOffsetX->blockSignals(
false );
1753 spinOffsetY->blockSignals(
true );
1755 spinOffsetY->blockSignals(
false );
1756 mOffsetUnitWidget->blockSignals(
true );
1759 mOffsetUnitWidget->blockSignals(
false );
1793void QgsShapeburstFillSymbolLayerWidget::colorModeChanged()
1800 if ( radioTwoColor->isChecked() )
1811void QgsShapeburstFillSymbolLayerWidget::mSpinBlurRadius_valueChanged(
int value )
1820void QgsShapeburstFillSymbolLayerWidget::mSpinMaxDistance_valueChanged(
double value )
1829void QgsShapeburstFillSymbolLayerWidget::mDistanceUnitWidget_changed()
1839void QgsShapeburstFillSymbolLayerWidget::mRadioUseWholeShape_toggled(
bool value )
1844 mDistanceUnitWidget->setEnabled( !value );
1849void QgsShapeburstFillSymbolLayerWidget::applyColorRamp()
1859void QgsShapeburstFillSymbolLayerWidget::offsetChanged()
1863 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
1868void QgsShapeburstFillSymbolLayerWidget::mOffsetUnitWidget_changed()
1879void QgsShapeburstFillSymbolLayerWidget::mIgnoreRingsCheckBox_stateChanged(
int state )
1881 const bool checked = ( state == Qt::Checked );
1910 connect( mRingFilterComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ](
int )
1919 spinOffset->setClearValue( 0.0 );
1920 mSpinOffsetAlongLine->setClearValue( 0.0 );
1921 mSpinAverageAngleLength->setClearValue( 4.0 );
1925 connect( chkRotateMarker, &QAbstractButton::clicked,
this, &QgsMarkerLineSymbolLayerWidget::setRotate );
1926 connect( spinOffset,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsMarkerLineSymbolLayerWidget::setOffset );
1927 connect( mSpinAverageAngleLength,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsMarkerLineSymbolLayerWidget::setAverageAngle );
1928 connect( mCheckInterval, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1929 connect( mCheckVertex, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1930 connect( mCheckVertexLast, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1931 connect( mCheckVertexFirst, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1932 connect( mCheckCentralPoint, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1933 connect( mCheckCurvePoint, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1934 connect( mCheckSegmentCentralPoint, &QCheckBox::toggled,
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
1935 connect( mCheckPlaceOnEveryPart, &QCheckBox::toggled,
this, [ = ]
1947 if ( layer->
layerType() != QLatin1String(
"MarkerLine" ) )
1954 spinInterval->blockSignals(
true );
1956 spinInterval->blockSignals(
false );
1957 mSpinOffsetAlongLine->blockSignals(
true );
1959 mSpinOffsetAlongLine->blockSignals(
false );
1960 chkRotateMarker->blockSignals(
true );
1962 chkRotateMarker->blockSignals(
false );
1963 spinOffset->blockSignals(
true );
1965 spinOffset->blockSignals(
false );
1980 mIntervalUnitWidget->blockSignals(
true );
1983 mIntervalUnitWidget->blockSignals(
false );
1984 mOffsetUnitWidget->blockSignals(
true );
1987 mOffsetUnitWidget->blockSignals(
false );
1988 mOffsetAlongLineUnitWidget->blockSignals(
true );
1991 mOffsetAlongLineUnitWidget->blockSignals(
false );
2022 mRingFilterComboBox->hide();
2023 mRingsLabel->hide();
2044void QgsMarkerLineSymbolLayerWidget::setRotate()
2046 mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( mCheckInterval->isChecked() || mCheckCentralPoint->isChecked() ) );
2047 mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
2053void QgsMarkerLineSymbolLayerWidget::setOffset()
2059void QgsMarkerLineSymbolLayerWidget::setPlacement()
2061 const bool interval = mCheckInterval->isChecked();
2062 spinInterval->setEnabled( interval );
2063 mSpinOffsetAlongLine->setEnabled( mCheckInterval->isChecked() || mCheckVertexLast->isChecked() || mCheckVertexFirst->isChecked() );
2064 mOffsetAlongLineUnitWidget->setEnabled( mSpinOffsetAlongLine->isEnabled() );
2065 mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( mCheckInterval->isChecked() || mCheckCentralPoint->isChecked() ) );
2066 mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
2067 mCheckPlaceOnEveryPart->setEnabled( mCheckVertexLast->isChecked() || mCheckVertexFirst->isChecked() );
2070 if ( mCheckInterval->isChecked() )
2072 if ( mCheckVertex->isChecked() )
2074 if ( mCheckVertexLast->isChecked() )
2076 if ( mCheckVertexFirst->isChecked() )
2078 if ( mCheckCurvePoint->isChecked() )
2080 if ( mCheckSegmentCentralPoint->isChecked() )
2082 if ( mCheckCentralPoint->isChecked() )
2089void QgsMarkerLineSymbolLayerWidget::mIntervalUnitWidget_changed()
2099void QgsMarkerLineSymbolLayerWidget::mOffsetUnitWidget_changed()
2109void QgsMarkerLineSymbolLayerWidget::mOffsetAlongLineUnitWidget_changed()
2119void QgsMarkerLineSymbolLayerWidget::averageAngleUnitChanged()
2129void QgsMarkerLineSymbolLayerWidget::setAverageAngle(
double val )
2166 connect( mRingFilterComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ](
int )
2175 spinOffset->setClearValue( 0.0 );
2176 mSpinOffsetAlongLine->setClearValue( 0.0 );
2177 mHashRotationSpinBox->setClearValue( 0 );
2178 mSpinAverageAngleLength->setClearValue( 4.0 );
2180 connect( spinInterval,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsHashedLineSymbolLayerWidget::setInterval );
2181 connect( mSpinOffsetAlongLine,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsHashedLineSymbolLayerWidget::setOffsetAlongLine );
2182 connect( mSpinHashLength,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsHashedLineSymbolLayerWidget::setHashLength );
2183 connect( mHashRotationSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsHashedLineSymbolLayerWidget::setHashAngle );
2184 connect( chkRotateMarker, &QAbstractButton::clicked,
this, &QgsHashedLineSymbolLayerWidget::setRotate );
2185 connect( spinOffset,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsHashedLineSymbolLayerWidget::setOffset );
2186 connect( mSpinAverageAngleLength,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsHashedLineSymbolLayerWidget::setAverageAngle );
2188 connect( mCheckInterval, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2189 connect( mCheckVertex, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2190 connect( mCheckVertexLast, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2191 connect( mCheckVertexFirst, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2192 connect( mCheckCentralPoint, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2193 connect( mCheckCurvePoint, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2194 connect( mCheckSegmentCentralPoint, &QCheckBox::toggled,
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
2196 connect( mCheckPlaceOnEveryPart, &QCheckBox::toggled,
this, [ = ]
2208 if ( layer->
layerType() != QLatin1String(
"HashLine" ) )
2215 spinInterval->blockSignals(
true );
2216 spinInterval->setValue( mLayer->
interval() );
2217 spinInterval->blockSignals(
false );
2218 mSpinOffsetAlongLine->blockSignals(
true );
2220 mSpinOffsetAlongLine->blockSignals(
false );
2223 chkRotateMarker->blockSignals(
true );
2225 chkRotateMarker->blockSignals(
false );
2226 spinOffset->blockSignals(
true );
2227 spinOffset->setValue( mLayer->
offset() );
2228 spinOffset->blockSignals(
false );
2243 mIntervalUnitWidget->blockSignals(
true );
2244 mIntervalUnitWidget->setUnit( mLayer->
intervalUnit() );
2246 mIntervalUnitWidget->blockSignals(
false );
2247 mOffsetUnitWidget->blockSignals(
true );
2248 mOffsetUnitWidget->setUnit( mLayer->
offsetUnit() );
2250 mOffsetUnitWidget->blockSignals(
false );
2251 mOffsetAlongLineUnitWidget->blockSignals(
true );
2254 mOffsetAlongLineUnitWidget->blockSignals(
false );
2261 whileBlocking( mRingFilterComboBox )->setCurrentIndex( mRingFilterComboBox->findData( mLayer->
ringFilter() ) );
2288 mRingFilterComboBox->hide();
2289 mRingsLabel->hide();
2298void QgsHashedLineSymbolLayerWidget::setInterval(
double val )
2304void QgsHashedLineSymbolLayerWidget::setOffsetAlongLine(
double val )
2310void QgsHashedLineSymbolLayerWidget::setHashLength(
double val )
2316void QgsHashedLineSymbolLayerWidget::setHashAngle(
double val )
2322void QgsHashedLineSymbolLayerWidget::setRotate()
2324 mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( mCheckInterval->isChecked() || mCheckCentralPoint->isChecked() ) );
2325 mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
2331void QgsHashedLineSymbolLayerWidget::setOffset()
2333 mLayer->
setOffset( spinOffset->value() );
2337void QgsHashedLineSymbolLayerWidget::setPlacement()
2339 const bool interval = mCheckInterval->isChecked();
2340 spinInterval->setEnabled( interval );
2341 mSpinOffsetAlongLine->setEnabled( mCheckInterval->isChecked() || mCheckVertexLast->isChecked() || mCheckVertexFirst->isChecked() );
2342 mOffsetAlongLineUnitWidget->setEnabled( mSpinOffsetAlongLine->isEnabled() );
2343 mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( mCheckInterval->isChecked() || mCheckCentralPoint->isChecked() ) );
2344 mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
2345 mCheckPlaceOnEveryPart->setEnabled( mCheckVertexLast->isChecked() || mCheckVertexFirst->isChecked() );
2348 if ( mCheckInterval->isChecked() )
2350 if ( mCheckVertex->isChecked() )
2352 if ( mCheckVertexLast->isChecked() )
2354 if ( mCheckVertexFirst->isChecked() )
2356 if ( mCheckCurvePoint->isChecked() )
2358 if ( mCheckSegmentCentralPoint->isChecked() )
2360 if ( mCheckCentralPoint->isChecked() )
2367void QgsHashedLineSymbolLayerWidget::mIntervalUnitWidget_changed()
2377void QgsHashedLineSymbolLayerWidget::mOffsetUnitWidget_changed()
2387void QgsHashedLineSymbolLayerWidget::mOffsetAlongLineUnitWidget_changed()
2397void QgsHashedLineSymbolLayerWidget::hashLengthUnitWidgetChanged()
2407void QgsHashedLineSymbolLayerWidget::averageAngleUnitChanged()
2417void QgsHashedLineSymbolLayerWidget::setAverageAngle(
double val )
2436 mSvgSelectorWidget->setAllowParameters(
true );
2437 mSvgSelectorWidget->sourceLineEdit()->setPropertyOverrideToolButtonVisible(
true );
2438 mSvgSelectorWidget->sourceLineEdit()->setLastPathSettingsKey( QStringLiteral(
"/UI/lastSVGMarkerDir" ) );
2439 mSvgSelectorWidget->initParametersModel(
this, vl );
2443 connect( mChangeStrokeColorButton, &
QgsColorButton::colorChanged,
this, &QgsSvgMarkerSymbolLayerWidget::mChangeStrokeColorButton_colorChanged );
2444 connect( mStrokeWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
2448 connect( mHorizontalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
2449 connect( mVerticalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
2456 mChangeColorButton->setAllowOpacity(
true );
2457 mChangeColorButton->setColorDialogTitle( tr(
"Select Fill color" ) );
2458 mChangeColorButton->setContext( QStringLiteral(
"symbology" ) );
2459 mChangeStrokeColorButton->setAllowOpacity(
true );
2460 mChangeStrokeColorButton->setColorDialogTitle( tr(
"Select Stroke Color" ) );
2461 mChangeStrokeColorButton->setContext( QStringLiteral(
"symbology" ) );
2463 mFillColorDDBtn->registerLinkedWidget( mChangeColorButton );
2464 mStrokeColorDDBtn->registerLinkedWidget( mChangeStrokeColorButton );
2466 spinOffsetX->setClearValue( 0.0 );
2467 spinOffsetY->setClearValue( 0.0 );
2468 spinAngle->setClearValue( 0.0 );
2470 connect( spinWidth,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::setWidth );
2471 connect( spinHeight,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::setHeight );
2473 connect( spinAngle,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::setAngle );
2474 connect( spinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::setOffset );
2475 connect( spinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSvgMarkerSymbolLayerWidget::setOffset );
2486 mWidthDDBtn->setSymbol( mAssistantPreviewSymbol );
2487 mHeightDDBtn->setSymbol( mAssistantPreviewSymbol );
2494#include <QAbstractListModel>
2495#include <QPixmapCache>
2509 bool hasFillParam, hasFillOpacityParam, hasStrokeParam, hasStrokeWidthParam, hasStrokeOpacityParam;
2510 QColor defaultFill, defaultStroke;
2511 double defaultStrokeWidth, defaultFillOpacity, defaultStrokeOpacity;
2512 bool hasDefaultFillColor, hasDefaultFillOpacity, hasDefaultStrokeColor, hasDefaultStrokeWidth, hasDefaultStrokeOpacity;
2514 hasFillOpacityParam, hasDefaultFillOpacity, defaultFillOpacity,
2515 hasStrokeParam, hasDefaultStrokeColor, defaultStroke,
2516 hasStrokeWidthParam, hasDefaultStrokeWidth, defaultStrokeWidth,
2517 hasStrokeOpacityParam, hasDefaultStrokeOpacity, defaultStrokeOpacity );
2518 mChangeColorButton->setEnabled( hasFillParam );
2519 mChangeColorButton->setAllowOpacity( hasFillOpacityParam );
2520 mChangeStrokeColorButton->setEnabled( hasStrokeParam );
2521 mChangeStrokeColorButton->setAllowOpacity( hasStrokeOpacityParam );
2522 mStrokeWidthSpinBox->setEnabled( hasStrokeWidthParam );
2527 const double existingOpacity = hasFillOpacityParam ? fill.alphaF() : 1.0;
2528 if ( hasDefaultFillColor && !skipDefaultColors )
2532 fill.setAlphaF( hasDefaultFillOpacity ? defaultFillOpacity : existingOpacity );
2533 mChangeColorButton->setColor( fill );
2535 if ( hasStrokeParam )
2538 const double existingOpacity = hasStrokeOpacityParam ? stroke.alphaF() : 1.0;
2539 if ( hasDefaultStrokeColor && !skipDefaultColors )
2541 stroke = defaultStroke;
2543 stroke.setAlphaF( hasDefaultStrokeOpacity ? defaultStrokeOpacity : existingOpacity );
2544 mChangeStrokeColorButton->setColor( stroke );
2547 whileBlocking( mSvgSelectorWidget->sourceLineEdit() )->setSource( layer->
path() );
2549 mStrokeWidthSpinBox->blockSignals(
true );
2550 mStrokeWidthSpinBox->setValue( hasDefaultStrokeWidth ? defaultStrokeWidth : layer->
strokeWidth() );
2551 mStrokeWidthSpinBox->blockSignals(
false );
2554 spinHeight->blockSignals(
true );
2555 if ( preservedAspectRatio )
2564 spinHeight->blockSignals(
false );
2565 whileBlocking( mLockAspectRatio )->setLocked( preservedAspectRatio );
2568void QgsSvgMarkerSymbolLayerWidget::updateAssistantSymbol()
2570 for (
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1 ; i >= 0; --i )
2572 mAssistantPreviewSymbol->deleteSymbolLayer( i );
2574 mAssistantPreviewSymbol->appendSymbolLayer(
mLayer->
clone() );
2577 mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
2588 if ( layer->
layerType() != QLatin1String(
"SvgMarker" ) )
2595 mSvgSelectorWidget->setSvgPath(
mLayer->
path() );
2598 spinWidth->blockSignals(
true );
2600 spinWidth->blockSignals(
false );
2601 spinAngle->blockSignals(
true );
2603 spinAngle->blockSignals(
false );
2606 spinOffsetX->blockSignals(
true );
2608 spinOffsetX->blockSignals(
false );
2609 spinOffsetY->blockSignals(
true );
2611 spinOffsetY->blockSignals(
false );
2613 mSizeUnitWidget->blockSignals(
true );
2616 mSizeUnitWidget->blockSignals(
false );
2617 mStrokeWidthUnitWidget->blockSignals(
true );
2620 mStrokeWidthUnitWidget->blockSignals(
false );
2621 mOffsetUnitWidget->blockSignals(
true );
2624 mOffsetUnitWidget->blockSignals(
false );
2627 mHorizontalAnchorComboBox->blockSignals(
true );
2628 mVerticalAnchorComboBox->blockSignals(
true );
2631 mHorizontalAnchorComboBox->blockSignals(
false );
2632 mVerticalAnchorComboBox->blockSignals(
false );
2648 updateAssistantSymbol();
2665 whileBlocking( mSvgSelectorWidget->sourceLineEdit() )->setSource( name );
2674 whileBlocking( mSvgSelectorWidget )->setSvgParameters( parameters );
2680void QgsSvgMarkerSymbolLayerWidget::setWidth()
2683 double fixedAspectRatio = 0.0;
2684 spinHeight->blockSignals(
true );
2685 if ( defaultAspectRatio <= 0.0 )
2687 spinHeight->setValue( spinWidth->value() );
2689 else if ( mLockAspectRatio->locked() )
2691 spinHeight->setValue( spinWidth->value() * defaultAspectRatio );
2695 fixedAspectRatio = spinHeight->value() / spinWidth->value();
2697 spinHeight->blockSignals(
false );
2703void QgsSvgMarkerSymbolLayerWidget::setHeight()
2706 double fixedAspectRatio = 0.0;
2707 spinWidth->blockSignals(
true );
2708 if ( defaultAspectRatio <= 0.0 )
2710 spinWidth->setValue( spinHeight->value() );
2712 else if ( mLockAspectRatio->locked() )
2714 spinWidth->setValue( spinHeight->value() / defaultAspectRatio );
2718 fixedAspectRatio = spinHeight->value() / spinWidth->value();
2720 spinWidth->blockSignals(
false );
2726void QgsSvgMarkerSymbolLayerWidget::lockAspectRatioChanged(
const bool locked )
2730 if ( defaultAspectRatio <= 0.0 )
2746void QgsSvgMarkerSymbolLayerWidget::setAngle()
2752void QgsSvgMarkerSymbolLayerWidget::setOffset()
2754 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
2758void QgsSvgMarkerSymbolLayerWidget::svgSourceChanged(
const QString &text )
2765void QgsSvgMarkerSymbolLayerWidget::mChangeColorButton_colorChanged(
const QColor &color )
2776void QgsSvgMarkerSymbolLayerWidget::mChangeStrokeColorButton_colorChanged(
const QColor &color )
2787void QgsSvgMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged(
double d )
2796void QgsSvgMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
2806void QgsSvgMarkerSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
2816void QgsSvgMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
2826void QgsSvgMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged(
int index )
2835void QgsSvgMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged(
int index )
2851 mSvgSelectorWidget->setAllowParameters(
true );
2852 mSvgSelectorWidget->sourceLineEdit()->setPropertyOverrideToolButtonVisible(
true );
2854 connect( mTextureWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSVGFillSymbolLayerWidget::mTextureWidthSpinBox_valueChanged );
2856 connect( mRotationSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSVGFillSymbolLayerWidget::mRotationSpinBox_valueChanged );
2858 connect( mChangeStrokeColorButton, &
QgsColorButton::colorChanged,
this, &QgsSVGFillSymbolLayerWidget::mChangeStrokeColorButton_colorChanged );
2859 connect( mStrokeWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsSVGFillSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
2867 mRotationSpinBox->setClearValue( 0.0 );
2869 mChangeColorButton->setColorDialogTitle( tr(
"Select Fill Color" ) );
2870 mChangeColorButton->setContext( QStringLiteral(
"symbology" ) );
2871 mChangeStrokeColorButton->setColorDialogTitle( tr(
"Select Stroke Color" ) );
2872 mChangeStrokeColorButton->setContext( QStringLiteral(
"symbology" ) );
2874 mFilColorDDBtn->registerLinkedWidget( mChangeColorButton );
2875 mStrokeColorDDBtn->registerLinkedWidget( mChangeStrokeColorButton );
2888 if ( layer->
layerType() != QLatin1String(
"SVGFill" ) )
2897 mTextureWidthSpinBox->blockSignals(
true );
2898 mTextureWidthSpinBox->setValue( width );
2899 mTextureWidthSpinBox->blockSignals(
false );
2901 mRotationSpinBox->blockSignals(
true );
2903 mRotationSpinBox->blockSignals(
false );
2904 mTextureWidthUnitWidget->blockSignals(
true );
2907 mTextureWidthUnitWidget->blockSignals(
false );
2908 mSvgStrokeWidthUnitWidget->blockSignals(
true );
2911 mSvgStrokeWidthUnitWidget->blockSignals(
false );
2912 mChangeColorButton->blockSignals(
true );
2914 mChangeColorButton->blockSignals(
false );
2915 mChangeStrokeColorButton->blockSignals(
true );
2917 mChangeStrokeColorButton->blockSignals(
false );
2918 mStrokeWidthSpinBox->blockSignals(
true );
2920 mStrokeWidthSpinBox->blockSignals(
false );
2944void QgsSVGFillSymbolLayerWidget::mTextureWidthSpinBox_valueChanged(
double d )
2953void QgsSVGFillSymbolLayerWidget::svgSourceChanged(
const QString &text )
2965void QgsSVGFillSymbolLayerWidget::setFile(
const QString &name )
2968 whileBlocking( mSvgSelectorWidget->sourceLineEdit() )->setSource( name );
2974void QgsSVGFillSymbolLayerWidget::setSvgParameters(
const QMap<QString, QgsProperty> ¶meters )
2977 whileBlocking( mSvgSelectorWidget )->setSvgParameters( parameters );
2984void QgsSVGFillSymbolLayerWidget::mRotationSpinBox_valueChanged(
double d )
2996 bool hasFillParam, hasFillOpacityParam, hasStrokeParam, hasStrokeWidthParam, hasStrokeOpacityParam;
2997 QColor defaultFill, defaultStroke;
2998 double defaultStrokeWidth, defaultFillOpacity, defaultStrokeOpacity;
2999 bool hasDefaultFillColor, hasDefaultFillOpacity, hasDefaultStrokeColor, hasDefaultStrokeWidth, hasDefaultStrokeOpacity;
3001 hasFillOpacityParam, hasDefaultFillOpacity, defaultFillOpacity,
3002 hasStrokeParam, hasDefaultStrokeColor, defaultStroke,
3003 hasStrokeWidthParam, hasDefaultStrokeWidth, defaultStrokeWidth,
3004 hasStrokeOpacityParam, hasDefaultStrokeOpacity, defaultStrokeOpacity );
3007 QColor fill = mChangeColorButton->color();
3008 const double newOpacity = hasFillOpacityParam ? fill.alphaF() : 1.0;
3009 if ( hasDefaultFillColor )
3013 fill.setAlphaF( hasDefaultFillOpacity ? defaultFillOpacity : newOpacity );
3014 mChangeColorButton->setColor( fill );
3016 mChangeColorButton->setEnabled( hasFillParam );
3017 mChangeColorButton->setAllowOpacity( hasFillOpacityParam );
3020 QColor stroke = mChangeStrokeColorButton->color();
3021 const double newOpacity = hasStrokeOpacityParam ? stroke.alphaF() : 1.0;
3022 if ( hasDefaultStrokeColor )
3024 stroke = defaultStroke;
3026 stroke.setAlphaF( hasDefaultStrokeOpacity ? defaultStrokeOpacity : newOpacity );
3027 mChangeStrokeColorButton->setColor( stroke );
3029 mChangeStrokeColorButton->setEnabled( hasStrokeParam );
3030 mChangeStrokeColorButton->setAllowOpacity( hasStrokeOpacityParam );
3031 if ( hasDefaultStrokeWidth && resetValues )
3033 mStrokeWidthSpinBox->setValue( defaultStrokeWidth );
3035 mStrokeWidthSpinBox->setEnabled( hasStrokeWidthParam );
3038void QgsSVGFillSymbolLayerWidget::mChangeColorButton_colorChanged(
const QColor &color )
3049void QgsSVGFillSymbolLayerWidget::mChangeStrokeColorButton_colorChanged(
const QColor &color )
3060void QgsSVGFillSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged(
double d )
3069void QgsSVGFillSymbolLayerWidget::mTextureWidthUnitWidget_changed()
3079void QgsSVGFillSymbolLayerWidget::mSvgStrokeWidthUnitWidget_changed()
3095 connect( mAngleSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsLinePatternFillSymbolLayerWidget::mAngleSpinBox_valueChanged );
3096 connect( mDistanceSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsLinePatternFillSymbolLayerWidget::mDistanceSpinBox_valueChanged );
3097 connect( mOffsetSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsLinePatternFillSymbolLayerWidget::mOffsetSpinBox_valueChanged );
3104 mOffsetSpinBox->setClearValue( 0 );
3105 mAngleSpinBox->setClearValue( 0 );
3109 connect( mCoordinateReferenceComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
3121 connect( mClipModeComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
3134 if ( layer->
layerType() != QLatin1String(
"LinePatternFill" ) )
3148 mDistanceUnitWidget->blockSignals(
true );
3151 mDistanceUnitWidget->blockSignals(
false );
3152 mOffsetUnitWidget->blockSignals(
true );
3155 mOffsetUnitWidget->blockSignals(
false );
3173void QgsLinePatternFillSymbolLayerWidget::mAngleSpinBox_valueChanged(
double d )
3182void QgsLinePatternFillSymbolLayerWidget::mDistanceSpinBox_valueChanged(
double d )
3191void QgsLinePatternFillSymbolLayerWidget::mOffsetSpinBox_valueChanged(
double d )
3200void QgsLinePatternFillSymbolLayerWidget::mDistanceUnitWidget_changed()
3210void QgsLinePatternFillSymbolLayerWidget::mOffsetUnitWidget_changed()
3226 connect( mHorizontalDistanceSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceSpinBox_valueChanged );
3227 connect( mVerticalDistanceSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceSpinBox_valueChanged );
3228 connect( mHorizontalDisplacementSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementSpinBox_valueChanged );
3229 connect( mVerticalDisplacementSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementSpinBox_valueChanged );
3230 connect( mHorizontalOffsetSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetSpinBox_valueChanged );
3231 connect( mVerticalOffsetSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetSpinBox_valueChanged );
3232 connect( mHorizontalDistanceUnitWidget, &
QgsUnitSelectionWidget::changed,
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceUnitWidget_changed );
3233 connect( mVerticalDistanceUnitWidget, &
QgsUnitSelectionWidget::changed,
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceUnitWidget_changed );
3234 connect( mHorizontalDisplacementUnitWidget, &
QgsUnitSelectionWidget::changed,
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementUnitWidget_changed );
3235 connect( mVerticalDisplacementUnitWidget, &
QgsUnitSelectionWidget::changed,
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementUnitWidget_changed );
3236 connect( mHorizontalOffsetUnitWidget, &
QgsUnitSelectionWidget::changed,
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetUnitWidget_changed );
3237 connect( mVerticalOffsetUnitWidget, &
QgsUnitSelectionWidget::changed,
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetUnitWidget_changed );
3255 connect( mClipModeComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
3266 connect( mCoordinateReferenceComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
3275 mSeedSpinBox->setShowClearButton(
true );
3276 mSeedSpinBox->setClearValue( 0 );
3277 mRandomXSpinBox->setClearValue( 0 );
3278 mRandomYSpinBox->setClearValue( 0 );
3284 connect( mRandomXSpinBox, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double d )
3292 connect( mRandomYSpinBox, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double d )
3318 connect( mSeedSpinBox, qOverload< int > ( &QSpinBox::valueChanged ),
this, [ = ](
int v )
3327 mAngleSpinBox->setShowClearButton(
true );
3328 mAngleSpinBox->setClearValue( 0 );
3329 connect( mAngleSpinBox, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double d )
3341 if ( !layer || layer->
layerType() != QLatin1String(
"PointPatternFill" ) )
3355 mHorizontalDistanceUnitWidget->blockSignals(
true );
3358 mHorizontalDistanceUnitWidget->blockSignals(
false );
3359 mVerticalDistanceUnitWidget->blockSignals(
true );
3362 mVerticalDistanceUnitWidget->blockSignals(
false );
3363 mHorizontalDisplacementUnitWidget->blockSignals(
true );
3366 mHorizontalDisplacementUnitWidget->blockSignals(
false );
3367 mVerticalDisplacementUnitWidget->blockSignals(
true );
3370 mVerticalDisplacementUnitWidget->blockSignals(
false );
3371 mHorizontalOffsetUnitWidget->blockSignals(
true );
3374 mHorizontalOffsetUnitWidget->blockSignals(
false );
3375 mVerticalOffsetUnitWidget->blockSignals(
true );
3378 mVerticalOffsetUnitWidget->blockSignals(
false );
3410void QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceSpinBox_valueChanged(
double d )
3419void QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceSpinBox_valueChanged(
double d )
3428void QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementSpinBox_valueChanged(
double d )
3437void QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementSpinBox_valueChanged(
double d )
3446void QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetSpinBox_valueChanged(
double d )
3455void QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetSpinBox_valueChanged(
double d )
3464void QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceUnitWidget_changed()
3474void QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceUnitWidget_changed()
3484void QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementUnitWidget_changed()
3494void QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementUnitWidget_changed()
3504void QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetUnitWidget_changed()
3514void QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetUnitWidget_changed()
3535 connect( mStrokeWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsFontMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
3536 connect( mHorizontalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsFontMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
3537 connect( mVerticalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsFontMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
3547 scrollArea->setVerticalOnly(
true );
3549 btnColor->setAllowOpacity(
true );
3550 btnColor->setColorDialogTitle( tr(
"Select Symbol Fill Color" ) );
3551 btnColor->setContext( QStringLiteral(
"symbology" ) );
3552 btnStrokeColor->setAllowOpacity(
true );
3553 btnStrokeColor->setColorDialogTitle( tr(
"Select Symbol Stroke Color" ) );
3554 btnStrokeColor->setContext( QStringLiteral(
"symbology" ) );
3556 mColorDDBtn->registerLinkedWidget( btnColor );
3557 mStrokeColorDDBtn->registerLinkedWidget( btnStrokeColor );
3559 spinOffsetX->setClearValue( 0.0 );
3560 spinOffsetY->setClearValue( 0.0 );
3561 spinAngle->setClearValue( 0.0 );
3567 mSizeDDBtn->setSymbol( mAssistantPreviewSymbol );
3570 connect( mFontStyleComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsFontMarkerSymbolLayerWidget::mFontStyleComboBox_currentIndexChanged );
3572 connect( cboJoinStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsFontMarkerSymbolLayerWidget::penJoinStyleChanged );
3575 connect( cboJoinStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsFontMarkerSymbolLayerWidget::penJoinStyleChanged );
3577 connect( spinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsFontMarkerSymbolLayerWidget::setOffset );
3578 connect( spinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsFontMarkerSymbolLayerWidget::setOffset );
3589 if ( layer->
layerType() != QLatin1String(
"FontMarker" ) )
3598 mFontStyleComboBox->blockSignals(
true );
3599 populateFontStyleComboBox();
3600 mFontStyleComboBox->blockSignals(
false );
3618 mCharPreview->
setFont( mRefFont );
3624 mSizeUnitWidget->blockSignals(
true );
3627 mSizeUnitWidget->blockSignals(
false );
3629 mStrokeWidthUnitWidget->blockSignals(
true );
3632 mStrokeWidthUnitWidget->blockSignals(
false );
3634 mOffsetUnitWidget->blockSignals(
true );
3637 mOffsetUnitWidget->blockSignals(
false );
3658 updateAssistantSymbol();
3673 mCharPreview->setFont( mRefFont );
3674 populateFontStyleComboBox();
3679void QgsFontMarkerSymbolLayerWidget::setFontStyle(
const QString &style )
3686 mCharPreview->setFont( mRefFont );
3718 mCharPreview->setText( text );
3720 if ( text.isEmpty() )
3724 QString character = text;
3725 if ( text.contains( QRegularExpression( QStringLiteral(
"^0x[0-9a-fA-F]{1,4}$" ) ) ) )
3728 const unsigned int value = text.toUInt( &ok, 0 );
3731 character = QChar( value );
3732 mCharPreview->setText( character );
3753 if (
mLayer->
character().length() > 1 || QGuiApplication::keyboardModifiers() & Qt::ControlModifier )
3755 mCharLineEdit->insert( chr );
3761 mCharPreview->setText( chr );
3765void QgsFontMarkerSymbolLayerWidget::setOffset()
3767 mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
3771void QgsFontMarkerSymbolLayerWidget::penJoinStyleChanged()
3777void QgsFontMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
3787void QgsFontMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
3797void QgsFontMarkerSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
3807void QgsFontMarkerSymbolLayerWidget::populateFontStyleComboBox()
3809 mFontStyleComboBox->clear();
3810 const QStringList styles = mFontDB.styles( mRefFont.family() );
3811 const auto constStyles = styles;
3812 for (
const QString &style : constStyles )
3814 mFontStyleComboBox->addItem( style );
3817 QString targetStyle = mFontDB.styleString( mRefFont );
3818 if ( !styles.contains( targetStyle ) )
3821 targetStyle = QFontInfo( f ).styleName();
3822 mRefFont.setStyleName( targetStyle );
3825 const int stylIndx = mFontStyleComboBox->findText( targetStyle );
3826 if ( stylIndx > -1 )
3831 mFontStyleComboBox->setCurrentIndex( curIndx );
3834void QgsFontMarkerSymbolLayerWidget::mFontStyleComboBox_currentIndexChanged(
int index )
3837 setFontStyle( mFontStyleComboBox->currentText() );
3840void QgsFontMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged(
int index )
3849void QgsFontMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged(
int index )
3858void QgsFontMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged(
double d )
3867void QgsFontMarkerSymbolLayerWidget::updateAssistantSymbol()
3869 for (
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1 ; i >= 0; --i )
3871 mAssistantPreviewSymbol->deleteSymbolLayer( i );
3873 mAssistantPreviewSymbol->appendSymbolLayer(
mLayer->
clone() );
3876 mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
3888 connect( mDrawInsideCheckBox, &QCheckBox::stateChanged,
this, &QgsCentroidFillSymbolLayerWidget::mDrawInsideCheckBox_stateChanged );
3889 connect( mDrawAllPartsCheckBox, &QCheckBox::stateChanged,
this, &QgsCentroidFillSymbolLayerWidget::mDrawAllPartsCheckBox_stateChanged );
3890 connect( mClipPointsCheckBox, &QCheckBox::stateChanged,
this, &QgsCentroidFillSymbolLayerWidget::mClipPointsCheckBox_stateChanged );
3891 connect( mClipOnCurrentPartOnlyCheckBox, &QCheckBox::stateChanged,
this, &QgsCentroidFillSymbolLayerWidget::mClipOnCurrentPartOnlyCheckBox_stateChanged );
3896 if ( layer->
layerType() != QLatin1String(
"CentroidFill" ) )
3914void QgsCentroidFillSymbolLayerWidget::mDrawInsideCheckBox_stateChanged(
int state )
3920void QgsCentroidFillSymbolLayerWidget::mDrawAllPartsCheckBox_stateChanged(
int state )
3926void QgsCentroidFillSymbolLayerWidget::mClipPointsCheckBox_stateChanged(
int state )
3932void QgsCentroidFillSymbolLayerWidget::mClipOnCurrentPartOnlyCheckBox_stateChanged(
int state )
3947 mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral(
"/UI/lastRasterMarkerImageDir" ) );
3951 connect( mRotationSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::setAngle );
3953 connect( mWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::setWidth );
3954 connect( mHeightSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::setHeight );
3962 mSpinOffsetX->setClearValue( 0.0 );
3963 mSpinOffsetY->setClearValue( 0.0 );
3964 mRotationSpinBox->setClearValue( 0.0 );
3966 connect( mSpinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::setOffset );
3967 connect( mSpinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::setOffset );
3970 connect( mHorizontalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
3971 connect( mVerticalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsRasterMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
3981 if ( layer->
layerType() != QLatin1String(
"RasterMarker" ) )
3992 mHeightSpinBox->blockSignals(
true );
3993 if ( preservedAspectRatio )
4002 mHeightSpinBox->blockSignals(
false );
4003 whileBlocking( mLockAspectRatio )->setLocked( preservedAspectRatio );
4011 mSizeUnitWidget->blockSignals(
true );
4014 mSizeUnitWidget->blockSignals(
false );
4015 mOffsetUnitWidget->blockSignals(
true );
4018 mOffsetUnitWidget->blockSignals(
false );
4033 updatePreviewImage();
4047void QgsRasterMarkerSymbolLayerWidget::imageSourceChanged(
const QString &text )
4050 updatePreviewImage();
4054void QgsRasterMarkerSymbolLayerWidget::updatePreviewImage()
4056 bool fitsInCache =
false;
4058 if ( image.isNull() )
4060 mLabelImagePreview->setPixmap( QPixmap() );
4064 QImage previewImage( 150, 150, QImage::Format_ARGB32 );
4065 previewImage.fill( Qt::transparent );
4066 const QRect imageRect( ( 150 - image.width() ) / 2.0, ( 150 - image.height() ) / 2.0, image.width(), image.height() );
4068 p.begin( &previewImage );
4070 uchar pixDataRGB[] = { 150, 150, 150, 150,
4075 const QImage img( pixDataRGB, 2, 2, 8, QImage::Format_ARGB32 );
4076 const QPixmap pix = QPixmap::fromImage( img.scaled( 8, 8 ) );
4077 QBrush checkerBrush;
4078 checkerBrush.setTexture( pix );
4079 p.fillRect( imageRect, checkerBrush );
4086 p.drawImage( imageRect.left(), imageRect.top(), image );
4088 mLabelImagePreview->setPixmap( QPixmap::fromImage( previewImage ) );
4091void QgsRasterMarkerSymbolLayerWidget::setWidth()
4094 double fixedAspectRatio = 0.0;
4095 mHeightSpinBox->blockSignals(
true );
4096 if ( defaultAspectRatio <= 0.0 )
4098 mHeightSpinBox->setValue( mWidthSpinBox->value() );
4100 else if ( mLockAspectRatio->locked() )
4102 mHeightSpinBox->setValue( mWidthSpinBox->value() * defaultAspectRatio );
4106 fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
4108 mHeightSpinBox->blockSignals(
false );
4114void QgsRasterMarkerSymbolLayerWidget::setHeight()
4117 double fixedAspectRatio = 0.0;
4118 mWidthSpinBox->blockSignals(
true );
4119 if ( defaultAspectRatio <= 0.0 )
4121 mWidthSpinBox->setValue( mHeightSpinBox->value() );
4123 else if ( mLockAspectRatio->locked() )
4125 mWidthSpinBox->setValue( mHeightSpinBox->value() / defaultAspectRatio );
4129 fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
4131 mWidthSpinBox->blockSignals(
false );
4137void QgsRasterMarkerSymbolLayerWidget::setLockAspectRatio(
const bool locked )
4140 if ( defaultAspectRatio <= 0.0 )
4155void QgsRasterMarkerSymbolLayerWidget::setAngle()
4161void QgsRasterMarkerSymbolLayerWidget::setOpacity(
double value )
4165 updatePreviewImage();
4168void QgsRasterMarkerSymbolLayerWidget::setOffset()
4170 mLayer->
setOffset( QPointF( mSpinOffsetX->value(), mSpinOffsetY->value() ) );
4174void QgsRasterMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
4184void QgsRasterMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
4194void QgsRasterMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged(
int index )
4203void QgsRasterMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged(
int index )
4222 mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral(
"/UI/lastAnimatedMarkerImageDir" ) );
4226 connect( mRotationSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::setAngle );
4228 connect( mWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::setWidth );
4229 connect( mHeightSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::setHeight );
4232 mFrameRateSpin->setClearValue( 10 );
4233 mFrameRateSpin->setShowClearButton(
true );
4234 connect( mFrameRateSpin, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double value )
4245 mSpinOffsetX->setClearValue( 0.0 );
4246 mSpinOffsetY->setClearValue( 0.0 );
4247 mRotationSpinBox->setClearValue( 0.0 );
4249 connect( mSpinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::setOffset );
4250 connect( mSpinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::setOffset );
4253 connect( mHorizontalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
4254 connect( mVerticalAnchorComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsAnimatedMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
4264 if ( layer->
layerType() != QLatin1String(
"AnimatedMarker" ) )
4274 if ( firstFrameTime > 0 )
4276 mFrameRateSpin->setClearValue( 1000 / firstFrameTime );
4280 mFrameRateSpin->setClearValue( 10 );
4285 mHeightSpinBox->blockSignals(
true );
4286 if ( preservedAspectRatio )
4295 mHeightSpinBox->blockSignals(
false );
4296 whileBlocking( mLockAspectRatio )->setLocked( preservedAspectRatio );
4306 mSizeUnitWidget->blockSignals(
true );
4309 mSizeUnitWidget->blockSignals(
false );
4310 mOffsetUnitWidget->blockSignals(
true );
4313 mOffsetUnitWidget->blockSignals(
false );
4328 updatePreviewImage();
4342void QgsAnimatedMarkerSymbolLayerWidget::imageSourceChanged(
const QString &text )
4347 if ( firstFrameTime > 0 )
4349 mFrameRateSpin->setClearValue( 1000 / firstFrameTime );
4353 mFrameRateSpin->setClearValue( 10 );
4355 updatePreviewImage();
4359void QgsAnimatedMarkerSymbolLayerWidget::updatePreviewImage()
4361 if ( mPreviewMovie )
4363 mLabelImagePreview->setMovie(
nullptr );
4364 mPreviewMovie->deleteLater();
4365 mPreviewMovie =
nullptr;
4368 mPreviewMovie =
new QMovie(
mLayer->
path(), QByteArray(),
this );
4369 mPreviewMovie->setScaledSize( QSize( 150, 150 ) );
4370 mLabelImagePreview->setMovie( mPreviewMovie );
4371 mPreviewMovie->start();
4374void QgsAnimatedMarkerSymbolLayerWidget::setWidth()
4377 double fixedAspectRatio = 0.0;
4378 mHeightSpinBox->blockSignals(
true );
4379 if ( defaultAspectRatio <= 0.0 )
4381 mHeightSpinBox->setValue( mWidthSpinBox->value() );
4383 else if ( mLockAspectRatio->locked() )
4385 mHeightSpinBox->setValue( mWidthSpinBox->value() * defaultAspectRatio );
4389 fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
4391 mHeightSpinBox->blockSignals(
false );
4397void QgsAnimatedMarkerSymbolLayerWidget::setHeight()
4400 double fixedAspectRatio = 0.0;
4401 mWidthSpinBox->blockSignals(
true );
4402 if ( defaultAspectRatio <= 0.0 )
4404 mWidthSpinBox->setValue( mHeightSpinBox->value() );
4406 else if ( mLockAspectRatio->locked() )
4408 mWidthSpinBox->setValue( mHeightSpinBox->value() / defaultAspectRatio );
4412 fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
4414 mWidthSpinBox->blockSignals(
false );
4420void QgsAnimatedMarkerSymbolLayerWidget::setLockAspectRatio(
const bool locked )
4423 if ( defaultAspectRatio <= 0.0 )
4438void QgsAnimatedMarkerSymbolLayerWidget::setAngle()
4444void QgsAnimatedMarkerSymbolLayerWidget::setOpacity(
double value )
4448 updatePreviewImage();
4451void QgsAnimatedMarkerSymbolLayerWidget::setOffset()
4453 mLayer->
setOffset( QPointF( mSpinOffsetX->value(), mSpinOffsetY->value() ) );
4457void QgsAnimatedMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
4467void QgsAnimatedMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
4477void QgsAnimatedMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged(
int index )
4486void QgsAnimatedMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged(
int index )
4503 mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral(
"/UI/lastRasterMarkerImageDir" ) );
4507 connect( mRotationSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterFillSymbolLayerWidget::mRotationSpinBox_valueChanged );
4520 connect( mWidthSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double d )
4530 connect( mHeightSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double d )
4545 mSpinOffsetX->setClearValue( 0.0 );
4546 mSpinOffsetY->setClearValue( 0.0 );
4547 mRotationSpinBox->setClearValue( 0.0 );
4549 connect( cboCoordinateMode,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsRasterFillSymbolLayerWidget::setCoordinateMode );
4550 connect( mSpinOffsetX,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterFillSymbolLayerWidget::offsetChanged );
4551 connect( mSpinOffsetY,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRasterFillSymbolLayerWidget::offsetChanged );
4563 if ( layer->
layerType() != QLatin1String(
"RasterFill" ) )
4576 cboCoordinateMode->blockSignals(
true );
4580 cboCoordinateMode->setCurrentIndex( 1 );
4584 cboCoordinateMode->setCurrentIndex( 0 );
4587 cboCoordinateMode->blockSignals(
false );
4593 mOffsetUnitWidget->blockSignals(
true );
4596 mOffsetUnitWidget->blockSignals(
false );
4599 mSizeUnitWidget->blockSignals(
true );
4602 mSizeUnitWidget->blockSignals(
false );
4606 updatePreviewImage();
4621void QgsRasterFillSymbolLayerWidget::imageSourceChanged(
const QString &text )
4624 updatePreviewImage();
4628void QgsRasterFillSymbolLayerWidget::setCoordinateMode(
int index )
4645void QgsRasterFillSymbolLayerWidget::opacityChanged(
double value )
4654 updatePreviewImage();
4657void QgsRasterFillSymbolLayerWidget::offsetChanged()
4659 mLayer->
setOffset( QPointF( mSpinOffsetX->value(), mSpinOffsetY->value() ) );
4663void QgsRasterFillSymbolLayerWidget::mOffsetUnitWidget_changed()
4674void QgsRasterFillSymbolLayerWidget::mRotationSpinBox_valueChanged(
double d )
4683void QgsRasterFillSymbolLayerWidget::updatePreviewImage()
4685 bool fitsInCache =
false;
4687 if ( image.isNull() )
4689 mLabelImagePreview->setPixmap( QPixmap() );
4693 QImage previewImage( 150, 150, QImage::Format_ARGB32 );
4694 previewImage.fill( Qt::transparent );
4695 const QRect imageRect( ( 150 - image.width() ) / 2.0, ( 150 - image.height() ) / 2.0, image.width(), image.height() );
4697 p.begin( &previewImage );
4699 uchar pixDataRGB[] = { 150, 150, 150, 150,
4704 const QImage img( pixDataRGB, 2, 2, 8, QImage::Format_ARGB32 );
4705 const QPixmap pix = QPixmap::fromImage( img.scaled( 8, 8 ) );
4706 QBrush checkerBrush;
4707 checkerBrush.setTexture( pix );
4708 p.fillRect( imageRect, checkerBrush );
4715 p.drawImage( imageRect.left(), imageRect.top(), image );
4717 mLabelImagePreview->setPixmap( QPixmap::fromImage( previewImage ) );
4731 mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral(
"/UI/lastRasterMarkerImageDir" ) );
4748 connect( spinWidth, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ]
4768 spinOffset->setClearValue( 0.0 );
4769 connect( spinOffset, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double val )
4778 connect( cboCapStyle, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
4786 connect( cboJoinStyle, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
4801 updatePreviewImage();
4814 if ( layer->
layerType() != QLatin1String(
"RasterLine" ) )
4838 updatePreviewImage();
4853void QgsRasterLineSymbolLayerWidget::imageSourceChanged(
const QString &text )
4856 updatePreviewImage();
4860void QgsRasterLineSymbolLayerWidget::updatePreviewImage()
4862 bool fitsInCache =
false;
4864 if ( image.isNull() )
4866 mLabelImagePreview->setPixmap( QPixmap() );
4870 QImage previewImage( 150, 150, QImage::Format_ARGB32 );
4871 previewImage.fill( Qt::transparent );
4872 const QRect imageRect( ( 150 - image.width() ) / 2.0, ( 150 - image.height() ) / 2.0, image.width(), image.height() );
4874 p.begin( &previewImage );
4876 uchar pixDataRGB[] = { 150, 150, 150, 150,
4881 const QImage img( pixDataRGB, 2, 2, 8, QImage::Format_ARGB32 );
4882 const QPixmap pix = QPixmap::fromImage( img.scaled( 8, 8 ) );
4883 QBrush checkerBrush;
4884 checkerBrush.setTexture( pix );
4885 p.fillRect( imageRect, checkerBrush );
4892 p.drawImage( imageRect.left(), imageRect.top(), image );
4894 mLabelImagePreview->setPixmap( QPixmap::fromImage( previewImage ) );
4908 modificationExpressionSelector->setMultiLine(
true );
4909 modificationExpressionSelector->setLayer(
const_cast<QgsVectorLayer *
>( vl ) );
4910 modificationExpressionSelector->registerExpressionContextGenerator(
this );
4921 mUnitWidget->setShowMapScaleButton(
false );
4924 connect( cbxGeometryType,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsGeometryGeneratorSymbolLayerWidget::updateSymbolType );
4927 if ( !mBlockSignals )
4929 mLayer->
setUnits( mUnitWidget->unit() );
4940 cbxGeometryType->setCurrentIndex( cbxGeometryType->findData(
static_cast< int >( mLayer->
symbolType() ) ) );
4941 mUnitWidget->setUnit( mLayer->
units() );
4950void QgsGeometryGeneratorSymbolLayerWidget::updateExpression(
const QString &
string )
4957void QgsGeometryGeneratorSymbolLayerWidget::updateSymbolType()
4960 std::unique_ptr< QgsSymbol > subSymbol( mLayer->
subSymbol()->
clone() );
4975 for (
int i = 0; i < subSymbol->symbolLayerCount(); ++i )
4978 layers << subSymbol->symbolLayer( i )->clone();
4981 if ( !layers.empty() )
4991 for (
int i = 0; i < subSymbol->symbolLayerCount(); ++i )
4992 layers << subSymbol->symbolLayer( i )->clone();
5014 mPointCountSpinBox->setShowClearButton(
true );
5015 mPointCountSpinBox->setClearValue( 100 );
5016 mSeedSpinBox->setShowClearButton(
true );
5017 mSeedSpinBox->setClearValue( 0 );
5019 connect( mCountMethodComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, &QgsRandomMarkerFillSymbolLayerWidget::countMethodChanged );
5020 connect( mPointCountSpinBox,
static_cast < void ( QSpinBox::* )(
int )
> ( &QSpinBox::valueChanged ),
this, &QgsRandomMarkerFillSymbolLayerWidget::countChanged );
5021 connect( mDensityAreaSpinBox,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, &QgsRandomMarkerFillSymbolLayerWidget::densityAreaChanged );
5022 connect( mSeedSpinBox,
static_cast < void ( QSpinBox::* )(
int )
> ( &QSpinBox::valueChanged ),
this, &QgsRandomMarkerFillSymbolLayerWidget::seedChanged );
5023 connect( mClipPointsCheckBox, &QCheckBox::toggled,
this, [ = ](
bool checked )
5040 if ( !layer || layer->
layerType() != QLatin1String(
"RandomMarkerFill" ) )
5050 bool showDensityBasedCountWidgets =
false;
5054 showDensityBasedCountWidgets =
true;
5059 mDensityAreaLabel->setVisible( showDensityBasedCountWidgets );
5060 mDensityAreaSpinBox->setVisible( showDensityBasedCountWidgets );
5061 mDensityAreaUnitWidget->setVisible( showDensityBasedCountWidgets );
5062 mDensityAreaDdbtn->setVisible( showDensityBasedCountWidgets );
5064 whileBlocking( mCountMethodComboBox )->setCurrentIndex( mCountMethodComboBox->findData(
static_cast< int >( mLayer->
countMethod() ) ) );
5066 mDensityAreaUnitWidget->blockSignals(
true );
5069 mDensityAreaUnitWidget->blockSignals(
false );
5082void QgsRandomMarkerFillSymbolLayerWidget::countMethodChanged(
int )
5085 bool showDensityBasedCountWidgets =
false;
5089 showDensityBasedCountWidgets =
true;
5094 mDensityAreaLabel->setVisible( showDensityBasedCountWidgets );
5095 mDensityAreaSpinBox->setVisible( showDensityBasedCountWidgets );
5096 mDensityAreaUnitWidget->setVisible( showDensityBasedCountWidgets );
5097 mDensityAreaDdbtn->setVisible( showDensityBasedCountWidgets );
5106void QgsRandomMarkerFillSymbolLayerWidget::countChanged(
int d )
5115void QgsRandomMarkerFillSymbolLayerWidget::densityAreaChanged(
double d )
5124void QgsRandomMarkerFillSymbolLayerWidget::densityAreaUnitChanged()
5134void QgsRandomMarkerFillSymbolLayerWidget::seedChanged(
int d )
5153 btnColorRamp->setShowGradientOnly(
true );
5155 btnChangeColor->setAllowOpacity(
true );
5156 btnChangeColor->setColorDialogTitle( tr(
"Select Gradient Color" ) );
5157 btnChangeColor->setContext( QStringLiteral(
"symbology" ) );
5158 btnChangeColor->setShowNoColor(
true );
5159 btnChangeColor->setNoColorString( tr(
"Transparent" ) );
5160 btnChangeColor2->setAllowOpacity(
true );
5161 btnChangeColor2->setColorDialogTitle( tr(
"Select Gradient Color" ) );
5162 btnChangeColor2->setContext( QStringLiteral(
"symbology" ) );
5163 btnChangeColor2->setShowNoColor(
true );
5164 btnChangeColor2->setNoColorString( tr(
"Transparent" ) );
5166 mStartColorDDBtn->registerLinkedWidget( btnChangeColor );
5167 mEndColorDDBtn->registerLinkedWidget( btnChangeColor2 );
5187 if ( btnColorRamp->isNull() )
5197 connect( radioTwoColor, &QAbstractButton::toggled,
this, [ = ]
5201 if ( radioTwoColor->isChecked() )
5203 mLayer->setGradientColorType( Qgis::GradientColorSource::SimpleTwoColor );
5204 btnChangeColor->setEnabled( true );
5205 btnChangeColor2->setEnabled( true );
5206 btnColorRamp->setEnabled( false );
5210 mLayer->setGradientColorType( Qgis::GradientColorSource::ColorRamp );
5211 btnColorRamp->setEnabled( true );
5212 btnChangeColor->setEnabled( false );
5213 btnChangeColor2->setEnabled( false );
5234 connect( spinWidth,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, [ = ]
5253 spinOffset->setClearValue( 0.0 );
5254 connect( spinOffset, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double val )
5263 connect( cboCapStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, [ = ]
5271 connect( cboJoinStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, [ = ]
5288 if ( layer->
layerType() != QLatin1String(
"Lineburst" ) )
5299 btnChangeColor->blockSignals(
true );
5301 btnChangeColor->blockSignals(
false );
5302 btnChangeColor2->blockSignals(
true );
5304 btnChangeColor2->blockSignals(
false );
5308 radioTwoColor->setChecked(
true );
5309 btnColorRamp->setEnabled(
false );
5313 radioColorRamp->setChecked(
true );
5314 btnChangeColor->setEnabled(
false );
5315 btnChangeColor2->setEnabled(
false );
5321 btnColorRamp->blockSignals(
true );
5323 btnColorRamp->blockSignals(
false );
5375 connect( spinWidth,
static_cast < void ( QDoubleSpinBox::* )(
double )
> ( &QDoubleSpinBox::valueChanged ),
this, [ = ]
5379 mLayer->
setWidth( spinWidth->value() );
5394 spinOffset->setClearValue( 0.0 );
5395 connect( spinOffset, qOverload< double >( &QDoubleSpinBox::valueChanged ),
this, [ = ](
double val )
5404 connect( cboCapStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, [ = ]
5412 connect( cboJoinStyle,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
this, [ = ]
5431 if ( layer->
layerType() != QLatin1String(
"FilledLine" ) )
5484 mSpinSkipMultiples->setClearValue( 0, tr(
"Not set" ) );
5485 mSpinLabelOffsetX->setClearValue( 0 );
5486 mSpinLabelOffsetY->setClearValue( 0 );
5487 mSpinAverageAngleLength->setClearValue( 4.0 );
5493 connect( mComboQuantity, qOverload< int >( &QComboBox::currentIndexChanged ),
this, [ = ]
5495 if ( mLayer && !mBlockChangesSignal )
5503 if ( mLayer && !mBlockChangesSignal )
5509 connect( spinInterval, qOverload< double >( &QgsDoubleSpinBox::valueChanged ),
this, [ = ]
5511 if ( mLayer && !mBlockChangesSignal )
5517 connect( mSpinSkipMultiples, qOverload< double >( &QgsDoubleSpinBox::valueChanged ),
this, [ = ]
5519 if ( mLayer && !mBlockChangesSignal )
5525 connect( mCheckRotate, &QCheckBox::toggled,
this, [ = ](
bool checked )
5527 if ( mLayer && !mBlockChangesSignal )
5532 mSpinAverageAngleLength->setEnabled( checked );
5533 mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
5535 connect( mCheckShowMarker, &QCheckBox::toggled,
this, [ = ](
bool checked )
5537 if ( mLayer && !mBlockChangesSignal )
5544 connect( mSpinLabelOffsetX, qOverload< double >( &QgsDoubleSpinBox::valueChanged ),
this, [ = ]
5546 if ( mLayer && !mBlockChangesSignal )
5548 mLayer->
setLabelOffset( QPointF( mSpinLabelOffsetX->value(), mSpinLabelOffsetY->value() ) );
5552 connect( mSpinLabelOffsetY, qOverload< double >( &QgsDoubleSpinBox::valueChanged ),
this, [ = ]
5554 if ( mLayer && !mBlockChangesSignal )
5556 mLayer->
setLabelOffset( QPointF( mSpinLabelOffsetX->value(), mSpinLabelOffsetY->value() ) );
5562 if ( mLayer && !mBlockChangesSignal )
5570 connect( mComboPlacement, qOverload< int>( &QComboBox::currentIndexChanged ),
this, [ = ]
5572 if ( mLayer && !mBlockChangesSignal )
5576 switch ( placement )
5581 mIntervalWidget->show();
5584 mIntervalWidget->hide();
5591 connect( mSpinAverageAngleLength, qOverload< double >( &QgsDoubleSpinBox::valueChanged ),
this, [ = ]
5593 if ( mLayer && !mBlockChangesSignal )
5601 if ( mLayer && !mBlockChangesSignal )
5609 connect( mNumberFormatPushButton, &QPushButton::clicked,
this, &QgsLinearReferencingSymbolLayerWidget::changeNumberFormat );
5611 mTextFormatButton->registerExpressionContextGenerator(
this );
5619 if ( !layer || layer->
layerType() != QLatin1String(
"LinearReferencing" ) )
5623 mLayer = qgis::down_cast<QgsLinearReferencingSymbolLayer *>( layer );
5625 mBlockChangesSignal =
true;
5627 mComboPlacement->setCurrentIndex( mComboPlacement->findData( QVariant::fromValue( mLayer->
placement() ) ) );
5633 mIntervalWidget->show();
5636 mIntervalWidget->hide();
5640 mComboQuantity->setCurrentIndex( mComboQuantity->findData( QVariant::fromValue( mLayer->
labelSource() ) ) );
5642 mTextFormatButton->setTextFormat( mLayer->
textFormat() );
5643 spinInterval->setValue( mLayer->
interval() );
5646 mCheckShowMarker->setChecked( mLayer->
showMarker() );
5647 mSpinLabelOffsetX->setValue( mLayer->
labelOffset().x() );
5648 mSpinLabelOffsetY->setValue( mLayer->
labelOffset().y() );
5656 mSpinAverageAngleLength->setEnabled( mCheckRotate->isChecked() );
5657 mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
5664 mBlockChangesSignal =
false;
5679void QgsLinearReferencingSymbolLayerWidget::changeNumberFormat()
5690 if ( !mBlockChangesSignal )
5702 dialog.registerExpressionContextGenerator(
this );
5703 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.