QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgsellipsesymbollayerwidget.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsellipsesymbollayerwidget.cpp
3  ---------------------
4  begin : June 2011
5  copyright : (C) 2011 by Marco Hugentobler
6  email : marco dot hugentobler at sourcepole dot ch
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
16 #include "qgsellipsesymbollayer.h"
17 #include "qgsvectorlayer.h"
18 #include "qgssymbollayerutils.h"
19 #include <QColorDialog>
20 
22  : QgsSymbolLayerWidget( parent, vl )
23 
24 {
25  setupUi( this );
26  connect( mShapeListWidget, &QListWidget::itemSelectionChanged, this, &QgsEllipseSymbolLayerWidget::mShapeListWidget_itemSelectionChanged );
27  connect( mWidthSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsEllipseSymbolLayerWidget::mWidthSpinBox_valueChanged );
28  connect( mHeightSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsEllipseSymbolLayerWidget::mHeightSpinBox_valueChanged );
29  connect( mRotationSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsEllipseSymbolLayerWidget::mRotationSpinBox_valueChanged );
30  connect( mStrokeStyleComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsEllipseSymbolLayerWidget::mStrokeStyleComboBox_currentIndexChanged );
31  connect( mStrokeWidthSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsEllipseSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged );
32  connect( btnChangeColorStroke, &QgsColorButton::colorChanged, this, &QgsEllipseSymbolLayerWidget::btnChangeColorStroke_colorChanged );
33  connect( btnChangeColorFill, &QgsColorButton::colorChanged, this, &QgsEllipseSymbolLayerWidget::btnChangeColorFill_colorChanged );
34  connect( mSymbolWidthUnitWidget, &QgsUnitSelectionWidget::changed, this, &QgsEllipseSymbolLayerWidget::mSymbolWidthUnitWidget_changed );
35  connect( mStrokeWidthUnitWidget, &QgsUnitSelectionWidget::changed, this, &QgsEllipseSymbolLayerWidget::mStrokeWidthUnitWidget_changed );
36  connect( mSymbolHeightUnitWidget, &QgsUnitSelectionWidget::changed, this, &QgsEllipseSymbolLayerWidget::mSymbolHeightUnitWidget_changed );
37  connect( mOffsetUnitWidget, &QgsUnitSelectionWidget::changed, this, &QgsEllipseSymbolLayerWidget::mOffsetUnitWidget_changed );
38  connect( mHorizontalAnchorComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsEllipseSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged );
39  connect( mVerticalAnchorComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsEllipseSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged );
40 
49 
50  btnChangeColorFill->setAllowOpacity( true );
51  btnChangeColorFill->setColorDialogTitle( tr( "Select Fill Color" ) );
52  btnChangeColorFill->setContext( QStringLiteral( "symbology" ) );
53  btnChangeColorFill->setShowNoColor( true );
54  btnChangeColorFill->setNoColorString( tr( "Transparent Fill" ) );
55  btnChangeColorStroke->setAllowOpacity( true );
56  btnChangeColorStroke->setColorDialogTitle( tr( "Select Stroke Color" ) );
57  btnChangeColorStroke->setContext( QStringLiteral( "symbology" ) );
58  btnChangeColorStroke->setShowNoColor( true );
59  btnChangeColorStroke->setNoColorString( tr( "Transparent Stroke" ) );
60 
61  mFillColorDDBtn->registerLinkedWidget( btnChangeColorFill );
62  mStrokeColorDDBtn->registerLinkedWidget( btnChangeColorStroke );
63 
64  spinOffsetX->setClearValue( 0.0 );
65  spinOffsetY->setClearValue( 0.0 );
66  mRotationSpinBox->setClearValue( 0.0 );
67 
68  QStringList names;
69  names << QStringLiteral( "circle" ) << QStringLiteral( "rectangle" ) << QStringLiteral( "diamond" ) << QStringLiteral( "cross" ) << QStringLiteral( "triangle" ) << QStringLiteral( "right_half_triangle" ) << QStringLiteral( "left_half_triangle" ) << QStringLiteral( "semi_circle" );
70 
71  int size = mShapeListWidget->iconSize().width();
72 #if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
73  size = std::max( 30, static_cast< int >( std::round( Qgis::UI_SCALE_FACTOR * fontMetrics().width( 'X' ) * 3 ) ) );
74 #else
75  size = std::max( 30, static_cast< int >( std::round( Qgis::UI_SCALE_FACTOR * fontMetrics().horizontalAdvance( 'X' ) * 3 ) ) );
76 #endif
77  mShapeListWidget->setGridSize( QSize( size * 1.2, size * 1.2 ) );
78  mShapeListWidget->setIconSize( QSize( size, size ) );
79 
80  double markerSize = size * 0.8;
81  const auto constNames = names;
82  for ( const QString &name : constNames )
83  {
87  lyr->setSymbolName( name );
88  lyr->setStrokeColor( QColor( 0, 0, 0 ) );
89  lyr->setFillColor( QColor( 200, 200, 200 ) );
90  lyr->setSymbolWidth( markerSize );
91  lyr->setSymbolHeight( markerSize * 0.75 );
92  QIcon icon = QgsSymbolLayerUtils::symbolLayerPreviewIcon( lyr, QgsUnitTypes::RenderPixels, QSize( size, size ) );
93  QListWidgetItem *item = new QListWidgetItem( icon, QString(), mShapeListWidget );
94  item->setToolTip( name );
95  item->setData( Qt::UserRole, name );
96  delete lyr;
97  }
98  // show at least 2 rows (only 1 row is required, but looks too cramped)
99  mShapeListWidget->setMinimumHeight( mShapeListWidget->gridSize().height() * 2.1 );
100 
101  connect( spinOffsetX, static_cast < void ( QgsDoubleSpinBox::* )( double ) > ( &QgsDoubleSpinBox::valueChanged ), this, &QgsEllipseSymbolLayerWidget::setOffset );
102  connect( spinOffsetY, static_cast < void ( QgsDoubleSpinBox::* )( double ) > ( &QgsDoubleSpinBox::valueChanged ), this, &QgsEllipseSymbolLayerWidget::setOffset );
103  connect( cboJoinStyle, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsEllipseSymbolLayerWidget::penJoinStyleChanged );
104 }
105 
107 {
108  if ( !layer || layer->layerType() != QLatin1String( "EllipseMarker" ) )
109  {
110  return;
111  }
112 
113  mLayer = static_cast<QgsEllipseSymbolLayer *>( layer );
114  mWidthSpinBox->setValue( mLayer->symbolWidth() );
115  mHeightSpinBox->setValue( mLayer->symbolHeight() );
116  mRotationSpinBox->setValue( mLayer->angle() );
117  mStrokeStyleComboBox->setPenStyle( mLayer->strokeStyle() );
118  mStrokeWidthSpinBox->setValue( mLayer->strokeWidth() );
119  btnChangeColorStroke->setColor( mLayer->strokeColor() );
120  btnChangeColorFill->setColor( mLayer->fillColor() );
121 
122  QList<QListWidgetItem *> symbolItemList = mShapeListWidget->findItems( mLayer->symbolName(), Qt::MatchExactly );
123  if ( !symbolItemList.isEmpty() )
124  {
125  mShapeListWidget->setCurrentItem( symbolItemList.at( 0 ) );
126  }
127 
128  //set combo entries to current values
129  blockComboSignals( true );
130  mSymbolWidthUnitWidget->setUnit( mLayer->symbolWidthUnit() );
131  mSymbolWidthUnitWidget->setMapUnitScale( mLayer->symbolWidthMapUnitScale() );
132  mStrokeWidthUnitWidget->setUnit( mLayer->strokeWidthUnit() );
133  mStrokeWidthUnitWidget->setMapUnitScale( mLayer->strokeWidthMapUnitScale() );
134  mSymbolHeightUnitWidget->setUnit( mLayer->symbolHeightUnit() );
135  mSymbolHeightUnitWidget->setMapUnitScale( mLayer->symbolHeightMapUnitScale() );
136  mOffsetUnitWidget->setUnit( mLayer->offsetUnit() );
137  mOffsetUnitWidget->setMapUnitScale( mLayer->offsetMapUnitScale() );
138  QPointF offsetPt = mLayer->offset();
139  spinOffsetX->setValue( offsetPt.x() );
140  spinOffsetY->setValue( offsetPt.y() );
141  mHorizontalAnchorComboBox->setCurrentIndex( mLayer->horizontalAnchorPoint() );
142  mVerticalAnchorComboBox->setCurrentIndex( mLayer->verticalAnchorPoint() );
143  cboJoinStyle->setPenJoinStyle( mLayer->penJoinStyle() );
144  blockComboSignals( false );
145 
158 
159 }
160 
162 {
163  return mLayer;
164 }
165 
166 void QgsEllipseSymbolLayerWidget::mShapeListWidget_itemSelectionChanged()
167 {
168  if ( mLayer )
169  {
170  QListWidgetItem *item = mShapeListWidget->currentItem();
171  if ( item )
172  {
173  mLayer->setSymbolName( item->data( Qt::UserRole ).toString() );
174  emit changed();
175  }
176  }
177 }
178 
179 void QgsEllipseSymbolLayerWidget::mWidthSpinBox_valueChanged( double d )
180 {
181  if ( mLayer )
182  {
183  mLayer->setSymbolWidth( d );
184  emit changed();
185  }
186 }
187 
188 void QgsEllipseSymbolLayerWidget::mHeightSpinBox_valueChanged( double d )
189 {
190  if ( mLayer )
191  {
192  mLayer->setSymbolHeight( d );
193  emit changed();
194  }
195 }
196 
197 void QgsEllipseSymbolLayerWidget::mRotationSpinBox_valueChanged( double d )
198 {
199  if ( mLayer )
200  {
201  mLayer->setAngle( d );
202  emit changed();
203  }
204 }
205 
206 void QgsEllipseSymbolLayerWidget::mStrokeStyleComboBox_currentIndexChanged( int index )
207 {
208  Q_UNUSED( index )
209 
210  if ( mLayer )
211  {
212  mLayer->setStrokeStyle( mStrokeStyleComboBox->penStyle() );
213  emit changed();
214  }
215 }
216 
217 void QgsEllipseSymbolLayerWidget::mStrokeWidthSpinBox_valueChanged( double d )
218 {
219  if ( mLayer )
220  {
221  mLayer->setStrokeWidth( d );
222  emit changed();
223  }
224 }
225 
226 void QgsEllipseSymbolLayerWidget::btnChangeColorStroke_colorChanged( const QColor &newColor )
227 {
228  if ( !mLayer )
229  {
230  return;
231  }
232 
233  mLayer->setStrokeColor( newColor );
234  emit changed();
235 }
236 
237 void QgsEllipseSymbolLayerWidget::btnChangeColorFill_colorChanged( const QColor &newColor )
238 {
239  if ( !mLayer )
240  {
241  return;
242  }
243 
244  mLayer->setFillColor( newColor );
245  emit changed();
246 }
247 
248 void QgsEllipseSymbolLayerWidget::mSymbolWidthUnitWidget_changed()
249 {
250  if ( mLayer )
251  {
252  mLayer->setSymbolWidthUnit( mSymbolWidthUnitWidget->unit() );
253  mLayer->setSymbolWidthMapUnitScale( mSymbolWidthUnitWidget->getMapUnitScale() );
254  emit changed();
255  }
256 }
257 
258 void QgsEllipseSymbolLayerWidget::mStrokeWidthUnitWidget_changed()
259 {
260  if ( mLayer )
261  {
262  mLayer->setStrokeWidthUnit( mStrokeWidthUnitWidget->unit() );
263  mLayer->setStrokeWidthMapUnitScale( mStrokeWidthUnitWidget->getMapUnitScale() );
264  emit changed();
265  }
266 }
267 
268 void QgsEllipseSymbolLayerWidget::mSymbolHeightUnitWidget_changed()
269 {
270  if ( mLayer )
271  {
272  mLayer->setSymbolHeightUnit( mSymbolHeightUnitWidget->unit() );
273  mLayer->setSymbolHeightMapUnitScale( mSymbolHeightUnitWidget->getMapUnitScale() );
274  emit changed();
275  }
276 }
277 
278 void QgsEllipseSymbolLayerWidget::mOffsetUnitWidget_changed()
279 {
280  if ( mLayer )
281  {
282  mLayer->setOffsetUnit( mOffsetUnitWidget->unit() );
283  mLayer->setOffsetMapUnitScale( mOffsetUnitWidget->getMapUnitScale() );
284  emit changed();
285  }
286 }
287 
288 void QgsEllipseSymbolLayerWidget::penJoinStyleChanged()
289 {
290  mLayer->setPenJoinStyle( cboJoinStyle->penJoinStyle() );
291  emit changed();
292 }
293 
294 void QgsEllipseSymbolLayerWidget::blockComboSignals( bool block )
295 {
296  mSymbolWidthUnitWidget->blockSignals( block );
297  mStrokeWidthUnitWidget->blockSignals( block );
298  mSymbolHeightUnitWidget->blockSignals( block );
299  mHorizontalAnchorComboBox->blockSignals( block );
300  mVerticalAnchorComboBox->blockSignals( block );
301  mSymbolWidthUnitWidget->blockSignals( block );
302  mStrokeWidthUnitWidget->blockSignals( block );
303  mSymbolHeightUnitWidget->blockSignals( block );
304  mOffsetUnitWidget->blockSignals( block );
305  cboJoinStyle->blockSignals( block );
306 }
307 
308 void QgsEllipseSymbolLayerWidget::mHorizontalAnchorComboBox_currentIndexChanged( int index )
309 {
310  if ( mLayer )
311  {
313  emit changed();
314  }
315 }
316 
317 void QgsEllipseSymbolLayerWidget::mVerticalAnchorComboBox_currentIndexChanged( int index )
318 {
319  if ( mLayer )
320  {
322  emit changed();
323  }
324 }
325 
326 void QgsEllipseSymbolLayerWidget::setOffset()
327 {
328  mLayer->setOffset( QPointF( spinOffsetX->value(), spinOffsetY->value() ) );
329  emit changed();
330 }
331 
332 
QgsEllipseSymbolLayer::setStrokeWidthUnit
void setStrokeWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's stroke width.
Definition: qgsellipsesymbollayer.h:127
QgsEllipseSymbolLayer::symbolWidthMapUnitScale
const QgsMapUnitScale & symbolWidthMapUnitScale() const
Definition: qgsellipsesymbollayer.h:102
QgsSymbolLayer::PropertyHorizontalAnchor
@ PropertyHorizontalAnchor
Horizontal anchor point.
Definition: qgssymbollayer.h:174
QgsEllipseSymbolLayer::strokeStyle
Qt::PenStyle strokeStyle() const
Definition: qgsellipsesymbollayer.h:62
QgsUnitTypes::RenderInches
@ RenderInches
Inches.
Definition: qgsunittypes.h:173
QgsEllipseSymbolLayer::strokeWidth
double strokeWidth() const
Definition: qgsellipsesymbollayer.h:78
QgsMarkerSymbolLayer::setHorizontalAnchorPoint
void setHorizontalAnchorPoint(HorizontalAnchorPoint h)
Sets the horizontal anchor point for positioning the symbol.
Definition: qgssymbollayer.h:770
QgsMarkerSymbolLayer::VerticalAnchorPoint
VerticalAnchorPoint
Symbol vertical anchor points.
Definition: qgssymbollayer.h:595
QgsSymbolLayerWidget::changed
void changed()
Should be emitted whenever configuration changes happened on this symbol layer configuration.
QgsEllipseSymbolLayer::strokeColor
QColor strokeColor() const override
Gets stroke color.
Definition: qgsellipsesymbollayer.h:84
QgsEllipseSymbolLayer::setSymbolName
void setSymbolName(const QString &name)
Definition: qgsellipsesymbollayer.h:51
QgsSymbolLayer::setColor
virtual void setColor(const QColor &color)
The fill color.
Definition: qgssymbollayer.h:232
QgsSymbolLayer::PropertyFillColor
@ PropertyFillColor
Fill color.
Definition: qgssymbollayer.h:135
QgsUnitTypes::RenderPoints
@ RenderPoints
Points (e.g., for font sizes)
Definition: qgsunittypes.h:172
qgssymbollayerutils.h
QgsMarkerSymbolLayer::setAngle
void setAngle(double angle)
Sets the rotation angle for the marker.
Definition: qgssymbollayer.h:627
QgsSymbolLayerWidget
Definition: qgssymbollayerwidget.h:35
QgsEllipseSymbolLayer::setFillColor
void setFillColor(const QColor &c) override
Set fill color.
Definition: qgsellipsesymbollayer.h:80
QgsUnitTypes::RenderMillimeters
@ RenderMillimeters
Millimeters.
Definition: qgsunittypes.h:168
QgsEllipseSymbolLayer::symbolName
QString symbolName() const
Definition: qgsellipsesymbollayer.h:52
QgsEllipseSymbolLayer::setStrokeColor
void setStrokeColor(const QColor &c) override
Set stroke color.
Definition: qgsellipsesymbollayer.h:83
QgsEllipseSymbolLayer::setSymbolHeightUnit
void setSymbolHeightUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's height.
Definition: qgsellipsesymbollayer.h:110
QgsSymbolLayer::PropertyStrokeColor
@ PropertyStrokeColor
Stroke color.
Definition: qgssymbollayer.h:136
QgsEllipseSymbolLayer
A symbol layer for rendering objects with major and minor axis (e.g.
Definition: qgsellipsesymbollayer.h:32
QgsEllipseSymbolLayerWidget::setSymbolLayer
void setSymbolLayer(QgsSymbolLayer *layer) override
Definition: qgsellipsesymbollayerwidget.cpp:106
QgsEllipseSymbolLayer::strokeWidthMapUnitScale
const QgsMapUnitScale & strokeWidthMapUnitScale() const
Definition: qgsellipsesymbollayer.h:136
QgsColorButton::colorChanged
void colorChanged(const QColor &color)
Emitted whenever a new color is set for the button.
QgsEllipseSymbolLayer::symbolHeightUnit
QgsUnitTypes::RenderUnit symbolHeightUnit() const
Returns the units for the symbol's height.
Definition: qgsellipsesymbollayer.h:117
QgsEllipseSymbolLayer::setSymbolWidthMapUnitScale
void setSymbolWidthMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsellipsesymbollayer.h:101
QgsEllipseSymbolLayer::setPenJoinStyle
void setPenJoinStyle(Qt::PenJoinStyle style)
Set stroke join style.
Definition: qgsellipsesymbollayer.h:75
QgsEllipseSymbolLayerWidget::symbolLayer
QgsSymbolLayer * symbolLayer() override
Definition: qgsellipsesymbollayerwidget.cpp:161
QgsMarkerSymbolLayer::HorizontalAnchorPoint
HorizontalAnchorPoint
Symbol horizontal anchor points.
Definition: qgssymbollayer.h:587
QgsSymbolLayer::PropertyOffset
@ PropertyOffset
Symbol offset.
Definition: qgssymbollayer.h:139
QgsSymbolLayer
Definition: qgssymbollayer.h:53
QgsEllipseSymbolLayer::setStrokeWidth
void setStrokeWidth(double w)
Definition: qgsellipsesymbollayer.h:77
QgsEllipseSymbolLayer::setSymbolWidthUnit
void setSymbolWidthUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's width.
Definition: qgsellipsesymbollayer.h:92
QgsEllipseSymbolLayerWidget::QgsEllipseSymbolLayerWidget
QgsEllipseSymbolLayerWidget(QgsVectorLayer *vl, QWidget *parent=nullptr)
Constructor for QgsEllipseSymbolLayerWidget.
Definition: qgsellipsesymbollayerwidget.cpp:21
QgsSymbolLayer::PropertyVerticalAnchor
@ PropertyVerticalAnchor
Vertical anchor point.
Definition: qgssymbollayer.h:175
QgsSymbolLayer::PropertyStrokeStyle
@ PropertyStrokeStyle
Stroke style (eg solid, dashed)
Definition: qgssymbollayer.h:138
QgsEllipseSymbolLayer::strokeWidthUnit
QgsUnitTypes::RenderUnit strokeWidthUnit() const
Returns the units for the symbol's stroke width.
Definition: qgsellipsesymbollayer.h:133
QgsMarkerSymbolLayer::verticalAnchorPoint
VerticalAnchorPoint verticalAnchorPoint() const
Returns the vertical anchor point for positioning the symbol.
Definition: qgssymbollayer.h:795
qgsellipsesymbollayerwidget.h
Qgis::UI_SCALE_FACTOR
static const double UI_SCALE_FACTOR
UI scaling factor.
Definition: qgis.h:182
QgsUnitSelectionWidget::changed
void changed()
QgsSymbolLayer::PropertyName
@ PropertyName
Name, eg shape name for simple markers.
Definition: qgssymbollayer.h:134
QgsMarkerSymbolLayer::setOffset
void setOffset(QPointF offset)
Sets the marker's offset, which is the horizontal and vertical displacement which the rendered marker...
Definition: qgssymbollayer.h:718
QgsSymbolLayer::PropertyStrokeWidth
@ PropertyStrokeWidth
Stroke width.
Definition: qgssymbollayer.h:137
QgsEllipseSymbolLayer::fillColor
QColor fillColor() const override
Gets fill color.
Definition: qgsellipsesymbollayer.h:81
QgsMarkerSymbolLayer::setOffsetUnit
void setOffsetUnit(QgsUnitTypes::RenderUnit unit)
Sets the units for the symbol's offset.
Definition: qgssymbollayer.h:736
QgsUnitTypes::RenderPixels
@ RenderPixels
Pixels.
Definition: qgsunittypes.h:170
QgsEllipseSymbolLayer::setSymbolHeight
void setSymbolHeight(double h)
Definition: qgsellipsesymbollayer.cpp:632
qgsvectorlayer.h
QgsMarkerSymbolLayer::setOffsetMapUnitScale
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale for the symbol's offset.
Definition: qgssymbollayer.h:753
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:387
QgsEllipseSymbolLayer::symbolHeightMapUnitScale
const QgsMapUnitScale & symbolHeightMapUnitScale() const
Definition: qgsellipsesymbollayer.h:120
qgsellipsesymbollayer.h
QgsSymbolLayer::PropertyAngle
@ PropertyAngle
Symbol angle.
Definition: qgssymbollayer.h:133
QgsEllipseSymbolLayer::symbolWidth
double symbolWidth() const
Definition: qgsellipsesymbollayer.h:57
QgsUnitTypes::RenderMetersInMapUnits
@ RenderMetersInMapUnits
Meters value as Map units.
Definition: qgsunittypes.h:175
QgsMarkerSymbolLayer::horizontalAnchorPoint
HorizontalAnchorPoint horizontalAnchorPoint() const
Returns the horizontal anchor point for positioning the symbol.
Definition: qgssymbollayer.h:778
QgsDoubleSpinBox
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
Definition: qgsdoublespinbox.h:43
QgsEllipseSymbolLayerWidget::mLayer
QgsEllipseSymbolLayer * mLayer
Definition: qgsellipsesymbollayerwidget.h:53
QgsMarkerSymbolLayer::offset
QPointF offset() const
Returns the marker's offset, which is the horizontal and vertical displacement which the rendered mar...
Definition: qgssymbollayer.h:727
QgsMarkerSymbolLayer::setVerticalAnchorPoint
void setVerticalAnchorPoint(VerticalAnchorPoint v)
Sets the vertical anchor point for positioning the symbol.
Definition: qgssymbollayer.h:787
QgsSymbolLayer::layerType
virtual QString layerType() const =0
Returns a string that represents this layer type.
QgsEllipseSymbolLayer::penJoinStyle
Qt::PenJoinStyle penJoinStyle() const
Gets stroke join style.
Definition: qgsellipsesymbollayer.h:69
QgsEllipseSymbolLayer::symbolWidthUnit
QgsUnitTypes::RenderUnit symbolWidthUnit() const
Returns the units for the symbol's width.
Definition: qgsellipsesymbollayer.h:99
QgsMarkerSymbolLayer::offsetMapUnitScale
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale for the symbol's offset.
Definition: qgssymbollayer.h:761
QgsSymbolLayer::PropertyHeight
@ PropertyHeight
Symbol height.
Definition: qgssymbollayer.h:142
QgsEllipseSymbolLayer::setStrokeStyle
void setStrokeStyle(Qt::PenStyle strokeStyle)
Definition: qgsellipsesymbollayer.h:63
QgsUnitTypes::RenderUnitList
QList< QgsUnitTypes::RenderUnit > RenderUnitList
List of render units.
Definition: qgsunittypes.h:239
QgsSymbolLayerWidget::registerDataDefinedButton
void registerDataDefinedButton(QgsPropertyOverrideButton *button, QgsSymbolLayer::Property key)
Registers a data defined override button.
Definition: qgssymbollayerwidget.cpp:133
QgsEllipseSymbolLayer::setStrokeWidthMapUnitScale
void setStrokeWidthMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsellipsesymbollayer.h:135
QgsEllipseSymbolLayer::setSymbolHeightMapUnitScale
void setSymbolHeightMapUnitScale(const QgsMapUnitScale &scale)
Definition: qgsellipsesymbollayer.h:119
QgsSymbolLayerUtils::symbolLayerPreviewIcon
static QIcon symbolLayerPreviewIcon(const QgsSymbolLayer *layer, QgsUnitTypes::RenderUnit u, QSize size, const QgsMapUnitScale &scale=QgsMapUnitScale())
Draws a symbol layer preview to an icon.
Definition: qgssymbollayerutils.cpp:851
QgsUnitTypes::RenderMapUnits
@ RenderMapUnits
Map units.
Definition: qgsunittypes.h:169
QgsMarkerSymbolLayer::offsetUnit
QgsUnitTypes::RenderUnit offsetUnit() const
Returns the units for the symbol's offset.
Definition: qgssymbollayer.h:744
QgsMarkerSymbolLayer::angle
double angle() const
Returns the rotation angle for the marker, in degrees clockwise from north.
Definition: qgssymbollayer.h:633
QgsEllipseSymbolLayer::symbolHeight
double symbolHeight() const
Definition: qgsellipsesymbollayer.h:60
QgsEllipseSymbolLayer::setSymbolWidth
void setSymbolWidth(double w)
Definition: qgsellipsesymbollayer.cpp:626
QgsSymbolLayer::PropertyJoinStyle
@ PropertyJoinStyle
Line join style.
Definition: qgssymbollayer.h:145
QgsSymbolLayer::PropertyWidth
@ PropertyWidth
Symbol width.
Definition: qgssymbollayer.h:141