18#include "moc_qgssymbollayerwidget.cpp" 
   49#include <QAbstractButton> 
   50#include <QButtonGroup> 
   51#include <QColorDialog> 
   56#include <QStandardItemModel> 
   57#include <QSvgRenderer> 
   61#include <QInputDialog> 
   63#include <QRegularExpression> 
   69    return *lExpressionContext;
 
   80  expContext << symbolScope;
 
  102  QStringList highlights;
 
  108             << QStringLiteral( 
"symbol_layer_count" ) << QStringLiteral( 
"symbol_layer_index" ) << QStringLiteral( 
"symbol_frame" );
 
  111  if ( expContext.
hasVariable( QStringLiteral( 
"zoom_level" ) ) )
 
  113    highlights << QStringLiteral( 
"zoom_level" );
 
  115  if ( expContext.
hasVariable( QStringLiteral( 
"vector_tile_zoom" ) ) )
 
  117    highlights << QStringLiteral( 
"vector_tile_zoom" );
 
 
  128  const auto unitSelectionWidgets = findChildren<QgsUnitSelectionWidget *>();
 
  131    unitWidget->setMapCanvas( mContext.
mapCanvas() );
 
 
  149void QgsSymbolLayerWidget::createAuxiliaryField()
 
  170    if ( dlg.exec() == QDialog::Accepted )
 
  171      def = dlg.propertyDefinition();
 
  181  property.setActive( 
true );
 
  203  connect( mCustomCheckBox, &QCheckBox::stateChanged, 
this, &QgsSimpleLineSymbolLayerWidget::mCustomCheckBox_stateChanged );
 
  204  connect( mChangePatternButton, &QPushButton::clicked, 
this, &QgsSimpleLineSymbolLayerWidget::mChangePatternButton_clicked );
 
  208  connect( mDrawInsideCheckBox, &QCheckBox::stateChanged, 
this, &QgsSimpleLineSymbolLayerWidget::mDrawInsideCheckBox_stateChanged );
 
  210  connect( mCheckAlignDash, &QCheckBox::toggled, 
this, [
this] {
 
  211    mCheckDashCorners->setEnabled( mCheckAlignDash->isChecked() );
 
  212    if ( !mCheckAlignDash->isChecked() )
 
  213      mCheckDashCorners->setChecked( 
false );
 
  221  connect( mCheckDashCorners, &QCheckBox::toggled, 
this, [
this] {
 
  236  btnChangeColor->setAllowOpacity( 
true );
 
  237  btnChangeColor->setColorDialogTitle( tr( 
"Select Line Color" ) );
 
  238  btnChangeColor->setContext( QStringLiteral( 
"symbology" ) );
 
  240  mColorDDBtn->registerLinkedWidget( btnChangeColor );
 
  245  connect( mRingFilterComboBox, qOverload<int>( &QComboBox::currentIndexChanged ), 
this, [
this]( 
int ) {
 
  253  spinOffset->setClearValue( 0.0 );
 
  254  spinPatternOffset->setClearValue( 0.0 );
 
  256  mTrimStartDistanceSpin->setClearValue( 0.0 );
 
  257  mTrimDistanceEndSpin->setClearValue( 0.0 );
 
  263    mPenWidthDDBtn->setSymbol( mAssistantPreviewSymbol );
 
  265  connect( spinWidth, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleLineSymbolLayerWidget::penWidthChanged );
 
  267  connect( cboPenStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleLineSymbolLayerWidget::penStyleChanged );
 
  268  connect( spinOffset, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleLineSymbolLayerWidget::offsetChanged );
 
  269  connect( cboCapStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleLineSymbolLayerWidget::penStyleChanged );
 
  270  connect( cboJoinStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleLineSymbolLayerWidget::penStyleChanged );
 
  271  connect( spinPatternOffset, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleLineSymbolLayerWidget::patternOffsetChanged );
 
  273  connect( mTrimStartDistanceSpin, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, [
this]( 
double value ) {
 
  288  connect( mTrimDistanceEndSpin, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, [
this]( 
double value ) {
 
 
  312void QgsSimpleLineSymbolLayerWidget::updateAssistantSymbol()
 
  314  for ( 
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1; i >= 0; --i )
 
  316    mAssistantPreviewSymbol->deleteSymbolLayer( i );
 
  318  mAssistantPreviewSymbol->appendSymbolLayer( 
mLayer->
clone() );
 
  321    mAssistantPreviewSymbol->setDataDefinedWidth( ddWidth );
 
  327  if ( !layer || layer->
layerType() != QLatin1String( 
"SimpleLine" ) )
 
  334  mPenWidthUnitWidget->blockSignals( 
true );
 
  337  mPenWidthUnitWidget->blockSignals( 
false );
 
  338  mOffsetUnitWidget->blockSignals( 
true );
 
  341  mOffsetUnitWidget->blockSignals( 
false );
 
  342  mDashPatternUnitWidget->blockSignals( 
true );
 
  345  mDashPatternUnitWidget->blockSignals( 
false );
 
  355  spinWidth->blockSignals( 
true );
 
  357  spinWidth->blockSignals( 
false );
 
  358  btnChangeColor->blockSignals( 
true );
 
  360  btnChangeColor->blockSignals( 
false );
 
  361  spinOffset->blockSignals( 
true );
 
  363  spinOffset->blockSignals( 
false );
 
  364  cboPenStyle->blockSignals( 
true );
 
  365  cboJoinStyle->blockSignals( 
true );
 
  366  cboCapStyle->blockSignals( 
true );
 
  370  cboPenStyle->blockSignals( 
false );
 
  371  cboJoinStyle->blockSignals( 
false );
 
  372  cboCapStyle->blockSignals( 
false );
 
  379  mChangePatternButton->setEnabled( useCustomDashPattern );
 
  380  label_3->setEnabled( !useCustomDashPattern );
 
  381  cboPenStyle->setEnabled( !useCustomDashPattern );
 
  382  mCustomCheckBox->blockSignals( 
true );
 
  383  mCustomCheckBox->setCheckState( useCustomDashPattern ? Qt::Checked : Qt::Unchecked );
 
  384  mCustomCheckBox->blockSignals( 
false );
 
  387  const QSize size = mChangePatternButton->minimumSizeHint();
 
  389  mChangePatternButton->setMinimumSize( QSize( size.width(), std::max( size.height(), fontHeight ) ) );
 
  393  whileBlocking( mDrawInsideCheckBox )->setCheckState( drawInsidePolygon ? Qt::Checked : Qt::Unchecked );
 
  414  updateAssistantSymbol();
 
 
  431      mDrawInsideCheckBox->hide();
 
  432      mRingFilterComboBox->hide();
 
 
  442void QgsSimpleLineSymbolLayerWidget::penWidthChanged()
 
  449void QgsSimpleLineSymbolLayerWidget::colorChanged( 
const QColor &color )
 
  455void QgsSimpleLineSymbolLayerWidget::penStyleChanged()
 
  464void QgsSimpleLineSymbolLayerWidget::offsetChanged()
 
  471void QgsSimpleLineSymbolLayerWidget::patternOffsetChanged()
 
  478void QgsSimpleLineSymbolLayerWidget::mCustomCheckBox_stateChanged( 
int state )
 
  480  const bool checked = ( state == Qt::Checked );
 
  481  mChangePatternButton->setEnabled( checked );
 
  482  label_3->setEnabled( !checked );
 
  483  cboPenStyle->setEnabled( !checked );
 
  489void QgsSimpleLineSymbolLayerWidget::mChangePatternButton_clicked()
 
  496    widget->
setUnit( mDashPatternUnitWidget->unit() );
 
  507  d.setUnit( mDashPatternUnitWidget->unit() );
 
  508  if ( d.exec() == QDialog::Accepted )
 
  516void QgsSimpleLineSymbolLayerWidget::mPenWidthUnitWidget_changed()
 
  527void QgsSimpleLineSymbolLayerWidget::mOffsetUnitWidget_changed()
 
  537void QgsSimpleLineSymbolLayerWidget::mDashPatternUnitWidget_changed()
 
  548void QgsSimpleLineSymbolLayerWidget::mDrawInsideCheckBox_stateChanged( 
int state )
 
  550  const bool checked = ( state == Qt::Checked );
 
  555void QgsSimpleLineSymbolLayerWidget::patternOffsetUnitChanged()
 
  572  std::unique_ptr<QgsSimpleLineSymbolLayer> layerCopy( 
mLayer->
clone() );
 
  577  const QColor color = qApp->palette().color( QPalette::WindowText );
 
  578  layerCopy->setColor( color );
 
  580  layerCopy->setOffset( 0 );
 
  581  layerCopy->setUseCustomDashPattern( 
true );
 
  583  QSize currentIconSize;
 
  586  currentIconSize = QSize( mChangePatternButton->width() - 10, mChangePatternButton->height() - 6 );
 
  588  currentIconSize = QSize( mChangePatternButton->width() - 10, mChangePatternButton->height() - 12 );
 
  591  if ( !currentIconSize.isValid() || currentIconSize.width() <= 0 || currentIconSize.height() <= 0 )
 
  597  const std::unique_ptr<QgsLineSymbol> previewSymbol = std::make_unique<QgsLineSymbol>( 
QgsSymbolLayerList() << layerCopy.release() );
 
  599  mChangePatternButton->setIconSize( currentIconSize );
 
  600  mChangePatternButton->setIcon( icon );
 
  604  const int width = 
static_cast<int>( 
Qgis::UI_SCALE_FACTOR * fontMetrics().horizontalAdvance( 
'X' ) * 23 );
 
  605  const int height = 
static_cast<int>( width / 1.61803398875 ); 
 
  609  QBuffer buffer( &data );
 
  610  pm.save( &buffer, 
"PNG", 100 );
 
  611  mChangePatternButton->setToolTip( QStringLiteral( 
"<img src='data:image/png;base64, %3' width=\"%4\">" ).arg( QString( data.toBase64() ) ).arg( width ) );
 
 
  616  QgsSymbolLayerWidget::resizeEvent( event );
 
 
  643  connect( mStrokeStyleComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::mStrokeStyleComboBox_currentIndexChanged );
 
  644  connect( mStrokeWidthSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
 
  645  connect( mHorizontalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
 
  646  connect( mVerticalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
 
  651  btnChangeColorFill->setAllowOpacity( 
true );
 
  652  btnChangeColorFill->setColorDialogTitle( tr( 
"Select Fill Color" ) );
 
  653  btnChangeColorFill->setContext( QStringLiteral( 
"symbology" ) );
 
  654  btnChangeColorFill->setShowNoColor( 
true );
 
  655  btnChangeColorFill->setNoColorString( tr( 
"Transparent Fill" ) );
 
  656  btnChangeColorStroke->setAllowOpacity( 
true );
 
  657  btnChangeColorStroke->setColorDialogTitle( tr( 
"Select Stroke Color" ) );
 
  658  btnChangeColorStroke->setContext( QStringLiteral( 
"symbology" ) );
 
  659  btnChangeColorStroke->setShowNoColor( 
true );
 
  660  btnChangeColorStroke->setNoColorString( tr( 
"Transparent Stroke" ) );
 
  662  mFillColorDDBtn->registerLinkedWidget( btnChangeColorFill );
 
  663  mStrokeColorDDBtn->registerLinkedWidget( btnChangeColorStroke );
 
  665  spinOffsetX->setClearValue( 0.0 );
 
  666  spinOffsetY->setClearValue( 0.0 );
 
  667  spinAngle->setClearValue( 0.0 );
 
  673    mSizeDDBtn->setSymbol( mAssistantPreviewSymbol );
 
  675  int size = lstNames->iconSize().width();
 
  677  size = std::max( 30, 
static_cast<int>( std::round( 
Qgis::UI_SCALE_FACTOR * fontMetrics().horizontalAdvance( 
'X' ) * 3 ) ) );
 
  679  lstNames->setGridSize( QSize( size * 1.2, size * 1.2 ) );
 
  680  lstNames->setIconSize( QSize( size, size ) );
 
  682  const double markerSize = size * 0.8;
 
  688    lyr->
setColor( QColor( 200, 200, 200 ) );
 
  691    QListWidgetItem *item = 
new QListWidgetItem( icon, QString(), lstNames );
 
  692    item->setData( Qt::UserRole, 
static_cast<int>( shape ) );
 
  697  lstNames->setMinimumHeight( lstNames->gridSize().height() * 3.1 );
 
  699  connect( lstNames, &QListWidget::currentRowChanged, 
this, &QgsSimpleMarkerSymbolLayerWidget::setShape );
 
  702  connect( cboJoinStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::penJoinStyleChanged );
 
  703  connect( cboCapStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::penCapStyleChanged );
 
  704  connect( spinSize, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::setSize );
 
  705  connect( spinAngle, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::setAngle );
 
  706  connect( spinOffsetX, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::setOffset );
 
  707  connect( spinOffsetY, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleMarkerSymbolLayerWidget::setOffset );
 
 
  715  if ( layer->
layerType() != QLatin1String( 
"SimpleMarker" ) )
 
  723  for ( 
int i = 0; i < lstNames->count(); ++i )
 
  725    if ( 
static_cast<Qgis::MarkerShape>( lstNames->item( i )->data( Qt::UserRole ).toInt() ) == shape )
 
  727      lstNames->setCurrentRow( i );
 
  731  btnChangeColorStroke->blockSignals( 
true );
 
  733  btnChangeColorStroke->blockSignals( 
false );
 
  734  btnChangeColorFill->blockSignals( 
true );
 
  737  btnChangeColorFill->blockSignals( 
false );
 
  738  spinSize->blockSignals( 
true );
 
  740  spinSize->blockSignals( 
false );
 
  741  spinAngle->blockSignals( 
true );
 
  743  spinAngle->blockSignals( 
false );
 
  744  mStrokeStyleComboBox->blockSignals( 
true );
 
  746  mStrokeStyleComboBox->blockSignals( 
false );
 
  747  mStrokeWidthSpinBox->blockSignals( 
true );
 
  749  mStrokeWidthSpinBox->blockSignals( 
false );
 
  750  cboJoinStyle->blockSignals( 
true );
 
  752  cboJoinStyle->blockSignals( 
false );
 
  753  cboCapStyle->blockSignals( 
true );
 
  755  cboCapStyle->blockSignals( 
false );
 
  758  spinOffsetX->blockSignals( 
true );
 
  760  spinOffsetX->blockSignals( 
false );
 
  761  spinOffsetY->blockSignals( 
true );
 
  763  spinOffsetY->blockSignals( 
false );
 
  765  mSizeUnitWidget->blockSignals( 
true );
 
  768  mSizeUnitWidget->blockSignals( 
false );
 
  769  mOffsetUnitWidget->blockSignals( 
true );
 
  772  mOffsetUnitWidget->blockSignals( 
false );
 
  773  mStrokeWidthUnitWidget->blockSignals( 
true );
 
  776  mStrokeWidthUnitWidget->blockSignals( 
false );
 
  779  mHorizontalAnchorComboBox->blockSignals( 
true );
 
  780  mVerticalAnchorComboBox->blockSignals( 
true );
 
  781  mHorizontalAnchorComboBox->setCurrentIndex( mHorizontalAnchorComboBox->findData( QVariant::fromValue( 
mLayer->
horizontalAnchorPoint() ) ) );
 
  782  mVerticalAnchorComboBox->setCurrentIndex( mVerticalAnchorComboBox->findData( QVariant::fromValue( 
mLayer->
verticalAnchorPoint() ) ) );
 
  783  mHorizontalAnchorComboBox->blockSignals( 
false );
 
  784  mVerticalAnchorComboBox->blockSignals( 
false );
 
  799  updateAssistantSymbol();
 
 
  807void QgsSimpleMarkerSymbolLayerWidget::setShape()
 
  826void QgsSimpleMarkerSymbolLayerWidget::penJoinStyleChanged()
 
  832void QgsSimpleMarkerSymbolLayerWidget::penCapStyleChanged()
 
  838void QgsSimpleMarkerSymbolLayerWidget::setSize()
 
  844void QgsSimpleMarkerSymbolLayerWidget::setAngle()
 
  850void QgsSimpleMarkerSymbolLayerWidget::setOffset()
 
  852  mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
  856void QgsSimpleMarkerSymbolLayerWidget::mStrokeStyleComboBox_currentIndexChanged( 
int index )
 
  867void QgsSimpleMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged( 
double d )
 
  876void QgsSimpleMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
 
  886void QgsSimpleMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
 
  896void QgsSimpleMarkerSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
 
  906void QgsSimpleMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged( 
int )
 
  915void QgsSimpleMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged( 
int )
 
  924void QgsSimpleMarkerSymbolLayerWidget::updateAssistantSymbol()
 
  926  for ( 
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1; i >= 0; --i )
 
  928    mAssistantPreviewSymbol->deleteSymbolLayer( i );
 
  930  mAssistantPreviewSymbol->appendSymbolLayer( 
mLayer->
clone() );
 
  933    mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
 
  950  btnChangeColor->setAllowOpacity( 
true );
 
  951  btnChangeColor->setColorDialogTitle( tr( 
"Select Fill Color" ) );
 
  952  btnChangeColor->setContext( QStringLiteral( 
"symbology" ) );
 
  953  btnChangeColor->setShowNoColor( 
true );
 
  954  btnChangeColor->setNoColorString( tr( 
"Transparent Fill" ) );
 
  955  btnChangeStrokeColor->setAllowOpacity( 
true );
 
  956  btnChangeStrokeColor->setColorDialogTitle( tr( 
"Select Stroke Color" ) );
 
  957  btnChangeStrokeColor->setContext( QStringLiteral( 
"symbology" ) );
 
  958  btnChangeStrokeColor->setShowNoColor( 
true );
 
  959  btnChangeStrokeColor->setNoColorString( tr( 
"Transparent Stroke" ) );
 
  961  spinOffsetX->setClearValue( 0.0 );
 
  962  spinOffsetY->setClearValue( 0.0 );
 
  965  connect( cboFillStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleFillSymbolLayerWidget::setBrushStyle );
 
  967  connect( spinStrokeWidth, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleFillSymbolLayerWidget::strokeWidthChanged );
 
  968  connect( cboStrokeStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleFillSymbolLayerWidget::strokeStyleChanged );
 
  969  connect( cboJoinStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSimpleFillSymbolLayerWidget::strokeStyleChanged );
 
  970  connect( spinOffsetX, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleFillSymbolLayerWidget::offsetChanged );
 
  971  connect( spinOffsetY, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSimpleFillSymbolLayerWidget::offsetChanged );
 
  973  mFillColorDDBtn->registerLinkedWidget( btnChangeColor );
 
  974  mStrokeColorDDBtn->registerLinkedWidget( btnChangeStrokeColor );
 
 
  979  if ( layer->
layerType() != QLatin1String( 
"SimpleFill" ) )
 
  986  btnChangeColor->blockSignals( 
true );
 
  988  btnChangeColor->blockSignals( 
false );
 
  989  cboFillStyle->blockSignals( 
true );
 
  991  cboFillStyle->blockSignals( 
false );
 
  992  btnChangeStrokeColor->blockSignals( 
true );
 
  994  btnChangeStrokeColor->blockSignals( 
false );
 
  995  cboStrokeStyle->blockSignals( 
true );
 
  997  cboStrokeStyle->blockSignals( 
false );
 
  998  spinStrokeWidth->blockSignals( 
true );
 
 1000  spinStrokeWidth->blockSignals( 
false );
 
 1001  cboJoinStyle->blockSignals( 
true );
 
 1003  cboJoinStyle->blockSignals( 
false );
 
 1004  spinOffsetX->blockSignals( 
true );
 
 1006  spinOffsetX->blockSignals( 
false );
 
 1007  spinOffsetY->blockSignals( 
true );
 
 1009  spinOffsetY->blockSignals( 
false );
 
 1011  mStrokeWidthUnitWidget->blockSignals( 
true );
 
 1014  mStrokeWidthUnitWidget->blockSignals( 
false );
 
 1015  mOffsetUnitWidget->blockSignals( 
true );
 
 1018  mOffsetUnitWidget->blockSignals( 
false );
 
 
 1046void QgsSimpleFillSymbolLayerWidget::setBrushStyle()
 
 1052void QgsSimpleFillSymbolLayerWidget::strokeWidthChanged()
 
 1058void QgsSimpleFillSymbolLayerWidget::strokeStyleChanged()
 
 1065void QgsSimpleFillSymbolLayerWidget::offsetChanged()
 
 1067  mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
 1071void QgsSimpleFillSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
 
 1081void 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 );
 
 1115  spinOffsetX->setClearValue( 0.0 );
 
 1116  spinOffsetY->setClearValue( 0.0 );
 
 1117  spinAngle->setClearValue( 0.0 );
 
 1123    mSizeDDBtn->setSymbol( mAssistantPreviewSymbol );
 
 1125  int size = lstNames->iconSize().width();
 
 1126  size = std::max( 30, 
static_cast<int>( std::round( 
Qgis::UI_SCALE_FACTOR * fontMetrics().horizontalAdvance( 
'X' ) * 3 ) ) );
 
 1127  lstNames->setGridSize( QSize( size * 1.2, size * 1.2 ) );
 
 1128  lstNames->setIconSize( QSize( size, size ) );
 
 1130  const double markerSize = size * 0.8;
 
 1136    lyr->
setColor( QColor( 200, 200, 200 ) );
 
 1139    QListWidgetItem *item = 
new QListWidgetItem( icon, QString(), lstNames );
 
 1140    item->setData( Qt::UserRole, 
static_cast<int>( shape ) );
 
 1145  lstNames->setMinimumHeight( lstNames->gridSize().height() * 3.1 );
 
 1147  connect( lstNames, &QListWidget::currentRowChanged, 
this, &QgsFilledMarkerSymbolLayerWidget::setShape );
 
 1148  connect( spinSize, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsFilledMarkerSymbolLayerWidget::setSize );
 
 1149  connect( spinAngle, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsFilledMarkerSymbolLayerWidget::setAngle );
 
 1150  connect( spinOffsetX, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsFilledMarkerSymbolLayerWidget::setOffset );
 
 1151  connect( spinOffsetY, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsFilledMarkerSymbolLayerWidget::setOffset );
 
 
 1159  if ( layer->
layerType() != QLatin1String( 
"FilledMarker" ) )
 
 1167  for ( 
int i = 0; i < lstNames->count(); ++i )
 
 1169    if ( 
static_cast<Qgis::MarkerShape>( lstNames->item( i )->data( Qt::UserRole ).toInt() ) == shape )
 
 1171      lstNames->setCurrentRow( i );
 
 1180  mSizeUnitWidget->blockSignals( 
true );
 
 1183  mSizeUnitWidget->blockSignals( 
false );
 
 1184  mOffsetUnitWidget->blockSignals( 
true );
 
 1187  mOffsetUnitWidget->blockSignals( 
false );
 
 1200  updateAssistantSymbol();
 
 
 1208void QgsFilledMarkerSymbolLayerWidget::setShape()
 
 1214void QgsFilledMarkerSymbolLayerWidget::setSize()
 
 1220void QgsFilledMarkerSymbolLayerWidget::setAngle()
 
 1226void QgsFilledMarkerSymbolLayerWidget::setOffset()
 
 1228  mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
 1232void QgsFilledMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
 
 1242void QgsFilledMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 1252void QgsFilledMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged( 
int )
 
 1261void QgsFilledMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged( 
int )
 
 1270void QgsFilledMarkerSymbolLayerWidget::updateAssistantSymbol()
 
 1272  for ( 
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1; i >= 0; --i )
 
 1274    mAssistantPreviewSymbol->deleteSymbolLayer( i );
 
 1276  mAssistantPreviewSymbol->appendSymbolLayer( 
mLayer->
clone() );
 
 1279    mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
 
 1292  connect( mSpinAngle, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::mSpinAngle_valueChanged );
 
 1295  btnColorRamp->setShowGradientOnly( 
true );
 
 1297  btnChangeColor->setAllowOpacity( 
true );
 
 1298  btnChangeColor->setColorDialogTitle( tr( 
"Select Gradient Color" ) );
 
 1299  btnChangeColor->setContext( QStringLiteral( 
"symbology" ) );
 
 1300  btnChangeColor->setShowNoColor( 
true );
 
 1301  btnChangeColor->setNoColorString( tr( 
"Transparent" ) );
 
 1302  btnChangeColor2->setAllowOpacity( 
true );
 
 1303  btnChangeColor2->setColorDialogTitle( tr( 
"Select Gradient Color" ) );
 
 1304  btnChangeColor2->setContext( QStringLiteral( 
"symbology" ) );
 
 1305  btnChangeColor2->setShowNoColor( 
true );
 
 1306  btnChangeColor2->setNoColorString( tr( 
"Transparent" ) );
 
 1308  mStartColorDDBtn->registerLinkedWidget( btnChangeColor );
 
 1309  mEndColorDDBtn->registerLinkedWidget( btnChangeColor2 );
 
 1311  spinOffsetX->setClearValue( 0.0 );
 
 1312  spinOffsetY->setClearValue( 0.0 );
 
 1313  mSpinAngle->setClearValue( 0.0 );
 
 1321  connect( radioTwoColor, &QAbstractButton::toggled, 
this, &QgsGradientFillSymbolLayerWidget::colorModeChanged );
 
 1322  connect( spinOffsetX, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::offsetChanged );
 
 1323  connect( spinOffsetY, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::offsetChanged );
 
 1324  connect( spinRefPoint1X, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
 
 1325  connect( spinRefPoint1Y, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
 
 1326  connect( checkRefPoint1Centroid, &QAbstractButton::toggled, 
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
 
 1327  connect( spinRefPoint2X, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
 
 1328  connect( spinRefPoint2Y, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
 
 1329  connect( checkRefPoint2Centroid, &QAbstractButton::toggled, 
this, &QgsGradientFillSymbolLayerWidget::referencePointChanged );
 
 
 1334  if ( layer->
layerType() != QLatin1String( 
"GradientFill" ) )
 
 1341  btnChangeColor->blockSignals( 
true );
 
 1343  btnChangeColor->blockSignals( 
false );
 
 1344  btnChangeColor2->blockSignals( 
true );
 
 1346  btnChangeColor2->blockSignals( 
false );
 
 1350    radioTwoColor->setChecked( 
true );
 
 1351    btnColorRamp->setEnabled( 
false );
 
 1355    radioColorRamp->setChecked( 
true );
 
 1356    btnChangeColor->setEnabled( 
false );
 
 1357    btnChangeColor2->setEnabled( 
false );
 
 1363    btnColorRamp->blockSignals( 
true );
 
 1365    btnColorRamp->blockSignals( 
false );
 
 1368  cboGradientType->blockSignals( 
true );
 
 1372      cboGradientType->setCurrentIndex( 0 );
 
 1375      cboGradientType->setCurrentIndex( 1 );
 
 1378      cboGradientType->setCurrentIndex( 2 );
 
 1381  cboGradientType->blockSignals( 
false );
 
 1383  cboCoordinateMode->blockSignals( 
true );
 
 1387      cboCoordinateMode->setCurrentIndex( 1 );
 
 1388      checkRefPoint1Centroid->setEnabled( 
false );
 
 1389      checkRefPoint2Centroid->setEnabled( 
false );
 
 1393      cboCoordinateMode->setCurrentIndex( 0 );
 
 1396  cboCoordinateMode->blockSignals( 
false );
 
 1398  cboGradientSpread->blockSignals( 
true );
 
 1402      cboGradientSpread->setCurrentIndex( 0 );
 
 1405      cboGradientSpread->setCurrentIndex( 1 );
 
 1408      cboGradientSpread->setCurrentIndex( 2 );
 
 1411  cboGradientSpread->blockSignals( 
false );
 
 1413  spinRefPoint1X->blockSignals( 
true );
 
 1415  spinRefPoint1X->blockSignals( 
false );
 
 1416  spinRefPoint1Y->blockSignals( 
true );
 
 1418  spinRefPoint1Y->blockSignals( 
false );
 
 1419  checkRefPoint1Centroid->blockSignals( 
true );
 
 1423    spinRefPoint1X->setEnabled( 
false );
 
 1424    spinRefPoint1Y->setEnabled( 
false );
 
 1426  checkRefPoint1Centroid->blockSignals( 
false );
 
 1427  spinRefPoint2X->blockSignals( 
true );
 
 1429  spinRefPoint2X->blockSignals( 
false );
 
 1430  spinRefPoint2Y->blockSignals( 
true );
 
 1432  spinRefPoint2Y->blockSignals( 
false );
 
 1433  checkRefPoint2Centroid->blockSignals( 
true );
 
 1437    spinRefPoint2X->setEnabled( 
false );
 
 1438    spinRefPoint2Y->setEnabled( 
false );
 
 1440  checkRefPoint2Centroid->blockSignals( 
false );
 
 1442  spinOffsetX->blockSignals( 
true );
 
 1444  spinOffsetX->blockSignals( 
false );
 
 1445  spinOffsetY->blockSignals( 
true );
 
 1447  spinOffsetY->blockSignals( 
false );
 
 1448  mSpinAngle->blockSignals( 
true );
 
 1450  mSpinAngle->blockSignals( 
false );
 
 1452  mOffsetUnitWidget->blockSignals( 
true );
 
 1455  mOffsetUnitWidget->blockSignals( 
false );
 
 
 1489void QgsGradientFillSymbolLayerWidget::colorModeChanged()
 
 1491  if ( radioTwoColor->isChecked() )
 
 1504  if ( btnColorRamp->isNull() )
 
 
 1518      spinRefPoint1X->setValue( 0.5 );
 
 1519      spinRefPoint1Y->setValue( 0 );
 
 1520      spinRefPoint2X->setValue( 0.5 );
 
 1521      spinRefPoint2Y->setValue( 1 );
 
 1526      spinRefPoint1X->setValue( 0 );
 
 1527      spinRefPoint1Y->setValue( 0 );
 
 1528      spinRefPoint2X->setValue( 1 );
 
 1529      spinRefPoint2Y->setValue( 1 );
 
 1533      spinRefPoint1X->setValue( 0.5 );
 
 1534      spinRefPoint1Y->setValue( 0.5 );
 
 1535      spinRefPoint2X->setValue( 1 );
 
 1536      spinRefPoint2Y->setValue( 1 );
 
 
 1550      checkRefPoint1Centroid->setEnabled( 
true );
 
 1551      checkRefPoint2Centroid->setEnabled( 
true );
 
 1557      checkRefPoint1Centroid->setChecked( Qt::Unchecked );
 
 1558      checkRefPoint1Centroid->setEnabled( 
false );
 
 1559      checkRefPoint2Centroid->setChecked( Qt::Unchecked );
 
 1560      checkRefPoint2Centroid->setEnabled( 
false );
 
 
 1585void QgsGradientFillSymbolLayerWidget::offsetChanged()
 
 1587  mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
 1591void QgsGradientFillSymbolLayerWidget::referencePointChanged()
 
 1600void QgsGradientFillSymbolLayerWidget::mSpinAngle_valueChanged( 
double value )
 
 1606void QgsGradientFillSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 1624  connect( mSpinBlurRadius, qOverload<int>( &QSpinBox::valueChanged ), 
this, &QgsShapeburstFillSymbolLayerWidget::mSpinBlurRadius_valueChanged );
 
 1625  connect( mSpinMaxDistance, qOverload<double>( &QDoubleSpinBox::valueChanged ), 
this, &QgsShapeburstFillSymbolLayerWidget::mSpinMaxDistance_valueChanged );
 
 1627  connect( mRadioUseWholeShape, &QRadioButton::toggled, 
this, &QgsShapeburstFillSymbolLayerWidget::mRadioUseWholeShape_toggled );
 
 1629  connect( mIgnoreRingsCheckBox, &QCheckBox::stateChanged, 
this, &QgsShapeburstFillSymbolLayerWidget::mIgnoreRingsCheckBox_stateChanged );
 
 1633  QButtonGroup *group1 = 
new QButtonGroup( 
this );
 
 1634  group1->addButton( radioColorRamp );
 
 1635  group1->addButton( radioTwoColor );
 
 1636  QButtonGroup *group2 = 
new QButtonGroup( 
this );
 
 1637  group2->addButton( mRadioUseMaxDistance );
 
 1638  group2->addButton( mRadioUseWholeShape );
 
 1639  btnChangeColor->setAllowOpacity( 
true );
 
 1640  btnChangeColor->setColorDialogTitle( tr( 
"Select Gradient Color" ) );
 
 1641  btnChangeColor->setContext( QStringLiteral( 
"symbology" ) );
 
 1642  btnChangeColor->setShowNoColor( 
true );
 
 1643  btnChangeColor->setNoColorString( tr( 
"Transparent" ) );
 
 1644  btnChangeColor2->setAllowOpacity( 
true );
 
 1645  btnChangeColor2->setColorDialogTitle( tr( 
"Select Gradient Color" ) );
 
 1646  btnChangeColor2->setContext( QStringLiteral( 
"symbology" ) );
 
 1647  btnChangeColor2->setShowNoColor( 
true );
 
 1648  btnChangeColor2->setNoColorString( tr( 
"Transparent" ) );
 
 1650  mStartColorDDBtn->registerLinkedWidget( btnChangeColor );
 
 1651  mEndColorDDBtn->registerLinkedWidget( btnChangeColor2 );
 
 1653  spinOffsetX->setClearValue( 0.0 );
 
 1654  spinOffsetY->setClearValue( 0.0 );
 
 1655  mSpinMaxDistance->setClearValue( 5.0 );
 
 1657  btnColorRamp->setShowGradientOnly( 
true );
 
 1663  connect( radioTwoColor, &QAbstractButton::toggled, 
this, &QgsShapeburstFillSymbolLayerWidget::colorModeChanged );
 
 1664  connect( spinOffsetX, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsShapeburstFillSymbolLayerWidget::offsetChanged );
 
 1665  connect( spinOffsetY, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsShapeburstFillSymbolLayerWidget::offsetChanged );
 
 1667  connect( mBlurSlider, &QAbstractSlider::valueChanged, mSpinBlurRadius, &QSpinBox::setValue );
 
 1668  connect( mSpinBlurRadius, 
static_cast<void ( QSpinBox::* )( 
int )
>( &QSpinBox::valueChanged ), mBlurSlider, &QAbstractSlider::setValue );
 
 
 1673  if ( layer->
layerType() != QLatin1String( 
"ShapeburstFill" ) )
 
 1680  btnChangeColor->blockSignals( 
true );
 
 1682  btnChangeColor->blockSignals( 
false );
 
 1683  btnChangeColor2->blockSignals( 
true );
 
 1685  btnChangeColor2->blockSignals( 
false );
 
 1689    radioTwoColor->setChecked( 
true );
 
 1690    btnColorRamp->setEnabled( 
false );
 
 1694    radioColorRamp->setChecked( 
true );
 
 1695    btnChangeColor->setEnabled( 
false );
 
 1696    btnChangeColor2->setEnabled( 
false );
 
 1699  mSpinBlurRadius->blockSignals( 
true );
 
 1700  mBlurSlider->blockSignals( 
true );
 
 1703  mSpinBlurRadius->blockSignals( 
false );
 
 1704  mBlurSlider->blockSignals( 
false );
 
 1706  mSpinMaxDistance->blockSignals( 
true );
 
 1708  mSpinMaxDistance->blockSignals( 
false );
 
 1710  mRadioUseWholeShape->blockSignals( 
true );
 
 1711  mRadioUseMaxDistance->blockSignals( 
true );
 
 1714    mRadioUseWholeShape->setChecked( 
true );
 
 1715    mSpinMaxDistance->setEnabled( 
false );
 
 1716    mDistanceUnitWidget->setEnabled( 
false );
 
 1720    mRadioUseMaxDistance->setChecked( 
true );
 
 1721    mSpinMaxDistance->setEnabled( 
true );
 
 1722    mDistanceUnitWidget->setEnabled( 
true );
 
 1724  mRadioUseWholeShape->blockSignals( 
false );
 
 1725  mRadioUseMaxDistance->blockSignals( 
false );
 
 1727  mDistanceUnitWidget->blockSignals( 
true );
 
 1730  mDistanceUnitWidget->blockSignals( 
false );
 
 1732  mIgnoreRingsCheckBox->blockSignals( 
true );
 
 1733  mIgnoreRingsCheckBox->setCheckState( 
mLayer->
ignoreRings() ? Qt::Checked : Qt::Unchecked );
 
 1734  mIgnoreRingsCheckBox->blockSignals( 
false );
 
 1739    btnColorRamp->blockSignals( 
true );
 
 1741    btnColorRamp->blockSignals( 
false );
 
 1744  spinOffsetX->blockSignals( 
true );
 
 1746  spinOffsetX->blockSignals( 
false );
 
 1747  spinOffsetY->blockSignals( 
true );
 
 1749  spinOffsetY->blockSignals( 
false );
 
 1750  mOffsetUnitWidget->blockSignals( 
true );
 
 1753  mOffsetUnitWidget->blockSignals( 
false );
 
 
 1787void QgsShapeburstFillSymbolLayerWidget::colorModeChanged()
 
 1794  if ( radioTwoColor->isChecked() )
 
 1805void QgsShapeburstFillSymbolLayerWidget::mSpinBlurRadius_valueChanged( 
int value )
 
 1814void QgsShapeburstFillSymbolLayerWidget::mSpinMaxDistance_valueChanged( 
double value )
 
 1823void QgsShapeburstFillSymbolLayerWidget::mDistanceUnitWidget_changed()
 
 1833void QgsShapeburstFillSymbolLayerWidget::mRadioUseWholeShape_toggled( 
bool value )
 
 1838    mDistanceUnitWidget->setEnabled( !value );
 
 1843void QgsShapeburstFillSymbolLayerWidget::applyColorRamp()
 
 1853void QgsShapeburstFillSymbolLayerWidget::offsetChanged()
 
 1857    mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
 1862void QgsShapeburstFillSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 1873void QgsShapeburstFillSymbolLayerWidget::mIgnoreRingsCheckBox_stateChanged( 
int state )
 
 1875  const bool checked = ( state == Qt::Checked );
 
 1900  connect( mRingFilterComboBox, qOverload<int>( &QComboBox::currentIndexChanged ), 
this, [
this]( 
int ) {
 
 1908  spinOffset->setClearValue( 0.0 );
 
 1909  mSpinOffsetAlongLine->setClearValue( 0.0 );
 
 1910  mSpinAverageAngleLength->setClearValue( 4.0 );
 
 1914  connect( chkRotateMarker, &QAbstractButton::clicked, 
this, &QgsMarkerLineSymbolLayerWidget::setRotate );
 
 1915  connect( spinOffset, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsMarkerLineSymbolLayerWidget::setOffset );
 
 1916  connect( mSpinAverageAngleLength, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsMarkerLineSymbolLayerWidget::setAverageAngle );
 
 1917  connect( mCheckInterval, &QCheckBox::toggled, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1918  connect( mCheckVertex, &QCheckBox::toggled, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1919  connect( mCheckVertexLast, &QCheckBox::toggled, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1920  connect( mCheckVertexFirst, &QCheckBox::toggled, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1921  connect( mCheckCentralPoint, &QCheckBox::toggled, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1922  connect( mCheckCurvePoint, &QCheckBox::toggled, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1923  connect( mCheckSegmentCentralPoint, &QCheckBox::toggled, 
this, &QgsMarkerLineSymbolLayerWidget::setPlacement );
 
 1924  connect( mCheckPlaceOnEveryPart, &QCheckBox::toggled, 
this, [
this] {
 
 
 1935  if ( layer->
layerType() != QLatin1String( 
"MarkerLine" ) )
 
 1942  spinInterval->blockSignals( 
true );
 
 1944  spinInterval->blockSignals( 
false );
 
 1945  mSpinOffsetAlongLine->blockSignals( 
true );
 
 1947  mSpinOffsetAlongLine->blockSignals( 
false );
 
 1948  chkRotateMarker->blockSignals( 
true );
 
 1950  chkRotateMarker->blockSignals( 
false );
 
 1951  spinOffset->blockSignals( 
true );
 
 1953  spinOffset->blockSignals( 
false );
 
 1965  mIntervalUnitWidget->blockSignals( 
true );
 
 1968  mIntervalUnitWidget->blockSignals( 
false );
 
 1969  mOffsetUnitWidget->blockSignals( 
true );
 
 1972  mOffsetUnitWidget->blockSignals( 
false );
 
 1973  mOffsetAlongLineUnitWidget->blockSignals( 
true );
 
 1976  mOffsetAlongLineUnitWidget->blockSignals( 
false );
 
 
 2007      mRingFilterComboBox->hide();
 
 2008      mRingsLabel->hide();
 
 
 2029void QgsMarkerLineSymbolLayerWidget::setRotate()
 
 2031  mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( mCheckInterval->isChecked() || mCheckCentralPoint->isChecked() ) );
 
 2032  mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
 
 2038void QgsMarkerLineSymbolLayerWidget::setOffset()
 
 2044void QgsMarkerLineSymbolLayerWidget::setPlacement()
 
 2046  const bool interval = mCheckInterval->isChecked();
 
 2047  spinInterval->setEnabled( interval );
 
 2048  mSpinOffsetAlongLine->setEnabled( mCheckInterval->isChecked() || mCheckVertexLast->isChecked() || mCheckVertexFirst->isChecked() );
 
 2049  mOffsetAlongLineUnitWidget->setEnabled( mSpinOffsetAlongLine->isEnabled() );
 
 2050  mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( mCheckInterval->isChecked() || mCheckCentralPoint->isChecked() ) );
 
 2051  mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
 
 2052  mCheckPlaceOnEveryPart->setEnabled( mCheckVertexLast->isChecked() || mCheckVertexFirst->isChecked() );
 
 2055  if ( mCheckInterval->isChecked() )
 
 2057  if ( mCheckVertex->isChecked() )
 
 2059  if ( mCheckVertexLast->isChecked() )
 
 2061  if ( mCheckVertexFirst->isChecked() )
 
 2063  if ( mCheckCurvePoint->isChecked() )
 
 2065  if ( mCheckSegmentCentralPoint->isChecked() )
 
 2067  if ( mCheckCentralPoint->isChecked() )
 
 2074void QgsMarkerLineSymbolLayerWidget::mIntervalUnitWidget_changed()
 
 2084void QgsMarkerLineSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 2094void QgsMarkerLineSymbolLayerWidget::mOffsetAlongLineUnitWidget_changed()
 
 2104void QgsMarkerLineSymbolLayerWidget::averageAngleUnitChanged()
 
 2114void QgsMarkerLineSymbolLayerWidget::setAverageAngle( 
double val )
 
 2146  connect( mRingFilterComboBox, qOverload<int>( &QComboBox::currentIndexChanged ), 
this, [
this]( 
int ) {
 
 2154  spinOffset->setClearValue( 0.0 );
 
 2155  mSpinOffsetAlongLine->setClearValue( 0.0 );
 
 2156  mHashRotationSpinBox->setClearValue( 0 );
 
 2157  mSpinAverageAngleLength->setClearValue( 4.0 );
 
 2159  connect( spinInterval, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsHashedLineSymbolLayerWidget::setInterval );
 
 2160  connect( mSpinOffsetAlongLine, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsHashedLineSymbolLayerWidget::setOffsetAlongLine );
 
 2161  connect( mSpinHashLength, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsHashedLineSymbolLayerWidget::setHashLength );
 
 2162  connect( mHashRotationSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsHashedLineSymbolLayerWidget::setHashAngle );
 
 2163  connect( chkRotateMarker, &QAbstractButton::clicked, 
this, &QgsHashedLineSymbolLayerWidget::setRotate );
 
 2164  connect( spinOffset, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsHashedLineSymbolLayerWidget::setOffset );
 
 2165  connect( mSpinAverageAngleLength, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsHashedLineSymbolLayerWidget::setAverageAngle );
 
 2167  connect( mCheckInterval, &QCheckBox::toggled, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2168  connect( mCheckVertex, &QCheckBox::toggled, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2169  connect( mCheckVertexLast, &QCheckBox::toggled, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2170  connect( mCheckVertexFirst, &QCheckBox::toggled, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2171  connect( mCheckCentralPoint, &QCheckBox::toggled, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2172  connect( mCheckCurvePoint, &QCheckBox::toggled, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2173  connect( mCheckSegmentCentralPoint, &QCheckBox::toggled, 
this, &QgsHashedLineSymbolLayerWidget::setPlacement );
 
 2175  connect( mCheckPlaceOnEveryPart, &QCheckBox::toggled, 
this, [
this] {
 
 
 2186  if ( layer->
layerType() != QLatin1String( 
"HashLine" ) )
 
 2193  spinInterval->blockSignals( 
true );
 
 2194  spinInterval->setValue( mLayer->
interval() );
 
 2195  spinInterval->blockSignals( 
false );
 
 2196  mSpinOffsetAlongLine->blockSignals( 
true );
 
 2198  mSpinOffsetAlongLine->blockSignals( 
false );
 
 2201  chkRotateMarker->blockSignals( 
true );
 
 2203  chkRotateMarker->blockSignals( 
false );
 
 2204  spinOffset->blockSignals( 
true );
 
 2205  spinOffset->setValue( mLayer->
offset() );
 
 2206  spinOffset->blockSignals( 
false );
 
 2218  mIntervalUnitWidget->blockSignals( 
true );
 
 2219  mIntervalUnitWidget->setUnit( mLayer->
intervalUnit() );
 
 2221  mIntervalUnitWidget->blockSignals( 
false );
 
 2222  mOffsetUnitWidget->blockSignals( 
true );
 
 2223  mOffsetUnitWidget->setUnit( mLayer->
offsetUnit() );
 
 2225  mOffsetUnitWidget->blockSignals( 
false );
 
 2226  mOffsetAlongLineUnitWidget->blockSignals( 
true );
 
 2229  mOffsetAlongLineUnitWidget->blockSignals( 
false );
 
 2236  whileBlocking( mRingFilterComboBox )->setCurrentIndex( mRingFilterComboBox->findData( mLayer->
ringFilter() ) );
 
 
 2263      mRingFilterComboBox->hide();
 
 2264      mRingsLabel->hide();
 
 
 2273void QgsHashedLineSymbolLayerWidget::setInterval( 
double val )
 
 2279void QgsHashedLineSymbolLayerWidget::setOffsetAlongLine( 
double val )
 
 2285void QgsHashedLineSymbolLayerWidget::setHashLength( 
double val )
 
 2291void QgsHashedLineSymbolLayerWidget::setHashAngle( 
double val )
 
 2297void QgsHashedLineSymbolLayerWidget::setRotate()
 
 2299  mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( mCheckInterval->isChecked() || mCheckCentralPoint->isChecked() ) );
 
 2300  mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
 
 2306void QgsHashedLineSymbolLayerWidget::setOffset()
 
 2308  mLayer->
setOffset( spinOffset->value() );
 
 2312void QgsHashedLineSymbolLayerWidget::setPlacement()
 
 2314  const bool interval = mCheckInterval->isChecked();
 
 2315  spinInterval->setEnabled( interval );
 
 2316  mSpinOffsetAlongLine->setEnabled( mCheckInterval->isChecked() || mCheckVertexLast->isChecked() || mCheckVertexFirst->isChecked() );
 
 2317  mOffsetAlongLineUnitWidget->setEnabled( mSpinOffsetAlongLine->isEnabled() );
 
 2318  mSpinAverageAngleLength->setEnabled( chkRotateMarker->isChecked() && ( mCheckInterval->isChecked() || mCheckCentralPoint->isChecked() ) );
 
 2319  mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
 
 2320  mCheckPlaceOnEveryPart->setEnabled( mCheckVertexLast->isChecked() || mCheckVertexFirst->isChecked() );
 
 2323  if ( mCheckInterval->isChecked() )
 
 2325  if ( mCheckVertex->isChecked() )
 
 2327  if ( mCheckVertexLast->isChecked() )
 
 2329  if ( mCheckVertexFirst->isChecked() )
 
 2331  if ( mCheckCurvePoint->isChecked() )
 
 2333  if ( mCheckSegmentCentralPoint->isChecked() )
 
 2335  if ( mCheckCentralPoint->isChecked() )
 
 2342void QgsHashedLineSymbolLayerWidget::mIntervalUnitWidget_changed()
 
 2352void QgsHashedLineSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 2362void QgsHashedLineSymbolLayerWidget::mOffsetAlongLineUnitWidget_changed()
 
 2372void QgsHashedLineSymbolLayerWidget::hashLengthUnitWidgetChanged()
 
 2382void QgsHashedLineSymbolLayerWidget::averageAngleUnitChanged()
 
 2392void QgsHashedLineSymbolLayerWidget::setAverageAngle( 
double val )
 
 2419  mSvgSelectorWidget->setAllowParameters( 
true );
 
 2420  mSvgSelectorWidget->sourceLineEdit()->setPropertyOverrideToolButtonVisible( 
true );
 
 2421  mSvgSelectorWidget->sourceLineEdit()->setLastPathSettingsKey( QStringLiteral( 
"/UI/lastSVGMarkerDir" ) );
 
 2422  mSvgSelectorWidget->initParametersModel( 
this, vl );
 
 2426  connect( mChangeStrokeColorButton, &
QgsColorButton::colorChanged, 
this, &QgsSvgMarkerSymbolLayerWidget::mChangeStrokeColorButton_colorChanged );
 
 2427  connect( mStrokeWidthSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
 
 2431  connect( mHorizontalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
 
 2432  connect( mVerticalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
 
 2436  mChangeColorButton->setAllowOpacity( 
true );
 
 2437  mChangeColorButton->setColorDialogTitle( tr( 
"Select Fill color" ) );
 
 2438  mChangeColorButton->setContext( QStringLiteral( 
"symbology" ) );
 
 2439  mChangeStrokeColorButton->setAllowOpacity( 
true );
 
 2440  mChangeStrokeColorButton->setColorDialogTitle( tr( 
"Select Stroke Color" ) );
 
 2441  mChangeStrokeColorButton->setContext( QStringLiteral( 
"symbology" ) );
 
 2443  mFillColorDDBtn->registerLinkedWidget( mChangeColorButton );
 
 2444  mStrokeColorDDBtn->registerLinkedWidget( mChangeStrokeColorButton );
 
 2446  spinOffsetX->setClearValue( 0.0 );
 
 2447  spinOffsetY->setClearValue( 0.0 );
 
 2448  spinAngle->setClearValue( 0.0 );
 
 2450  connect( spinWidth, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::setWidth );
 
 2451  connect( spinHeight, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::setHeight );
 
 2453  connect( spinAngle, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::setAngle );
 
 2454  connect( spinOffsetX, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::setOffset );
 
 2455  connect( spinOffsetY, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSvgMarkerSymbolLayerWidget::setOffset );
 
 2466    mWidthDDBtn->setSymbol( mAssistantPreviewSymbol );
 
 2467    mHeightDDBtn->setSymbol( mAssistantPreviewSymbol );
 
 
 2474#include <QAbstractListModel> 
 2475#include <QPixmapCache> 
 2487  bool hasFillParam, hasFillOpacityParam, hasStrokeParam, hasStrokeWidthParam, hasStrokeOpacityParam;
 
 2488  QColor defaultFill, defaultStroke;
 
 2489  double defaultStrokeWidth, defaultFillOpacity, defaultStrokeOpacity;
 
 2490  bool hasDefaultFillColor, hasDefaultFillOpacity, hasDefaultStrokeColor, hasDefaultStrokeWidth, hasDefaultStrokeOpacity;
 
 2491  QgsApplication::svgCache()->
containsParams( layer->
path(), hasFillParam, hasDefaultFillColor, defaultFill, hasFillOpacityParam, hasDefaultFillOpacity, defaultFillOpacity, hasStrokeParam, hasDefaultStrokeColor, defaultStroke, hasStrokeWidthParam, hasDefaultStrokeWidth, defaultStrokeWidth, hasStrokeOpacityParam, hasDefaultStrokeOpacity, defaultStrokeOpacity );
 
 2492  mChangeColorButton->setEnabled( hasFillParam );
 
 2493  mChangeColorButton->setAllowOpacity( hasFillOpacityParam );
 
 2494  mChangeStrokeColorButton->setEnabled( hasStrokeParam );
 
 2495  mChangeStrokeColorButton->setAllowOpacity( hasStrokeOpacityParam );
 
 2496  mStrokeWidthSpinBox->setEnabled( hasStrokeWidthParam );
 
 2501    const double existingOpacity = hasFillOpacityParam ? fill.alphaF() : 1.0;
 
 2502    if ( hasDefaultFillColor && !skipDefaultColors )
 
 2506    fill.setAlphaF( hasDefaultFillOpacity ? defaultFillOpacity : existingOpacity );
 
 2507    mChangeColorButton->setColor( fill );
 
 2509  if ( hasStrokeParam )
 
 2512    const double existingOpacity = hasStrokeOpacityParam ? stroke.alphaF() : 1.0;
 
 2513    if ( hasDefaultStrokeColor && !skipDefaultColors )
 
 2515      stroke = defaultStroke;
 
 2517    stroke.setAlphaF( hasDefaultStrokeOpacity ? defaultStrokeOpacity : existingOpacity );
 
 2518    mChangeStrokeColorButton->setColor( stroke );
 
 2521  whileBlocking( mSvgSelectorWidget->sourceLineEdit() )->setSource( layer->
path() );
 
 2523  mStrokeWidthSpinBox->blockSignals( 
true );
 
 2524  mStrokeWidthSpinBox->setValue( hasDefaultStrokeWidth ? defaultStrokeWidth : layer->
strokeWidth() );
 
 2525  mStrokeWidthSpinBox->blockSignals( 
false );
 
 2528  spinHeight->blockSignals( 
true );
 
 2529  if ( preservedAspectRatio )
 
 2538  spinHeight->blockSignals( 
false );
 
 2539  whileBlocking( mLockAspectRatio )->setLocked( preservedAspectRatio );
 
 
 2542void QgsSvgMarkerSymbolLayerWidget::updateAssistantSymbol()
 
 2544  for ( 
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1; i >= 0; --i )
 
 2546    mAssistantPreviewSymbol->deleteSymbolLayer( i );
 
 2548  mAssistantPreviewSymbol->appendSymbolLayer( 
mLayer->
clone() );
 
 2551    mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
 
 2562  if ( layer->
layerType() != QLatin1String( 
"SvgMarker" ) )
 
 2569  mSvgSelectorWidget->setSvgPath( 
mLayer->
path() );
 
 2572  spinWidth->blockSignals( 
true );
 
 2574  spinWidth->blockSignals( 
false );
 
 2575  spinAngle->blockSignals( 
true );
 
 2577  spinAngle->blockSignals( 
false );
 
 2580  spinOffsetX->blockSignals( 
true );
 
 2582  spinOffsetX->blockSignals( 
false );
 
 2583  spinOffsetY->blockSignals( 
true );
 
 2585  spinOffsetY->blockSignals( 
false );
 
 2587  mSizeUnitWidget->blockSignals( 
true );
 
 2590  mSizeUnitWidget->blockSignals( 
false );
 
 2591  mStrokeWidthUnitWidget->blockSignals( 
true );
 
 2594  mStrokeWidthUnitWidget->blockSignals( 
false );
 
 2595  mOffsetUnitWidget->blockSignals( 
true );
 
 2598  mOffsetUnitWidget->blockSignals( 
false );
 
 2601  mHorizontalAnchorComboBox->blockSignals( 
true );
 
 2602  mVerticalAnchorComboBox->blockSignals( 
true );
 
 2603  mHorizontalAnchorComboBox->setCurrentIndex( mHorizontalAnchorComboBox->findData( QVariant::fromValue( 
mLayer->
horizontalAnchorPoint() ) ) );
 
 2604  mVerticalAnchorComboBox->setCurrentIndex( mVerticalAnchorComboBox->findData( QVariant::fromValue( 
mLayer->
verticalAnchorPoint() ) ) );
 
 2605  mHorizontalAnchorComboBox->blockSignals( 
false );
 
 2606  mVerticalAnchorComboBox->blockSignals( 
false );
 
 2622  updateAssistantSymbol();
 
 
 2639  whileBlocking( mSvgSelectorWidget->sourceLineEdit() )->setSource( name );
 
 
 2648  whileBlocking( mSvgSelectorWidget )->setSvgParameters( parameters );
 
 
 2654void QgsSvgMarkerSymbolLayerWidget::setWidth()
 
 2657  double fixedAspectRatio = 0.0;
 
 2658  spinHeight->blockSignals( 
true );
 
 2659  if ( defaultAspectRatio <= 0.0 )
 
 2661    spinHeight->setValue( spinWidth->value() );
 
 2663  else if ( mLockAspectRatio->locked() )
 
 2665    spinHeight->setValue( spinWidth->value() * defaultAspectRatio );
 
 2669    fixedAspectRatio = spinHeight->value() / spinWidth->value();
 
 2671  spinHeight->blockSignals( 
false );
 
 2677void QgsSvgMarkerSymbolLayerWidget::setHeight()
 
 2680  double fixedAspectRatio = 0.0;
 
 2681  spinWidth->blockSignals( 
true );
 
 2682  if ( defaultAspectRatio <= 0.0 )
 
 2684    spinWidth->setValue( spinHeight->value() );
 
 2686  else if ( mLockAspectRatio->locked() )
 
 2688    spinWidth->setValue( spinHeight->value() / defaultAspectRatio );
 
 2692    fixedAspectRatio = spinHeight->value() / spinWidth->value();
 
 2694  spinWidth->blockSignals( 
false );
 
 2700void QgsSvgMarkerSymbolLayerWidget::lockAspectRatioChanged( 
const bool locked )
 
 2704  if ( defaultAspectRatio <= 0.0 )
 
 2720void QgsSvgMarkerSymbolLayerWidget::setAngle()
 
 2726void QgsSvgMarkerSymbolLayerWidget::setOffset()
 
 2728  mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
 2732void QgsSvgMarkerSymbolLayerWidget::svgSourceChanged( 
const QString &text )
 
 2739void QgsSvgMarkerSymbolLayerWidget::mChangeColorButton_colorChanged( 
const QColor &color )
 
 2750void QgsSvgMarkerSymbolLayerWidget::mChangeStrokeColorButton_colorChanged( 
const QColor &color )
 
 2761void QgsSvgMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged( 
double d )
 
 2770void QgsSvgMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
 
 2780void QgsSvgMarkerSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
 
 2790void QgsSvgMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 2800void QgsSvgMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged( 
int )
 
 2809void QgsSvgMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged( 
int )
 
 2826  mSvgSelectorWidget->setAllowParameters( 
true );
 
 2827  mSvgSelectorWidget->sourceLineEdit()->setPropertyOverrideToolButtonVisible( 
true );
 
 2829  connect( mTextureWidthSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSVGFillSymbolLayerWidget::mTextureWidthSpinBox_valueChanged );
 
 2831  connect( mRotationSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSVGFillSymbolLayerWidget::mRotationSpinBox_valueChanged );
 
 2833  connect( mChangeStrokeColorButton, &
QgsColorButton::colorChanged, 
this, &QgsSVGFillSymbolLayerWidget::mChangeStrokeColorButton_colorChanged );
 
 2834  connect( mStrokeWidthSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsSVGFillSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
 
 2840  mRotationSpinBox->setClearValue( 0.0 );
 
 2842  mChangeColorButton->setColorDialogTitle( tr( 
"Select Fill Color" ) );
 
 2843  mChangeColorButton->setContext( QStringLiteral( 
"symbology" ) );
 
 2844  mChangeStrokeColorButton->setColorDialogTitle( tr( 
"Select Stroke Color" ) );
 
 2845  mChangeStrokeColorButton->setContext( QStringLiteral( 
"symbology" ) );
 
 2847  mFilColorDDBtn->registerLinkedWidget( mChangeColorButton );
 
 2848  mStrokeColorDDBtn->registerLinkedWidget( mChangeStrokeColorButton );
 
 
 2861  if ( layer->
layerType() != QLatin1String( 
"SVGFill" ) )
 
 2870    mTextureWidthSpinBox->blockSignals( 
true );
 
 2871    mTextureWidthSpinBox->setValue( width );
 
 2872    mTextureWidthSpinBox->blockSignals( 
false );
 
 2874    mRotationSpinBox->blockSignals( 
true );
 
 2876    mRotationSpinBox->blockSignals( 
false );
 
 2877    mTextureWidthUnitWidget->blockSignals( 
true );
 
 2880    mTextureWidthUnitWidget->blockSignals( 
false );
 
 2881    mSvgStrokeWidthUnitWidget->blockSignals( 
true );
 
 2884    mSvgStrokeWidthUnitWidget->blockSignals( 
false );
 
 2885    mChangeColorButton->blockSignals( 
true );
 
 2887    mChangeColorButton->blockSignals( 
false );
 
 2888    mChangeStrokeColorButton->blockSignals( 
true );
 
 2890    mChangeStrokeColorButton->blockSignals( 
false );
 
 2891    mStrokeWidthSpinBox->blockSignals( 
true );
 
 2893    mStrokeWidthSpinBox->blockSignals( 
false );
 
 
 2917void QgsSVGFillSymbolLayerWidget::mTextureWidthSpinBox_valueChanged( 
double d )
 
 2926void QgsSVGFillSymbolLayerWidget::svgSourceChanged( 
const QString &text )
 
 2938void QgsSVGFillSymbolLayerWidget::setFile( 
const QString &name )
 
 2941  whileBlocking( mSvgSelectorWidget->sourceLineEdit() )->setSource( name );
 
 2947void QgsSVGFillSymbolLayerWidget::setSvgParameters( 
const QMap<QString, QgsProperty> ¶meters )
 
 2950  whileBlocking( mSvgSelectorWidget )->setSvgParameters( parameters );
 
 2957void QgsSVGFillSymbolLayerWidget::mRotationSpinBox_valueChanged( 
double d )
 
 2969  bool hasFillParam, hasFillOpacityParam, hasStrokeParam, hasStrokeWidthParam, hasStrokeOpacityParam;
 
 2970  QColor defaultFill, defaultStroke;
 
 2971  double defaultStrokeWidth, defaultFillOpacity, defaultStrokeOpacity;
 
 2972  bool hasDefaultFillColor, hasDefaultFillOpacity, hasDefaultStrokeColor, hasDefaultStrokeWidth, hasDefaultStrokeOpacity;
 
 2973  QgsApplication::svgCache()->
containsParams( mSvgSelectorWidget->sourceLineEdit()->source(), hasFillParam, hasDefaultFillColor, defaultFill, hasFillOpacityParam, hasDefaultFillOpacity, defaultFillOpacity, hasStrokeParam, hasDefaultStrokeColor, defaultStroke, hasStrokeWidthParam, hasDefaultStrokeWidth, defaultStrokeWidth, hasStrokeOpacityParam, hasDefaultStrokeOpacity, defaultStrokeOpacity );
 
 2976    QColor fill = mChangeColorButton->color();
 
 2977    const double newOpacity = hasFillOpacityParam ? fill.alphaF() : 1.0;
 
 2978    if ( hasDefaultFillColor )
 
 2982    fill.setAlphaF( hasDefaultFillOpacity ? defaultFillOpacity : newOpacity );
 
 2983    mChangeColorButton->setColor( fill );
 
 2985  mChangeColorButton->setEnabled( hasFillParam );
 
 2986  mChangeColorButton->setAllowOpacity( hasFillOpacityParam );
 
 2989    QColor stroke = mChangeStrokeColorButton->color();
 
 2990    const double newOpacity = hasStrokeOpacityParam ? stroke.alphaF() : 1.0;
 
 2991    if ( hasDefaultStrokeColor )
 
 2993      stroke = defaultStroke;
 
 2995    stroke.setAlphaF( hasDefaultStrokeOpacity ? defaultStrokeOpacity : newOpacity );
 
 2996    mChangeStrokeColorButton->setColor( stroke );
 
 2998  mChangeStrokeColorButton->setEnabled( hasStrokeParam );
 
 2999  mChangeStrokeColorButton->setAllowOpacity( hasStrokeOpacityParam );
 
 3000  if ( hasDefaultStrokeWidth && resetValues )
 
 3002    mStrokeWidthSpinBox->setValue( defaultStrokeWidth );
 
 3004  mStrokeWidthSpinBox->setEnabled( hasStrokeWidthParam );
 
 
 3007void QgsSVGFillSymbolLayerWidget::mChangeColorButton_colorChanged( 
const QColor &color )
 
 3018void QgsSVGFillSymbolLayerWidget::mChangeStrokeColorButton_colorChanged( 
const QColor &color )
 
 3029void QgsSVGFillSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged( 
double d )
 
 3038void QgsSVGFillSymbolLayerWidget::mTextureWidthUnitWidget_changed()
 
 3048void QgsSVGFillSymbolLayerWidget::mSvgStrokeWidthUnitWidget_changed()
 
 3064  connect( mAngleSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsLinePatternFillSymbolLayerWidget::mAngleSpinBox_valueChanged );
 
 3065  connect( mDistanceSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsLinePatternFillSymbolLayerWidget::mDistanceSpinBox_valueChanged );
 
 3066  connect( mOffsetSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsLinePatternFillSymbolLayerWidget::mOffsetSpinBox_valueChanged );
 
 3071  mOffsetSpinBox->setClearValue( 0 );
 
 3072  mAngleSpinBox->setClearValue( 0 );
 
 3076  connect( mCoordinateReferenceComboBox, qOverload<int>( &QComboBox::currentIndexChanged ), 
this, [
this] {
 
 3087  connect( mClipModeComboBox, qOverload<int>( &QComboBox::currentIndexChanged ), 
this, [
this] {
 
 
 3098  if ( layer->
layerType() != QLatin1String( 
"LinePatternFill" ) )
 
 3112    mDistanceUnitWidget->blockSignals( 
true );
 
 3115    mDistanceUnitWidget->blockSignals( 
false );
 
 3116    mOffsetUnitWidget->blockSignals( 
true );
 
 3119    mOffsetUnitWidget->blockSignals( 
false );
 
 
 3137void QgsLinePatternFillSymbolLayerWidget::mAngleSpinBox_valueChanged( 
double d )
 
 3146void QgsLinePatternFillSymbolLayerWidget::mDistanceSpinBox_valueChanged( 
double d )
 
 3155void QgsLinePatternFillSymbolLayerWidget::mOffsetSpinBox_valueChanged( 
double d )
 
 3164void QgsLinePatternFillSymbolLayerWidget::mDistanceUnitWidget_changed()
 
 3174void QgsLinePatternFillSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 3190  connect( mHorizontalDistanceSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceSpinBox_valueChanged );
 
 3191  connect( mVerticalDistanceSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceSpinBox_valueChanged );
 
 3192  connect( mHorizontalDisplacementSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementSpinBox_valueChanged );
 
 3193  connect( mVerticalDisplacementSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementSpinBox_valueChanged );
 
 3194  connect( mHorizontalOffsetSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetSpinBox_valueChanged );
 
 3195  connect( mVerticalOffsetSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetSpinBox_valueChanged );
 
 3196  connect( mHorizontalDistanceUnitWidget, &
QgsUnitSelectionWidget::changed, 
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceUnitWidget_changed );
 
 3197  connect( mVerticalDistanceUnitWidget, &
QgsUnitSelectionWidget::changed, 
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceUnitWidget_changed );
 
 3198  connect( mHorizontalDisplacementUnitWidget, &
QgsUnitSelectionWidget::changed, 
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementUnitWidget_changed );
 
 3199  connect( mVerticalDisplacementUnitWidget, &
QgsUnitSelectionWidget::changed, 
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementUnitWidget_changed );
 
 3200  connect( mHorizontalOffsetUnitWidget, &
QgsUnitSelectionWidget::changed, 
this, &QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetUnitWidget_changed );
 
 3201  connect( mVerticalOffsetUnitWidget, &
QgsUnitSelectionWidget::changed, 
this, &QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetUnitWidget_changed );
 
 3213  connect( mClipModeComboBox, qOverload<int>( &QComboBox::currentIndexChanged ), 
this, [
this] {
 
 3223  connect( mCoordinateReferenceComboBox, qOverload<int>( &QComboBox::currentIndexChanged ), 
this, [
this] {
 
 3231  mSeedSpinBox->setShowClearButton( 
true );
 
 3232  mSeedSpinBox->setClearValue( 0 );
 
 3233  mRandomXSpinBox->setClearValue( 0 );
 
 3234  mRandomYSpinBox->setClearValue( 0 );
 
 3238  connect( mRandomXSpinBox, qOverload<double>( &QDoubleSpinBox::valueChanged ), 
this, [
this]( 
double d ) {
 
 3245  connect( mRandomYSpinBox, qOverload<double>( &QDoubleSpinBox::valueChanged ), 
this, [
this]( 
double d ) {
 
 3268  connect( mSeedSpinBox, qOverload<int>( &QSpinBox::valueChanged ), 
this, [
this]( 
int v ) {
 
 3276  mAngleSpinBox->setShowClearButton( 
true );
 
 3277  mAngleSpinBox->setClearValue( 0 );
 
 3278  connect( mAngleSpinBox, qOverload<double>( &QDoubleSpinBox::valueChanged ), 
this, [
this]( 
double d ) {
 
 
 3289  if ( !layer || layer->
layerType() != QLatin1String( 
"PointPatternFill" ) )
 
 3303  mHorizontalDistanceUnitWidget->blockSignals( 
true );
 
 3306  mHorizontalDistanceUnitWidget->blockSignals( 
false );
 
 3307  mVerticalDistanceUnitWidget->blockSignals( 
true );
 
 3310  mVerticalDistanceUnitWidget->blockSignals( 
false );
 
 3311  mHorizontalDisplacementUnitWidget->blockSignals( 
true );
 
 3314  mHorizontalDisplacementUnitWidget->blockSignals( 
false );
 
 3315  mVerticalDisplacementUnitWidget->blockSignals( 
true );
 
 3318  mVerticalDisplacementUnitWidget->blockSignals( 
false );
 
 3319  mHorizontalOffsetUnitWidget->blockSignals( 
true );
 
 3322  mHorizontalOffsetUnitWidget->blockSignals( 
false );
 
 3323  mVerticalOffsetUnitWidget->blockSignals( 
true );
 
 3326  mVerticalOffsetUnitWidget->blockSignals( 
false );
 
 
 3358void QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceSpinBox_valueChanged( 
double d )
 
 3367void QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceSpinBox_valueChanged( 
double d )
 
 3376void QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementSpinBox_valueChanged( 
double d )
 
 3385void QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementSpinBox_valueChanged( 
double d )
 
 3394void QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetSpinBox_valueChanged( 
double d )
 
 3403void QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetSpinBox_valueChanged( 
double d )
 
 3412void QgsPointPatternFillSymbolLayerWidget::mHorizontalDistanceUnitWidget_changed()
 
 3422void QgsPointPatternFillSymbolLayerWidget::mVerticalDistanceUnitWidget_changed()
 
 3432void QgsPointPatternFillSymbolLayerWidget::mHorizontalDisplacementUnitWidget_changed()
 
 3442void QgsPointPatternFillSymbolLayerWidget::mVerticalDisplacementUnitWidget_changed()
 
 3452void QgsPointPatternFillSymbolLayerWidget::mHorizontalOffsetUnitWidget_changed()
 
 3462void QgsPointPatternFillSymbolLayerWidget::mVerticalOffsetUnitWidget_changed()
 
 3493  connect( mStrokeWidthSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
 
 3494  connect( mHorizontalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
 
 3495  connect( mVerticalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
 
 3502  scrollArea->setVerticalOnly( 
true );
 
 3504  btnColor->setAllowOpacity( 
true );
 
 3505  btnColor->setColorDialogTitle( tr( 
"Select Symbol Fill Color" ) );
 
 3506  btnColor->setContext( QStringLiteral( 
"symbology" ) );
 
 3507  btnStrokeColor->setAllowOpacity( 
true );
 
 3508  btnStrokeColor->setColorDialogTitle( tr( 
"Select Symbol Stroke Color" ) );
 
 3509  btnStrokeColor->setContext( QStringLiteral( 
"symbology" ) );
 
 3511  mColorDDBtn->registerLinkedWidget( btnColor );
 
 3512  mStrokeColorDDBtn->registerLinkedWidget( btnStrokeColor );
 
 3514  spinOffsetX->setClearValue( 0.0 );
 
 3515  spinOffsetY->setClearValue( 0.0 );
 
 3516  spinAngle->setClearValue( 0.0 );
 
 3522    mSizeDDBtn->setSymbol( mAssistantPreviewSymbol );
 
 3525  connect( mFontStyleComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::mFontStyleComboBox_currentIndexChanged );
 
 3527  connect( cboJoinStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::penJoinStyleChanged );
 
 3530  connect( cboJoinStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::penJoinStyleChanged );
 
 3532  connect( spinOffsetX, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::setOffset );
 
 3533  connect( spinOffsetY, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsFontMarkerSymbolLayerWidget::setOffset );
 
 
 3544  if ( layer->
layerType() != QLatin1String( 
"FontMarker" ) )
 
 3553  mFontStyleComboBox->blockSignals( 
true );
 
 3554  populateFontStyleComboBox();
 
 3555  mFontStyleComboBox->blockSignals( 
false );
 
 3573  mCharPreview->
setFont( mRefFont );
 
 3579  mSizeUnitWidget->blockSignals( 
true );
 
 3582  mSizeUnitWidget->blockSignals( 
false );
 
 3584  mStrokeWidthUnitWidget->blockSignals( 
true );
 
 3587  mStrokeWidthUnitWidget->blockSignals( 
false );
 
 3589  mOffsetUnitWidget->blockSignals( 
true );
 
 3592  mOffsetUnitWidget->blockSignals( 
false );
 
 3613  updateAssistantSymbol();
 
 
 3628    mCharPreview->setFont( mRefFont );
 
 3629    populateFontStyleComboBox();
 
 
 3634void QgsFontMarkerSymbolLayerWidget::setFontStyle( 
const QString &style )
 
 3641    mCharPreview->setFont( mRefFont );
 
 3673  mCharPreview->setText( text );
 
 3675  if ( text.isEmpty() )
 
 3679  QString character = text;
 
 3680  if ( text.contains( QRegularExpression( QStringLiteral( 
"^0x[0-9a-fA-F]{1,4}$" ) ) ) )
 
 3683    const unsigned int value = text.toUInt( &ok, 0 );
 
 3686      character = QChar( value );
 
 3687      mCharPreview->setText( character );
 
 
 3708  if ( 
mLayer->
character().length() > 1 || QGuiApplication::keyboardModifiers() & Qt::ControlModifier )
 
 3710    mCharLineEdit->insert( chr );
 
 3716  mCharPreview->setText( chr );
 
 
 3720void QgsFontMarkerSymbolLayerWidget::setOffset()
 
 3722  mLayer->
setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
 
 3726void QgsFontMarkerSymbolLayerWidget::penJoinStyleChanged()
 
 3732void QgsFontMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
 
 3742void QgsFontMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 3752void QgsFontMarkerSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
 
 3762void QgsFontMarkerSymbolLayerWidget::populateFontStyleComboBox()
 
 3764  mFontStyleComboBox->clear();
 
 3765  const QStringList styles = mFontDB.styles( mRefFont.family() );
 
 3766  const auto constStyles = styles;
 
 3767  for ( 
const QString &style : constStyles )
 
 3769    mFontStyleComboBox->addItem( style );
 
 3772  QString targetStyle = mFontDB.styleString( mRefFont );
 
 3773  if ( !styles.contains( targetStyle ) )
 
 3776    targetStyle = QFontInfo( f ).styleName();
 
 3777    mRefFont.setStyleName( targetStyle );
 
 3780  const int stylIndx = mFontStyleComboBox->findText( targetStyle );
 
 3781  if ( stylIndx > -1 )
 
 3786  mFontStyleComboBox->setCurrentIndex( curIndx );
 
 3789void QgsFontMarkerSymbolLayerWidget::mFontStyleComboBox_currentIndexChanged( 
int index )
 
 3792  setFontStyle( mFontStyleComboBox->currentText() );
 
 3795void QgsFontMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged( 
int )
 
 3804void QgsFontMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged( 
int )
 
 3813void QgsFontMarkerSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged( 
double d )
 
 3822void QgsFontMarkerSymbolLayerWidget::updateAssistantSymbol()
 
 3824  for ( 
int i = mAssistantPreviewSymbol->symbolLayerCount() - 1; i >= 0; --i )
 
 3826    mAssistantPreviewSymbol->deleteSymbolLayer( i );
 
 3828  mAssistantPreviewSymbol->appendSymbolLayer( 
mLayer->
clone() );
 
 3831    mAssistantPreviewSymbol->setDataDefinedSize( ddSize );
 
 3843  connect( mDrawInsideCheckBox, &QCheckBox::stateChanged, 
this, &QgsCentroidFillSymbolLayerWidget::mDrawInsideCheckBox_stateChanged );
 
 3844  connect( mDrawAllPartsCheckBox, &QCheckBox::stateChanged, 
this, &QgsCentroidFillSymbolLayerWidget::mDrawAllPartsCheckBox_stateChanged );
 
 3845  connect( mClipPointsCheckBox, &QCheckBox::stateChanged, 
this, &QgsCentroidFillSymbolLayerWidget::mClipPointsCheckBox_stateChanged );
 
 3846  connect( mClipOnCurrentPartOnlyCheckBox, &QCheckBox::stateChanged, 
this, &QgsCentroidFillSymbolLayerWidget::mClipOnCurrentPartOnlyCheckBox_stateChanged );
 
 
 3851  if ( layer->
layerType() != QLatin1String( 
"CentroidFill" ) )
 
 
 3869void QgsCentroidFillSymbolLayerWidget::mDrawInsideCheckBox_stateChanged( 
int state )
 
 3875void QgsCentroidFillSymbolLayerWidget::mDrawAllPartsCheckBox_stateChanged( 
int state )
 
 3881void QgsCentroidFillSymbolLayerWidget::mClipPointsCheckBox_stateChanged( 
int state )
 
 3887void QgsCentroidFillSymbolLayerWidget::mClipOnCurrentPartOnlyCheckBox_stateChanged( 
int state )
 
 3910  mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral( 
"/UI/lastRasterMarkerImageDir" ) );
 
 3914  connect( mRotationSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::setAngle );
 
 3916  connect( mWidthSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::setWidth );
 
 3917  connect( mHeightSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::setHeight );
 
 3923  mSpinOffsetX->setClearValue( 0.0 );
 
 3924  mSpinOffsetY->setClearValue( 0.0 );
 
 3925  mRotationSpinBox->setClearValue( 0.0 );
 
 3927  connect( mSpinOffsetX, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::setOffset );
 
 3928  connect( mSpinOffsetY, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::setOffset );
 
 3931  connect( mHorizontalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
 
 3932  connect( mVerticalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsRasterMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
 
 
 3942  if ( layer->
layerType() != QLatin1String( 
"RasterMarker" ) )
 
 3953  mHeightSpinBox->blockSignals( 
true );
 
 3954  if ( preservedAspectRatio )
 
 3963  mHeightSpinBox->blockSignals( 
false );
 
 3964  whileBlocking( mLockAspectRatio )->setLocked( preservedAspectRatio );
 
 3972  mSizeUnitWidget->blockSignals( 
true );
 
 3975  mSizeUnitWidget->blockSignals( 
false );
 
 3976  mOffsetUnitWidget->blockSignals( 
true );
 
 3979  mOffsetUnitWidget->blockSignals( 
false );
 
 3994  updatePreviewImage();
 
 
 4008void QgsRasterMarkerSymbolLayerWidget::imageSourceChanged( 
const QString &text )
 
 4011  updatePreviewImage();
 
 4015void QgsRasterMarkerSymbolLayerWidget::updatePreviewImage()
 
 4017  bool fitsInCache = 
false;
 
 4019  if ( image.isNull() )
 
 4021    mLabelImagePreview->setPixmap( QPixmap() );
 
 4025  QImage previewImage( 150, 150, QImage::Format_ARGB32 );
 
 4026  previewImage.fill( Qt::transparent );
 
 4027  const QRect imageRect( ( 150 - image.width() ) / 2.0, ( 150 - image.height() ) / 2.0, image.width(), image.height() );
 
 4029  p.begin( &previewImage );
 
 4031  uchar pixDataRGB[] = { 150, 150, 150, 150, 100, 100, 100, 150, 100, 100, 100, 150, 150, 150, 150, 150 };
 
 4032  const QImage img( pixDataRGB, 2, 2, 8, QImage::Format_ARGB32 );
 
 4033  const QPixmap pix = QPixmap::fromImage( img.scaled( 8, 8 ) );
 
 4034  QBrush checkerBrush;
 
 4035  checkerBrush.setTexture( pix );
 
 4036  p.fillRect( imageRect, checkerBrush );
 
 4043  p.drawImage( imageRect.left(), imageRect.top(), image );
 
 4045  mLabelImagePreview->setPixmap( QPixmap::fromImage( previewImage ) );
 
 4048void QgsRasterMarkerSymbolLayerWidget::setWidth()
 
 4051  double fixedAspectRatio = 0.0;
 
 4052  mHeightSpinBox->blockSignals( 
true );
 
 4053  if ( defaultAspectRatio <= 0.0 )
 
 4055    mHeightSpinBox->setValue( mWidthSpinBox->value() );
 
 4057  else if ( mLockAspectRatio->locked() )
 
 4059    mHeightSpinBox->setValue( mWidthSpinBox->value() * defaultAspectRatio );
 
 4063    fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
 
 4065  mHeightSpinBox->blockSignals( 
false );
 
 4071void QgsRasterMarkerSymbolLayerWidget::setHeight()
 
 4074  double fixedAspectRatio = 0.0;
 
 4075  mWidthSpinBox->blockSignals( 
true );
 
 4076  if ( defaultAspectRatio <= 0.0 )
 
 4078    mWidthSpinBox->setValue( mHeightSpinBox->value() );
 
 4080  else if ( mLockAspectRatio->locked() )
 
 4082    mWidthSpinBox->setValue( mHeightSpinBox->value() / defaultAspectRatio );
 
 4086    fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
 
 4088  mWidthSpinBox->blockSignals( 
false );
 
 4094void QgsRasterMarkerSymbolLayerWidget::setLockAspectRatio( 
const bool locked )
 
 4097  if ( defaultAspectRatio <= 0.0 )
 
 4112void QgsRasterMarkerSymbolLayerWidget::setAngle()
 
 4118void QgsRasterMarkerSymbolLayerWidget::setOpacity( 
double value )
 
 4122  updatePreviewImage();
 
 4125void QgsRasterMarkerSymbolLayerWidget::setOffset()
 
 4127  mLayer->
setOffset( QPointF( mSpinOffsetX->value(), mSpinOffsetY->value() ) );
 
 4131void QgsRasterMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
 
 4141void QgsRasterMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 4151void QgsRasterMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged( 
int )
 
 4160void QgsRasterMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged( 
int )
 
 4187  mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral( 
"/UI/lastAnimatedMarkerImageDir" ) );
 
 4191  connect( mRotationSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsAnimatedMarkerSymbolLayerWidget::setAngle );
 
 4193  connect( mWidthSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsAnimatedMarkerSymbolLayerWidget::setWidth );
 
 4194  connect( mHeightSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsAnimatedMarkerSymbolLayerWidget::setHeight );
 
 4197  mFrameRateSpin->setClearValue( 10 );
 
 4198  mFrameRateSpin->setShowClearButton( 
true );
 
 4199  connect( mFrameRateSpin, qOverload<double>( &QDoubleSpinBox::valueChanged ), 
this, [
this]( 
double value ) {
 
 4207  mSpinOffsetX->setClearValue( 0.0 );
 
 4208  mSpinOffsetY->setClearValue( 0.0 );
 
 4209  mRotationSpinBox->setClearValue( 0.0 );
 
 4211  connect( mSpinOffsetX, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsAnimatedMarkerSymbolLayerWidget::setOffset );
 
 4212  connect( mSpinOffsetY, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsAnimatedMarkerSymbolLayerWidget::setOffset );
 
 4215  connect( mHorizontalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsAnimatedMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
 
 4216  connect( mVerticalAnchorComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsAnimatedMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
 
 
 4226  if ( layer->
layerType() != QLatin1String( 
"AnimatedMarker" ) )
 
 4236  if ( firstFrameTime > 0 )
 
 4238    mFrameRateSpin->setClearValue( 1000 / firstFrameTime );
 
 4242    mFrameRateSpin->setClearValue( 10 );
 
 4247  mHeightSpinBox->blockSignals( 
true );
 
 4248  if ( preservedAspectRatio )
 
 4257  mHeightSpinBox->blockSignals( 
false );
 
 4258  whileBlocking( mLockAspectRatio )->setLocked( preservedAspectRatio );
 
 4268  mSizeUnitWidget->blockSignals( 
true );
 
 4271  mSizeUnitWidget->blockSignals( 
false );
 
 4272  mOffsetUnitWidget->blockSignals( 
true );
 
 4275  mOffsetUnitWidget->blockSignals( 
false );
 
 4290  updatePreviewImage();
 
 
 4304void QgsAnimatedMarkerSymbolLayerWidget::imageSourceChanged( 
const QString &text )
 
 4309  if ( firstFrameTime > 0 )
 
 4311    mFrameRateSpin->setClearValue( 1000 / firstFrameTime );
 
 4315    mFrameRateSpin->setClearValue( 10 );
 
 4317  updatePreviewImage();
 
 4321void QgsAnimatedMarkerSymbolLayerWidget::updatePreviewImage()
 
 4323  if ( mPreviewMovie )
 
 4325    mLabelImagePreview->setMovie( 
nullptr );
 
 4326    mPreviewMovie->deleteLater();
 
 4327    mPreviewMovie = 
nullptr;
 
 4330  mPreviewMovie = 
new QMovie( 
mLayer->
path(), QByteArray(), 
this );
 
 4331  mPreviewMovie->setScaledSize( QSize( 150, 150 ) );
 
 4332  mLabelImagePreview->setMovie( mPreviewMovie );
 
 4333  mPreviewMovie->start();
 
 4336void QgsAnimatedMarkerSymbolLayerWidget::setWidth()
 
 4339  double fixedAspectRatio = 0.0;
 
 4340  mHeightSpinBox->blockSignals( 
true );
 
 4341  if ( defaultAspectRatio <= 0.0 )
 
 4343    mHeightSpinBox->setValue( mWidthSpinBox->value() );
 
 4345  else if ( mLockAspectRatio->locked() )
 
 4347    mHeightSpinBox->setValue( mWidthSpinBox->value() * defaultAspectRatio );
 
 4351    fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
 
 4353  mHeightSpinBox->blockSignals( 
false );
 
 4359void QgsAnimatedMarkerSymbolLayerWidget::setHeight()
 
 4362  double fixedAspectRatio = 0.0;
 
 4363  mWidthSpinBox->blockSignals( 
true );
 
 4364  if ( defaultAspectRatio <= 0.0 )
 
 4366    mWidthSpinBox->setValue( mHeightSpinBox->value() );
 
 4368  else if ( mLockAspectRatio->locked() )
 
 4370    mWidthSpinBox->setValue( mHeightSpinBox->value() / defaultAspectRatio );
 
 4374    fixedAspectRatio = mHeightSpinBox->value() / mWidthSpinBox->value();
 
 4376  mWidthSpinBox->blockSignals( 
false );
 
 4382void QgsAnimatedMarkerSymbolLayerWidget::setLockAspectRatio( 
const bool locked )
 
 4385  if ( defaultAspectRatio <= 0.0 )
 
 4400void QgsAnimatedMarkerSymbolLayerWidget::setAngle()
 
 4406void QgsAnimatedMarkerSymbolLayerWidget::setOpacity( 
double value )
 
 4410  updatePreviewImage();
 
 4413void QgsAnimatedMarkerSymbolLayerWidget::setOffset()
 
 4415  mLayer->
setOffset( QPointF( mSpinOffsetX->value(), mSpinOffsetY->value() ) );
 
 4419void QgsAnimatedMarkerSymbolLayerWidget::mSizeUnitWidget_changed()
 
 4429void QgsAnimatedMarkerSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 4439void QgsAnimatedMarkerSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged( 
int )
 
 4448void QgsAnimatedMarkerSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged( 
int )
 
 4465  mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral( 
"/UI/lastRasterMarkerImageDir" ) );
 
 4469  connect( mRotationSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterFillSymbolLayerWidget::mRotationSpinBox_valueChanged );
 
 4480  connect( mWidthSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, [
this]( 
double d ) {
 
 4489  connect( mHeightSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, [
this]( 
double d ) {
 
 4501  mSpinOffsetX->setClearValue( 0.0 );
 
 4502  mSpinOffsetY->setClearValue( 0.0 );
 
 4503  mRotationSpinBox->setClearValue( 0.0 );
 
 4505  connect( cboCoordinateMode, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsRasterFillSymbolLayerWidget::setCoordinateMode );
 
 4506  connect( mSpinOffsetX, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterFillSymbolLayerWidget::offsetChanged );
 
 4507  connect( mSpinOffsetY, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsRasterFillSymbolLayerWidget::offsetChanged );
 
 
 4519  if ( layer->
layerType() != QLatin1String( 
"RasterFill" ) )
 
 4532  cboCoordinateMode->blockSignals( 
true );
 
 4536      cboCoordinateMode->setCurrentIndex( 1 );
 
 4540      cboCoordinateMode->setCurrentIndex( 0 );
 
 4543  cboCoordinateMode->blockSignals( 
false );
 
 4549  mOffsetUnitWidget->blockSignals( 
true );
 
 4552  mOffsetUnitWidget->blockSignals( 
false );
 
 4555  mSizeUnitWidget->blockSignals( 
true );
 
 4558  mSizeUnitWidget->blockSignals( 
false );
 
 4562  updatePreviewImage();
 
 
 4577void QgsRasterFillSymbolLayerWidget::imageSourceChanged( 
const QString &text )
 
 4580  updatePreviewImage();
 
 4584void QgsRasterFillSymbolLayerWidget::setCoordinateMode( 
int index )
 
 4601void QgsRasterFillSymbolLayerWidget::opacityChanged( 
double value )
 
 4610  updatePreviewImage();
 
 4613void QgsRasterFillSymbolLayerWidget::offsetChanged()
 
 4615  mLayer->
setOffset( QPointF( mSpinOffsetX->value(), mSpinOffsetY->value() ) );
 
 4619void QgsRasterFillSymbolLayerWidget::mOffsetUnitWidget_changed()
 
 4630void QgsRasterFillSymbolLayerWidget::mRotationSpinBox_valueChanged( 
double d )
 
 4639void QgsRasterFillSymbolLayerWidget::updatePreviewImage()
 
 4641  bool fitsInCache = 
false;
 
 4643  if ( image.isNull() )
 
 4645    mLabelImagePreview->setPixmap( QPixmap() );
 
 4649  QImage previewImage( 150, 150, QImage::Format_ARGB32 );
 
 4650  previewImage.fill( Qt::transparent );
 
 4651  const QRect imageRect( ( 150 - image.width() ) / 2.0, ( 150 - image.height() ) / 2.0, image.width(), image.height() );
 
 4653  p.begin( &previewImage );
 
 4655  uchar pixDataRGB[] = { 150, 150, 150, 150, 100, 100, 100, 150, 100, 100, 100, 150, 150, 150, 150, 150 };
 
 4656  const QImage img( pixDataRGB, 2, 2, 8, QImage::Format_ARGB32 );
 
 4657  const QPixmap pix = QPixmap::fromImage( img.scaled( 8, 8 ) );
 
 4658  QBrush checkerBrush;
 
 4659  checkerBrush.setTexture( pix );
 
 4660  p.fillRect( imageRect, checkerBrush );
 
 4667  p.drawImage( imageRect.left(), imageRect.top(), image );
 
 4669  mLabelImagePreview->setPixmap( QPixmap::fromImage( previewImage ) );
 
 4683  mImageSourceLineEdit->setLastPathSettingsKey( QStringLiteral( 
"/UI/lastRasterMarkerImageDir" ) );
 
 4697  connect( spinWidth, qOverload<double>( &QDoubleSpinBox::valueChanged ), 
this, [
this] {
 
 4715  spinOffset->setClearValue( 0.0 );
 
 4716  connect( spinOffset, qOverload<double>( &QDoubleSpinBox::valueChanged ), 
this, [
this]( 
double val ) {
 
 4724  connect( cboCapStyle, qOverload<int>( &QComboBox::currentIndexChanged ), 
this, [
this] {
 
 4731  connect( cboJoinStyle, qOverload<int>( &QComboBox::currentIndexChanged ), 
this, [
this] {
 
 4744      updatePreviewImage();
 
 
 4757  if ( layer->
layerType() != QLatin1String( 
"RasterLine" ) )
 
 4781  updatePreviewImage();
 
 
 4796void QgsRasterLineSymbolLayerWidget::imageSourceChanged( 
const QString &text )
 
 4799  updatePreviewImage();
 
 4803void QgsRasterLineSymbolLayerWidget::updatePreviewImage()
 
 4805  bool fitsInCache = 
false;
 
 4807  if ( image.isNull() )
 
 4809    mLabelImagePreview->setPixmap( QPixmap() );
 
 4813  QImage previewImage( 150, 150, QImage::Format_ARGB32 );
 
 4814  previewImage.fill( Qt::transparent );
 
 4815  const QRect imageRect( ( 150 - image.width() ) / 2.0, ( 150 - image.height() ) / 2.0, image.width(), image.height() );
 
 4817  p.begin( &previewImage );
 
 4819  uchar pixDataRGB[] = { 150, 150, 150, 150, 100, 100, 100, 150, 100, 100, 100, 150, 150, 150, 150, 150 };
 
 4820  const QImage img( pixDataRGB, 2, 2, 8, QImage::Format_ARGB32 );
 
 4821  const QPixmap pix = QPixmap::fromImage( img.scaled( 8, 8 ) );
 
 4822  QBrush checkerBrush;
 
 4823  checkerBrush.setTexture( pix );
 
 4824  p.fillRect( imageRect, checkerBrush );
 
 4831  p.drawImage( imageRect.left(), imageRect.top(), image );
 
 4833  mLabelImagePreview->setPixmap( QPixmap::fromImage( previewImage ) );
 
 4846  modificationExpressionSelector->setMultiLine( 
true );
 
 4847  modificationExpressionSelector->setLayer( 
const_cast<QgsVectorLayer *
>( vl ) );
 
 4848  modificationExpressionSelector->registerExpressionContextGenerator( 
this );
 
 4854  mUnitWidget->setShowMapScaleButton( 
false );
 
 4857  connect( cbxGeometryType, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsGeometryGeneratorSymbolLayerWidget::updateSymbolType );
 
 4859    if ( !mBlockSignals )
 
 4861      mLayer->
setUnits( mUnitWidget->unit() );
 
 
 4872  cbxGeometryType->setCurrentIndex( cbxGeometryType->findData( 
static_cast<int>( mLayer->
symbolType() ) ) );
 
 4873  mUnitWidget->setUnit( mLayer->
units() );
 
 
 4882void QgsGeometryGeneratorSymbolLayerWidget::updateExpression( 
const QString &
string )
 
 4889void QgsGeometryGeneratorSymbolLayerWidget::updateSymbolType()
 
 4892  std::unique_ptr<QgsSymbol> subSymbol( mLayer->
subSymbol()->
clone() );
 
 4907        for ( 
int i = 0; i < subSymbol->symbolLayerCount(); ++i )
 
 4910            layers << subSymbol->symbolLayer( i )->clone();
 
 4913        if ( !layers.empty() )
 
 4923        for ( 
int i = 0; i < subSymbol->symbolLayerCount(); ++i )
 
 4924          layers << subSymbol->symbolLayer( i )->clone();
 
 4946  mPointCountSpinBox->setShowClearButton( 
true );
 
 4947  mPointCountSpinBox->setClearValue( 100 );
 
 4948  mSeedSpinBox->setShowClearButton( 
true );
 
 4949  mSeedSpinBox->setClearValue( 0 );
 
 4951  connect( mCountMethodComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, &QgsRandomMarkerFillSymbolLayerWidget::countMethodChanged );
 
 4952  connect( mPointCountSpinBox, 
static_cast<void ( QSpinBox::* )( 
int )
>( &QSpinBox::valueChanged ), 
this, &QgsRandomMarkerFillSymbolLayerWidget::countChanged );
 
 4953  connect( mDensityAreaSpinBox, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, &QgsRandomMarkerFillSymbolLayerWidget::densityAreaChanged );
 
 4954  connect( mSeedSpinBox, 
static_cast<void ( QSpinBox::* )( 
int )
>( &QSpinBox::valueChanged ), 
this, &QgsRandomMarkerFillSymbolLayerWidget::seedChanged );
 
 4955  connect( mClipPointsCheckBox, &QCheckBox::toggled, 
this, [
this]( 
bool checked ) {
 
 
 4970  if ( !layer || layer->
layerType() != QLatin1String( 
"RandomMarkerFill" ) )
 
 4980  bool showDensityBasedCountWidgets = 
false;
 
 4984      showDensityBasedCountWidgets = 
true;
 
 4989  mDensityAreaLabel->setVisible( showDensityBasedCountWidgets );
 
 4990  mDensityAreaSpinBox->setVisible( showDensityBasedCountWidgets );
 
 4991  mDensityAreaUnitWidget->setVisible( showDensityBasedCountWidgets );
 
 4992  mDensityAreaDdbtn->setVisible( showDensityBasedCountWidgets );
 
 4994  whileBlocking( mCountMethodComboBox )->setCurrentIndex( mCountMethodComboBox->findData( 
static_cast<int>( mLayer->
countMethod() ) ) );
 
 4996  mDensityAreaUnitWidget->blockSignals( 
true );
 
 4999  mDensityAreaUnitWidget->blockSignals( 
false );
 
 
 5012void QgsRandomMarkerFillSymbolLayerWidget::countMethodChanged( 
int )
 
 5014  bool showDensityBasedCountWidgets = 
false;
 
 5018      showDensityBasedCountWidgets = 
true;
 
 5023  mDensityAreaLabel->setVisible( showDensityBasedCountWidgets );
 
 5024  mDensityAreaSpinBox->setVisible( showDensityBasedCountWidgets );
 
 5025  mDensityAreaUnitWidget->setVisible( showDensityBasedCountWidgets );
 
 5026  mDensityAreaDdbtn->setVisible( showDensityBasedCountWidgets );
 
 5035void QgsRandomMarkerFillSymbolLayerWidget::countChanged( 
int d )
 
 5044void QgsRandomMarkerFillSymbolLayerWidget::densityAreaChanged( 
double d )
 
 5053void QgsRandomMarkerFillSymbolLayerWidget::densityAreaUnitChanged()
 
 5063void QgsRandomMarkerFillSymbolLayerWidget::seedChanged( 
int d )
 
 5082  btnColorRamp->setShowGradientOnly( 
true );
 
 5084  btnChangeColor->setAllowOpacity( 
true );
 
 5085  btnChangeColor->setColorDialogTitle( tr( 
"Select Gradient Color" ) );
 
 5086  btnChangeColor->setContext( QStringLiteral( 
"symbology" ) );
 
 5087  btnChangeColor->setShowNoColor( 
true );
 
 5088  btnChangeColor->setNoColorString( tr( 
"Transparent" ) );
 
 5089  btnChangeColor2->setAllowOpacity( 
true );
 
 5090  btnChangeColor2->setColorDialogTitle( tr( 
"Select Gradient Color" ) );
 
 5091  btnChangeColor2->setContext( QStringLiteral( 
"symbology" ) );
 
 5092  btnChangeColor2->setShowNoColor( 
true );
 
 5093  btnChangeColor2->setNoColorString( tr( 
"Transparent" ) );
 
 5095  mStartColorDDBtn->registerLinkedWidget( btnChangeColor );
 
 5096  mEndColorDDBtn->registerLinkedWidget( btnChangeColor2 );
 
 5113    if ( btnColorRamp->isNull() )
 
 5123  connect( radioTwoColor, &QAbstractButton::toggled, 
this, [
this] {
 
 5126      if ( radioTwoColor->isChecked() )
 
 5128        mLayer->setGradientColorType( Qgis::GradientColorSource::SimpleTwoColor );
 
 5129        btnChangeColor->setEnabled( true );
 
 5130        btnChangeColor2->setEnabled( true );
 
 5131        btnColorRamp->setEnabled( false );
 
 5135        mLayer->setGradientColorType( Qgis::GradientColorSource::ColorRamp );
 
 5136        btnColorRamp->setEnabled( true );
 
 5137        btnChangeColor->setEnabled( false );
 
 5138        btnChangeColor2->setEnabled( false );
 
 5156  connect( spinWidth, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, [
this] {
 
 5173  spinOffset->setClearValue( 0.0 );
 
 5174  connect( spinOffset, qOverload<double>( &QDoubleSpinBox::valueChanged ), 
this, [
this]( 
double val ) {
 
 5182  connect( cboCapStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, [
this] {
 
 5189  connect( cboJoinStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, [
this] {
 
 
 5205  if ( layer->
layerType() != QLatin1String( 
"Lineburst" ) )
 
 5216  btnChangeColor->blockSignals( 
true );
 
 5218  btnChangeColor->blockSignals( 
false );
 
 5219  btnChangeColor2->blockSignals( 
true );
 
 5221  btnChangeColor2->blockSignals( 
false );
 
 5225    radioTwoColor->setChecked( 
true );
 
 5226    btnColorRamp->setEnabled( 
false );
 
 5230    radioColorRamp->setChecked( 
true );
 
 5231    btnChangeColor->setEnabled( 
false );
 
 5232    btnChangeColor2->setEnabled( 
false );
 
 5238    btnColorRamp->blockSignals( 
true );
 
 5240    btnColorRamp->blockSignals( 
false );
 
 
 5289  connect( spinWidth, 
static_cast<void ( QDoubleSpinBox::* )( 
double )
>( &QDoubleSpinBox::valueChanged ), 
this, [
this] {
 
 5292      mLayer->
setWidth( spinWidth->value() );
 
 5306  spinOffset->setClearValue( 0.0 );
 
 5307  connect( spinOffset, qOverload<double>( &QDoubleSpinBox::valueChanged ), 
this, [
this]( 
double val ) {
 
 5315  connect( cboCapStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, [
this] {
 
 5322  connect( cboJoinStyle, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ), 
this, [
this] {
 
 
 5340  if ( layer->
layerType() != QLatin1String( 
"FilledLine" ) )
 
 
 5393  mSpinSkipMultiples->setClearValue( 0, tr( 
"Not set" ) );
 
 5394  mSpinLabelOffsetX->setClearValue( 0 );
 
 5395  mSpinLabelOffsetY->setClearValue( 0 );
 
 5396  mSpinAverageAngleLength->setClearValue( 4.0 );
 
 5400  connect( mComboQuantity, qOverload<int>( &QComboBox::currentIndexChanged ), 
this, [
this] {
 
 5401    if ( mLayer && !mBlockChangesSignal )
 
 5408    if ( mLayer && !mBlockChangesSignal )
 
 5414  connect( spinInterval, qOverload<double>( &QgsDoubleSpinBox::valueChanged ), 
this, [
this] {
 
 5415    if ( mLayer && !mBlockChangesSignal )
 
 5421  connect( mSpinSkipMultiples, qOverload<double>( &QgsDoubleSpinBox::valueChanged ), 
this, [
this] {
 
 5422    if ( mLayer && !mBlockChangesSignal )
 
 5428  connect( mCheckRotate, &QCheckBox::toggled, 
this, [
this]( 
bool checked ) {
 
 5429    if ( mLayer && !mBlockChangesSignal )
 
 5434    mSpinAverageAngleLength->setEnabled( checked );
 
 5435    mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
 
 5437  connect( mCheckShowMarker, &QCheckBox::toggled, 
this, [
this]( 
bool checked ) {
 
 5438    if ( mLayer && !mBlockChangesSignal )
 
 5445  connect( mSpinLabelOffsetX, qOverload<double>( &QgsDoubleSpinBox::valueChanged ), 
this, [
this] {
 
 5446    if ( mLayer && !mBlockChangesSignal )
 
 5448      mLayer->
setLabelOffset( QPointF( mSpinLabelOffsetX->value(), mSpinLabelOffsetY->value() ) );
 
 5452  connect( mSpinLabelOffsetY, qOverload<double>( &QgsDoubleSpinBox::valueChanged ), 
this, [
this] {
 
 5453    if ( mLayer && !mBlockChangesSignal )
 
 5455      mLayer->
setLabelOffset( QPointF( mSpinLabelOffsetX->value(), mSpinLabelOffsetY->value() ) );
 
 5460    if ( mLayer && !mBlockChangesSignal )
 
 5468  connect( mComboPlacement, qOverload<int>( &QComboBox::currentIndexChanged ), 
this, [
this] {
 
 5469    if ( mLayer && !mBlockChangesSignal )
 
 5473      switch ( placement )
 
 5478          mIntervalWidget->show();
 
 5481          mIntervalWidget->hide();
 
 5488  connect( mSpinAverageAngleLength, qOverload<double>( &QgsDoubleSpinBox::valueChanged ), 
this, [
this] {
 
 5489    if ( mLayer && !mBlockChangesSignal )
 
 5496    if ( mLayer && !mBlockChangesSignal )
 
 5504  connect( mNumberFormatPushButton, &QPushButton::clicked, 
this, &QgsLinearReferencingSymbolLayerWidget::changeNumberFormat );
 
 5506  mTextFormatButton->registerExpressionContextGenerator( 
this );
 
 
 5514  if ( !layer || layer->
layerType() != QLatin1String( 
"LinearReferencing" ) )
 
 5518  mLayer = qgis::down_cast<QgsLinearReferencingSymbolLayer *>( layer );
 
 5520  mBlockChangesSignal = 
true;
 
 5522  mComboPlacement->setCurrentIndex( mComboPlacement->findData( QVariant::fromValue( mLayer->
placement() ) ) );
 
 5528      mIntervalWidget->show();
 
 5531      mIntervalWidget->hide();
 
 5535  mComboQuantity->setCurrentIndex( mComboQuantity->findData( QVariant::fromValue( mLayer->
labelSource() ) ) );
 
 5537  mTextFormatButton->setTextFormat( mLayer->
textFormat() );
 
 5538  spinInterval->setValue( mLayer->
interval() );
 
 5541  mCheckShowMarker->setChecked( mLayer->
showMarker() );
 
 5542  mSpinLabelOffsetX->setValue( mLayer->
labelOffset().x() );
 
 5543  mSpinLabelOffsetY->setValue( mLayer->
labelOffset().y() );
 
 5551  mSpinAverageAngleLength->setEnabled( mCheckRotate->isChecked() );
 
 5552  mAverageAngleUnit->setEnabled( mSpinAverageAngleLength->isEnabled() );
 
 5559  mBlockChangesSignal = 
false;
 
 
 5574void QgsLinearReferencingSymbolLayerWidget::changeNumberFormat()
 
 5584      if ( !mBlockChangesSignal )
 
 5596    dialog.registerExpressionContextGenerator( 
this );
 
 5597    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.
 
VerticalAnchorPoint
Marker symbol vertical anchor points.
 
@ Bottom
Align to bottom of symbol.
 
@ Center
Align to vertical center of symbol.
 
@ Baseline
Align to baseline of symbol, e.g. font baseline for font marker symbol layers. Treated as Bottom if n...
 
@ Top
Align to top of symbol.
 
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
 
HorizontalAnchorPoint
Marker symbol horizontal anchor points.
 
@ Center
Align to horizontal center of symbol.
 
@ Right
Align to right side of symbol.
 
@ Left
Align to left side of symbol.
 
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 for entering 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.
 
A marker symbol layer which displays characters rendered using a font.
 
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.
 
void setVerticalAnchorPoint(Qgis::VerticalAnchorPoint v)
Sets the vertical anchor point for positioning the symbol.
 
QPointF offset() const
Returns the marker's offset, which is the horizontal and vertical displacement which the rendered mar...
 
void setOffsetUnit(Qgis::RenderUnit unit)
Sets the units for the symbol's offset.
 
void setAngle(double angle)
Sets the rotation angle for the marker.
 
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.
 
Qgis::VerticalAnchorPoint verticalAnchorPoint() const
Returns the vertical anchor point for positioning the symbol.
 
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the symbol's offset.
 
void setHorizontalAnchorPoint(Qgis::HorizontalAnchorPoint h)
Sets the horizontal anchor point for positioning the symbol.
 
Qgis::RenderUnit offsetUnit() const
Returns the units for the symbol's offset.
 
Qgis::HorizontalAnchorPoint horizontalAnchorPoint() const
Returns the horizontal anchor point for positioning the symbol.
 
Qgis::RenderUnit sizeUnit() const
Returns the units for the symbol's size.
 
void setSizeUnit(Qgis::RenderUnit unit)
Sets the units for the symbol's size.
 
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the symbol's offset.
 
double angle() const
Returns the rotation angle for the marker, in degrees clockwise from north.
 
A marker symbol type, for rendering Point and MultiPoint geometries.
 
A dialog to create a new auxiliary field.
 
A dialog to create a new auxiliary layer.
 
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 fill symbol layer which fills polygons 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 fill symbol layer which fills polygons 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.
 
A fill symbol layer which applies a gradient from the outer edges of a symbol to the inside.
 
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 a 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.
 
A marker symbol layer which renders an SVG graphic.
 
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.
 
Abstract base class for symbol layers.
 
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 dataset.
 
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.