QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
qgssymbollayerwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgssymbollayerwidget.h - symbol layer widgets
3
4 ---------------------
5 begin : November 2009
6 copyright : (C) 2009 by Martin Dobias
7 email : wonder dot sk at gmail dot com
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17#ifndef QGSSYMBOLLAYERWIDGET_H
18#define QGSSYMBOLLAYERWIDGET_H
19
21#include "qgis_sip.h"
23#include "qgssymbollayer.h"
24
25#include <QWidget>
26#include <QStandardItemModel>
27
28class QgsVectorLayer;
29class QgsMarkerSymbol;
30class QgsLineSymbol;
31
36class GUI_EXPORT QgsSymbolLayerWidget : public QWidget, protected QgsExpressionContextGenerator
37{
38 Q_OBJECT
39
40 public:
46 QgsSymbolLayerWidget( QWidget *parent SIP_TRANSFERTHIS, QgsVectorLayer *vl = nullptr )
47 : QWidget( parent )
48 , mVectorLayer( vl )
49 {}
50
51 virtual void setSymbolLayer( QgsSymbolLayer *layer ) = 0;
53
59 virtual void setContext( const QgsSymbolWidgetContext &context );
60
65 QgsSymbolWidgetContext context() const;
66
70 const QgsVectorLayer *vectorLayer() const { return mVectorLayer; }
71
72 protected:
78 void registerDataDefinedButton( QgsPropertyOverrideButton *button, QgsSymbolLayer::Property key );
79
81
82 private:
83 QgsVectorLayer *mVectorLayer = nullptr;
84
85 signals:
86
91 void changed();
92
100
101 protected slots:
102 void updateDataDefinedProperty();
103
104 private slots:
105 void createAuxiliaryField();
106
107 private:
108 QgsSymbolWidgetContext mContext;
109};
110
112
113#include "ui_widget_simpleline.h"
114
116
121class GUI_EXPORT QgsSimpleLineSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSimpleLine
122{
123 Q_OBJECT
124
125 public:
131 QgsSimpleLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
132
134
140
141 void setSymbolLayer( QgsSymbolLayer *layer ) override;
142 QgsSymbolLayer *symbolLayer() override;
143 void setContext( const QgsSymbolWidgetContext &context ) override;
144
145 protected:
146 QgsSimpleLineSymbolLayer *mLayer = nullptr;
147
148 //creates a new icon for the 'change pattern' button
149 void updatePatternIcon();
150
151 void resizeEvent( QResizeEvent *event ) override;
152
153 private slots:
154
155 void updateAssistantSymbol();
156 void penWidthChanged();
157 void colorChanged( const QColor &color );
158 void penStyleChanged();
159 void offsetChanged();
160 void patternOffsetChanged();
161 void mCustomCheckBox_stateChanged( int state );
162 void mChangePatternButton_clicked();
163 void mPenWidthUnitWidget_changed();
164 void mOffsetUnitWidget_changed();
165 void mDashPatternUnitWidget_changed();
166 void mDrawInsideCheckBox_stateChanged( int state );
167 void patternOffsetUnitChanged();
168
169 private:
170 std::shared_ptr<QgsLineSymbol> mAssistantPreviewSymbol;
171};
172
174
175#include "ui_widget_simplemarker.h"
176
178
183class GUI_EXPORT QgsSimpleMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSimpleMarker
184{
185 Q_OBJECT
186
187 public:
193 QgsSimpleMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
195
201
202 // from base class
203 void setSymbolLayer( QgsSymbolLayer *layer ) override;
204 QgsSymbolLayer *symbolLayer() override;
205
206 public slots:
207
208 void setColorStroke( const QColor &color );
209 void setColorFill( const QColor &color );
210
211 protected:
212 QgsSimpleMarkerSymbolLayer *mLayer = nullptr;
213
214 private slots:
215 void setSize();
216 void setAngle();
217 void setOffset();
218 void mSizeUnitWidget_changed();
219 void mOffsetUnitWidget_changed();
220 void mStrokeWidthUnitWidget_changed();
221 void mStrokeStyleComboBox_currentIndexChanged( int index );
222 void mStrokeWidthSpinBox_valueChanged( double d );
223 void mHorizontalAnchorComboBox_currentIndexChanged( int index );
224 void mVerticalAnchorComboBox_currentIndexChanged( int index );
225 void setShape();
226 void updateAssistantSymbol();
227 void penJoinStyleChanged();
228 void penCapStyleChanged();
229
230 private:
231 std::shared_ptr<QgsMarkerSymbol> mAssistantPreviewSymbol;
232};
233
235
236#include "ui_widget_simplefill.h"
237
239
244class GUI_EXPORT QgsSimpleFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSimpleFill
245{
246 Q_OBJECT
247
248 public:
254 QgsSimpleFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
255
261
262 // from base class
263 void setSymbolLayer( QgsSymbolLayer *layer ) override;
264 QgsSymbolLayer *symbolLayer() override;
265
266 public slots:
267 void setColor( const QColor &color );
268 void setStrokeColor( const QColor &color );
269
270 protected:
271 QgsSimpleFillSymbolLayer *mLayer = nullptr;
272
273 private slots:
274 void setBrushStyle();
275 void strokeWidthChanged();
276 void strokeStyleChanged();
277 void offsetChanged();
278 void mStrokeWidthUnitWidget_changed();
279 void mOffsetUnitWidget_changed();
280};
281
282
284
285#include "ui_widget_filledmarker.h"
286
288
294class GUI_EXPORT QgsFilledMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetFilledMarker
295{
296 Q_OBJECT
297
298 public:
304 QgsFilledMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
306
312
313 // from base class
314 void setSymbolLayer( QgsSymbolLayer *layer ) override;
315 QgsSymbolLayer *symbolLayer() override;
316
317 protected:
318 QgsFilledMarkerSymbolLayer *mLayer = nullptr;
319
320 private slots:
321
322 void updateAssistantSymbol();
323 void setShape();
324 void setSize();
325 void setAngle();
326 void setOffset();
327 void mSizeUnitWidget_changed();
328 void mOffsetUnitWidget_changed();
329 void mHorizontalAnchorComboBox_currentIndexChanged( int index );
330 void mVerticalAnchorComboBox_currentIndexChanged( int index );
331
332 private:
333 std::shared_ptr<QgsMarkerSymbol> mAssistantPreviewSymbol;
334};
335
337
338#include "ui_widget_gradientfill.h"
339
341
346class GUI_EXPORT QgsGradientFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetGradientFill
347{
348 Q_OBJECT
349
350 public:
356 QgsGradientFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
357
363
364 // from base class
365 void setSymbolLayer( QgsSymbolLayer *layer ) override;
366 QgsSymbolLayer *symbolLayer() override;
367
368 public slots:
369 void setColor( const QColor &color );
370 void setColor2( const QColor &color );
371
375 void applyColorRamp();
376 void setGradientType( int index );
377 void setCoordinateMode( int index );
378 void setGradientSpread( int index );
379
380 protected:
381 QgsGradientFillSymbolLayer *mLayer = nullptr;
382
383 private slots:
384 void offsetChanged();
385 void referencePointChanged();
386 void mOffsetUnitWidget_changed();
387 void colorModeChanged();
388 void mSpinAngle_valueChanged( double value );
389};
390
392
393#include "ui_widget_shapeburstfill.h"
394
396
401class GUI_EXPORT QgsShapeburstFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetShapeburstFill
402{
403 Q_OBJECT
404
405 public:
412
418
419 // from base class
420 void setSymbolLayer( QgsSymbolLayer *layer ) override;
421 QgsSymbolLayer *symbolLayer() override;
422
423 public slots:
424 void setColor( const QColor &color );
425 void setColor2( const QColor &color );
426
427 protected:
429
430 private slots:
431 void colorModeChanged();
432 void mSpinBlurRadius_valueChanged( int value );
433 void mSpinMaxDistance_valueChanged( double value );
434 void mDistanceUnitWidget_changed();
435 void mRadioUseWholeShape_toggled( bool value );
436 void applyColorRamp();
437 void offsetChanged();
438 void mOffsetUnitWidget_changed();
439 void mIgnoreRingsCheckBox_stateChanged( int state );
440};
441
443
444#include "ui_widget_markerline.h"
445
447
452class GUI_EXPORT QgsMarkerLineSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetMarkerLine
453{
454 Q_OBJECT
455
456 public:
462 QgsMarkerLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
463
469
470 // from base class
471 void setSymbolLayer( QgsSymbolLayer *layer ) override;
472 QgsSymbolLayer *symbolLayer() override;
473 void setContext( const QgsSymbolWidgetContext &context ) override;
474
475 public slots:
476
477 void setInterval( double val );
478 void setOffsetAlongLine( double val );
479
480 protected:
481 QgsMarkerLineSymbolLayer *mLayer = nullptr;
482
483 private slots:
484 void setRotate();
485 void setOffset();
486 void setPlacement();
487 void mIntervalUnitWidget_changed();
488 void mOffsetUnitWidget_changed();
489 void mOffsetAlongLineUnitWidget_changed();
490 void averageAngleUnitChanged();
491 void setAverageAngle( double val );
492};
493
494
495#include "ui_widget_hashline.h"
496
498
505class GUI_EXPORT QgsHashedLineSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetHashedLine
506{
507 Q_OBJECT
508
509 public:
515 QgsHashedLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
516
522
523 // from base class
524 void setSymbolLayer( QgsSymbolLayer *layer ) override;
525 QgsSymbolLayer *symbolLayer() override;
526 void setContext( const QgsSymbolWidgetContext &context ) override;
527
528 private slots:
529
530 void setInterval( double val );
531 void setOffsetAlongLine( double val );
532 void setHashLength( double val );
533 void setHashAngle( double val );
534
535 void setRotate();
536 void setOffset();
537 void setPlacement();
538 void mIntervalUnitWidget_changed();
539 void mOffsetUnitWidget_changed();
540 void mOffsetAlongLineUnitWidget_changed();
541 void hashLengthUnitWidgetChanged();
542 void averageAngleUnitChanged();
543 void setAverageAngle( double val );
544
545 private:
546 QgsHashedLineSymbolLayer *mLayer = nullptr;
547};
548
550
551#include "ui_widget_svgmarker.h"
552
554
559class GUI_EXPORT QgsSvgMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSvgMarker
560{
561 Q_OBJECT
562
563 public:
569 QgsSvgMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
571
577
578 // from base class
579 void setSymbolLayer( QgsSymbolLayer *layer ) override;
580 QgsSymbolLayer *symbolLayer() override;
581
582 void setContext( const QgsSymbolWidgetContext &context ) override;
583
584 public slots:
586 void setSvgPath( const QString &name );
588 void setSvgParameters( const QMap<QString, QgsProperty> &parameters );
589
590
591 protected:
592 // TODO QGIS 4: remove
593
598 Q_DECL_DEPRECATED void populateList() SIP_DEPRECATED {}
599
606 void setGuiForSvg( const QgsSvgMarkerSymbolLayer *layer, bool skipDefaultColors = false );
607
608 QgsSvgMarkerSymbolLayer *mLayer = nullptr;
609
610 private slots:
611 void svgSourceChanged( const QString &text );
612 void mChangeColorButton_colorChanged( const QColor &color );
613 void mChangeStrokeColorButton_colorChanged( const QColor &color );
614 void mStrokeWidthSpinBox_valueChanged( double d );
615 void mSizeUnitWidget_changed();
616 void mStrokeWidthUnitWidget_changed();
617 void mOffsetUnitWidget_changed();
618 void mHorizontalAnchorComboBox_currentIndexChanged( int index );
619 void mVerticalAnchorComboBox_currentIndexChanged( int index );
620 void setWidth();
621 void setHeight();
622 void lockAspectRatioChanged( bool locked );
623 void setAngle();
624 void setOffset();
625 void updateAssistantSymbol();
626
627 private:
628 std::shared_ptr<QgsMarkerSymbol> mAssistantPreviewSymbol;
629};
630
632
633#include "ui_widget_rastermarker.h"
634
636
643class GUI_EXPORT QgsRasterMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetRasterMarker
644{
645 Q_OBJECT
646
647 public:
653 QgsRasterMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
654
660
661 // from base class
662 void setSymbolLayer( QgsSymbolLayer *layer ) override;
663 QgsSymbolLayer *symbolLayer() override;
664 void setContext( const QgsSymbolWidgetContext &context ) override;
665
666 protected:
667 QgsRasterMarkerSymbolLayer *mLayer = nullptr;
668
669 private slots:
670 void imageSourceChanged( const QString &text );
671 void mSizeUnitWidget_changed();
672 void mOffsetUnitWidget_changed();
673 void mHorizontalAnchorComboBox_currentIndexChanged( int index );
674 void mVerticalAnchorComboBox_currentIndexChanged( int index );
675 void setWidth();
676 void setHeight();
677 void setLockAspectRatio( bool locked );
678 void setAngle();
679 void setOffset();
680 void setOpacity( double value );
681 void updatePreviewImage();
682};
683
684
686
687#include "ui_widget_animatedmarker.h"
688
690
697class GUI_EXPORT QgsAnimatedMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetAnimatedMarker
698{
699 Q_OBJECT
700
701 public:
708
714
715 // from base class
716 void setSymbolLayer( QgsSymbolLayer *layer ) override;
717 QgsSymbolLayer *symbolLayer() override;
718 void setContext( const QgsSymbolWidgetContext &context ) override;
719
720 protected:
722
723 private slots:
724 void imageSourceChanged( const QString &text );
725 void mSizeUnitWidget_changed();
726 void mOffsetUnitWidget_changed();
727 void mHorizontalAnchorComboBox_currentIndexChanged( int index );
728 void mVerticalAnchorComboBox_currentIndexChanged( int index );
729 void setWidth();
730 void setHeight();
731 void setLockAspectRatio( bool locked );
732 void setAngle();
733 void setOffset();
734 void setOpacity( double value );
735 void updatePreviewImage();
736
737 private:
738 QMovie *mPreviewMovie = nullptr;
739};
740
741
743
744#include "ui_widget_rasterfill.h"
745
747
752class GUI_EXPORT QgsRasterFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetRasterFill
753{
754 Q_OBJECT
755
756 public:
762 QgsRasterFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
763
769
770 // from base class
771 void setSymbolLayer( QgsSymbolLayer *layer ) override;
772 QgsSymbolLayer *symbolLayer() override;
773
774 protected:
775 QgsRasterFillSymbolLayer *mLayer = nullptr;
776
777 private slots:
778 void imageSourceChanged( const QString &text );
779 void setCoordinateMode( int index );
780 void opacityChanged( double value );
781 void offsetChanged();
782 void mOffsetUnitWidget_changed();
783 void mRotationSpinBox_valueChanged( double d );
784
785 private:
786 void updatePreviewImage();
787};
788
789
791
792#include "ui_widget_rasterline.h"
793
795
802class GUI_EXPORT QgsRasterLineSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetRasterLine
803{
804 Q_OBJECT
805
806 public:
812 QgsRasterLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
813
819
820 // from base class
821 void setSymbolLayer( QgsSymbolLayer *layer ) override;
822 QgsSymbolLayer *symbolLayer() override;
823
824 protected:
825 QgsRasterLineSymbolLayer *mLayer = nullptr;
826
827 private slots:
828 void imageSourceChanged( const QString &text );
829 void updatePreviewImage();
830};
831
832
834
835#include "ui_widget_gradientline.h"
836
838
845class GUI_EXPORT QgsLineburstSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetGradientLine
846{
847 Q_OBJECT
848
849 public:
855 QgsLineburstSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
856
862
863 // from base class
864 void setSymbolLayer( QgsSymbolLayer *layer ) override;
865 QgsSymbolLayer *symbolLayer() override;
866
867 protected:
868 QgsLineburstSymbolLayer *mLayer = nullptr;
869};
870
871
873
874#include "ui_widget_filledline.h"
875
877
884class GUI_EXPORT QgsFilledLineSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetFilledLine
885{
886 Q_OBJECT
887
888 public:
894 QgsFilledLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
895
897
903
904 void setSymbolLayer( QgsSymbolLayer *layer ) override;
905 QgsSymbolLayer *symbolLayer() override;
906
907 private:
908 QgsFilledLineSymbolLayer *mLayer = nullptr;
909};
910
911
913
914#include "ui_widget_svgfill.h"
915
917
922class GUI_EXPORT QgsSVGFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSVGFill
923{
924 Q_OBJECT
925
926 public:
932 QgsSVGFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
933
939
940 // from base class
941 void setSymbolLayer( QgsSymbolLayer *layer ) override;
942 QgsSymbolLayer *symbolLayer() override;
943 void setContext( const QgsSymbolWidgetContext &context ) override;
944
945 protected:
946 QgsSVGFillSymbolLayer *mLayer = nullptr;
947
954 void updateParamGui( bool resetValues = true );
955
956 private slots:
957 void mTextureWidthSpinBox_valueChanged( double d );
958 void svgSourceChanged( const QString &text );
959 void setFile( const QString &name );
960 void setSvgParameters( const QMap<QString, QgsProperty> &parameters );
961 void mRotationSpinBox_valueChanged( double d );
962 void mChangeColorButton_colorChanged( const QColor &color );
963 void mChangeStrokeColorButton_colorChanged( const QColor &color );
964 void mStrokeWidthSpinBox_valueChanged( double d );
965 void mTextureWidthUnitWidget_changed();
966 void mSvgStrokeWidthUnitWidget_changed();
967};
968
970
971#include "ui_widget_linepatternfill.h"
972
974
979class GUI_EXPORT QgsLinePatternFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetLinePatternFill
980{
981 Q_OBJECT
982
983 public:
990
996
997 void setSymbolLayer( QgsSymbolLayer *layer ) override;
998 QgsSymbolLayer *symbolLayer() override;
999
1000 protected:
1002
1003 private slots:
1004 void mAngleSpinBox_valueChanged( double d );
1005 void mDistanceSpinBox_valueChanged( double d );
1006 void mOffsetSpinBox_valueChanged( double d );
1007 void mDistanceUnitWidget_changed();
1008 void mOffsetUnitWidget_changed();
1009};
1010
1012
1013#include "ui_widget_pointpatternfill.h"
1014
1016
1021class GUI_EXPORT QgsPointPatternFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetPointPatternFill
1022{
1023 Q_OBJECT
1024
1025 public:
1032
1038
1039 void setSymbolLayer( QgsSymbolLayer *layer ) override;
1040 QgsSymbolLayer *symbolLayer() override;
1041
1042 protected:
1044
1045 private slots:
1046 void mHorizontalDistanceSpinBox_valueChanged( double d );
1047 void mVerticalDistanceSpinBox_valueChanged( double d );
1048 void mHorizontalDisplacementSpinBox_valueChanged( double d );
1049 void mVerticalDisplacementSpinBox_valueChanged( double d );
1050 void mHorizontalOffsetSpinBox_valueChanged( double d );
1051 void mVerticalOffsetSpinBox_valueChanged( double d );
1052 void mHorizontalDistanceUnitWidget_changed();
1053 void mVerticalDistanceUnitWidget_changed();
1054 void mHorizontalDisplacementUnitWidget_changed();
1055 void mVerticalDisplacementUnitWidget_changed();
1056 void mHorizontalOffsetUnitWidget_changed();
1057 void mVerticalOffsetUnitWidget_changed();
1058};
1059
1060
1062
1063#include "ui_widget_randommarkerfill.h"
1064
1066
1075class GUI_EXPORT QgsRandomMarkerFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetRandomMarkerFill
1076{
1077 Q_OBJECT
1078
1079 public:
1086
1092
1093 void setSymbolLayer( QgsSymbolLayer *layer ) override;
1094 QgsSymbolLayer *symbolLayer() override;
1095
1096 private:
1097 QgsRandomMarkerFillSymbolLayer *mLayer = nullptr;
1098
1099 private slots:
1100
1101 void countMethodChanged( int );
1102 void countChanged( int d );
1103 void densityAreaChanged( double d );
1104 void densityAreaUnitChanged();
1105 void seedChanged( int d );
1106};
1107
1109
1110#include "ui_widget_fontmarker.h"
1111
1113class CharacterWidget;
1114
1119class GUI_EXPORT QgsFontMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetFontMarker
1120{
1121 Q_OBJECT
1122
1123 public:
1129 QgsFontMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1131
1137
1138 // from base class
1139 void setSymbolLayer( QgsSymbolLayer *layer ) override;
1140 QgsSymbolLayer *symbolLayer() override;
1141
1142 public slots:
1143 void setFontFamily( const QFont &font );
1144 void setColor( const QColor &color );
1145
1149 void setColorStroke( const QColor &color );
1150 void setSize( double size );
1151 void setAngle( double angle );
1152
1157 void setCharacter( QChar chr );
1158
1164 void setCharacterFromText( const QString &text );
1165
1166 protected:
1167 QgsFontMarkerSymbolLayer *mLayer = nullptr;
1168 CharacterWidget *widgetChar = nullptr;
1169
1170 private slots:
1171
1176 void setFontStyle( const QString &style );
1177
1178 void setOffset();
1179 void mSizeUnitWidget_changed();
1180 void mOffsetUnitWidget_changed();
1181 void mStrokeWidthUnitWidget_changed();
1182 void mStrokeWidthSpinBox_valueChanged( double d );
1183
1184 void populateFontStyleComboBox();
1185 void mFontStyleComboBox_currentIndexChanged( int index );
1186
1187 void mHorizontalAnchorComboBox_currentIndexChanged( int index );
1188 void mVerticalAnchorComboBox_currentIndexChanged( int index );
1189 void penJoinStyleChanged();
1190 void updateAssistantSymbol();
1191
1192 private:
1193 std::shared_ptr<QgsMarkerSymbol> mAssistantPreviewSymbol;
1194
1195 QFont mRefFont;
1196 QFontDatabase mFontDB;
1197};
1198
1200
1201
1202#include "ui_widget_centroidfill.h"
1203
1205
1210class GUI_EXPORT QgsCentroidFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetCentroidFill
1211{
1212 Q_OBJECT
1213
1214 public:
1220 QgsCentroidFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1221
1227
1228 // from base class
1229 void setSymbolLayer( QgsSymbolLayer *layer ) override;
1230 QgsSymbolLayer *symbolLayer() override;
1231
1232 protected:
1234
1235 private slots:
1236 void mDrawInsideCheckBox_stateChanged( int state );
1237 void mDrawAllPartsCheckBox_stateChanged( int state );
1238 void mClipPointsCheckBox_stateChanged( int state );
1239 void mClipOnCurrentPartOnlyCheckBox_stateChanged( int state );
1240};
1241
1242
1244
1245#include "ui_qgslinearreferencingsymbollayerwidgetbase.h"
1246
1248
1255class GUI_EXPORT QgsLinearReferencingSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::QgsLinearReferencingSymbolLayerWidgetBase
1256{
1257 Q_OBJECT
1258
1259 public:
1264
1266
1272
1273 void setSymbolLayer( QgsSymbolLayer *layer ) override;
1274 QgsSymbolLayer *symbolLayer() override;
1275 void setContext( const QgsSymbolWidgetContext &context ) override;
1276
1277 private slots:
1278 void changeNumberFormat();
1279
1280 private:
1281 QgsLinearReferencingSymbolLayer *mLayer = nullptr;
1282 bool mBlockChangesSignal = false;
1283};
1284
1285
1286#include "ui_qgsgeometrygeneratorwidgetbase.h"
1287#include "qgis_gui.h"
1288
1290
1295class GUI_EXPORT QgsGeometryGeneratorSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::GeometryGeneratorWidgetBase
1296{
1297 Q_OBJECT
1298
1299 public:
1306
1311
1312 // from base class
1313 void setSymbolLayer( QgsSymbolLayer *layer ) override;
1314 QgsSymbolLayer *symbolLayer() override;
1315
1316 private:
1317 QgsGeometryGeneratorSymbolLayer *mLayer = nullptr;
1318 int mBlockSignals = 0;
1319
1320 private slots:
1321 void updateExpression( const QString &string );
1322 void updateSymbolType();
1323};
1324
1325#endif
A widget for displaying characters available in a preset font, and allowing users to select an indivi...
Widget for configuring QgsAnimatedMarkerSymbolLayer symbol layers.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsAnimatedMarkerSymbolLayerWidget.
Animated marker symbol layer class.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsCentroidFillSymbolLayerWidget.
A fill symbol layer which renders a marker symbol at the centroid of a polygon geometry.
Abstract interface for generating an expression context.
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
A widget for configuring QgsFilledLineSymbolLayer.
~QgsFilledLineSymbolLayerWidget() override
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsFilledLineSymbolLayerWidget.
A line symbol layer type which fills a stroked line with a QgsFillSymbol.
Widget for configuring QgsFilledMarkerSymbolLayer symbol layers.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsFilledMarkerSymbolLayerWidget.
Filled marker symbol layer, consisting of a shape which is rendered using a QgsFillSymbol.
~QgsFontMarkerSymbolLayerWidget() override
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsFontMarkerSymbolLayerWidget.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Will be registered as factory.
A symbol layer subclass which alters rendered feature shapes through the use of QGIS expressions.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsGradientFillSymbolLayerWidget.
A fill symbol layer which draws a smooth color gradient over a polygon.
Widget for controlling the properties of a QgsHashedLineSymbolLayer.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsHashedLineSymbolLayerWidget.
Line symbol layer type which draws repeating line sections along a line feature.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsLinePatternFillSymbolLayerWidget.
A symbol fill consisting of repeated parallel lines.
A line symbol type, for rendering LineString and MultiLineString geometries.
Widget for controlling the properties of a QgsLinearReferencingSymbolLayer.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsLinearReferencingSymbolLayerWidget.
Line symbol layer used for decorating accordingly to linear referencing.
Widget for configuring QgsLineburstSymbolLayer symbol layers.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsLineburstSymbolLayerWidget.
Line symbol layer type which draws a gradient pattern perpendicularly along a line.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsMarkerLineSymbolLayerWidget.
Line symbol layer type which draws repeating marker symbols along a line feature.
A marker symbol type, for rendering Point and MultiPoint geometries.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsPointPatternFillSymbolLayerWidget.
A fill symbol layer which fills polygon shapes with repeating marker symbols.
A button for controlling property overrides which may apply to a widget.
Widget for controlling the properties of a QgsRandomMarkerFillSymbolLayer.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsRandomMarkerFillSymbolLayerWidget.
A fill symbol layer which places markers at random locations within polygons.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsRasterFillSymbolLayerWidget.
A class for filling symbols with a repeated raster image.
Widget for configuring QgsRasterLineSymbolLayer symbol layers.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsRasterLineSymbolLayerWidget.
Line symbol layer type which draws line sections using a raster image file.
Widget for configuring QgsRasterMarkerSymbolLayer symbol layers.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsRasterMarkerSymbolLayerWidget.
Raster marker symbol layer class.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsSVGFillSymbolLayerWidget.
A class for filling symbols with a repeated SVG file.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsShapeburstFillSymbolLayerWidget.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsSimpleFillSymbolLayerWidget.
Renders polygons using a single fill and stroke color.
~QgsSimpleLineSymbolLayerWidget() override
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsSimpleLineSymbolLayerWidget.
A simple line symbol layer, which renders lines using a line in a variety of styles (e....
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsSimpleMarkerSymbolLayerWidget.
Simple marker symbol layer, consisting of a rendered shape with solid fill color and an stroke.
Q_DECL_DEPRECATED void populateList()
This method does nothing anymore, the loading is automatic.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsSvgMarkerSymbolLayerWidget.
~QgsSvgMarkerSymbolLayerWidget() override
QgsSymbolLayerWidget(QWidget *parent, QgsVectorLayer *vl=nullptr)
Constructor for QgsSymbolLayerWidget.
virtual void setSymbolLayer(QgsSymbolLayer *layer)=0
void changed()
Should be emitted whenever configuration changes happened on this symbol layer configuration.
void symbolChanged()
Should be emitted whenever the sub symbol changed on this symbol layer configuration.
virtual QgsSymbolLayer * symbolLayer()=0
const QgsVectorLayer * vectorLayer() const
Returns the vector layer associated with the widget.
Property
Data definable properties.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Represents a vector layer which manages a vector based data sets.
#define SIP_DEPRECATED
Definition qgis_sip.h:106
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_FACTORY
Definition qgis_sip.h:76