QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
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 QgsMapCanvas;
30class QgsMarkerSymbol;
31class QgsLineSymbol;
32
37class GUI_EXPORT QgsSymbolLayerWidget : public QWidget, protected QgsExpressionContextGenerator
38{
39 Q_OBJECT
40
41 public:
42
48 QgsSymbolLayerWidget( QWidget *parent SIP_TRANSFERTHIS, QgsVectorLayer *vl = nullptr )
49 : QWidget( parent )
50 , mVectorLayer( vl )
51 {}
52
53 virtual void setSymbolLayer( QgsSymbolLayer *layer ) = 0;
55
62 virtual void setContext( const QgsSymbolWidgetContext &context );
63
69 QgsSymbolWidgetContext context() const;
70
75 const QgsVectorLayer *vectorLayer() const { return mVectorLayer; }
76
77 protected:
78
85 void registerDataDefinedButton( QgsPropertyOverrideButton *button, QgsSymbolLayer::Property key );
86
88
89 private:
90 QgsVectorLayer *mVectorLayer = nullptr;
91
92 QgsMapCanvas *mMapCanvas = nullptr;
93
94 signals:
95
100 void changed();
101
109
110 protected slots:
111 void updateDataDefinedProperty();
112
113 private slots:
114 void createAuxiliaryField();
115
116 private:
117 QgsSymbolWidgetContext mContext;
118};
119
121
122#include "ui_widget_simpleline.h"
123
125
130class GUI_EXPORT QgsSimpleLineSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSimpleLine
131{
132 Q_OBJECT
133
134 public:
135
141 QgsSimpleLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
142
144
150
151 // from base class
152 void setSymbolLayer( QgsSymbolLayer *layer ) override;
153 QgsSymbolLayer *symbolLayer() override;
154 void setContext( const QgsSymbolWidgetContext &context ) override;
155
156 protected:
157 QgsSimpleLineSymbolLayer *mLayer = nullptr;
158
159 //creates a new icon for the 'change pattern' button
160 void updatePatternIcon();
161
162 void resizeEvent( QResizeEvent *event ) override;
163
164 private slots:
165
166 void updateAssistantSymbol();
167 void penWidthChanged();
168 void colorChanged( const QColor &color );
169 void penStyleChanged();
170 void offsetChanged();
171 void patternOffsetChanged();
172 void mCustomCheckBox_stateChanged( int state );
173 void mChangePatternButton_clicked();
174 void mPenWidthUnitWidget_changed();
175 void mOffsetUnitWidget_changed();
176 void mDashPatternUnitWidget_changed();
177 void mDrawInsideCheckBox_stateChanged( int state );
178 void patternOffsetUnitChanged();
179
180 private:
181
182 std::shared_ptr< QgsLineSymbol > mAssistantPreviewSymbol;
183
184};
185
187
188#include "ui_widget_simplemarker.h"
189
191
196class GUI_EXPORT QgsSimpleMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSimpleMarker
197{
198 Q_OBJECT
199
200 public:
201
207 QgsSimpleMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
209
215
216 // from base class
217 void setSymbolLayer( QgsSymbolLayer *layer ) override;
218 QgsSymbolLayer *symbolLayer() override;
219
220 public slots:
221
222 void setColorStroke( const QColor &color );
223 void setColorFill( const QColor &color );
224
225 protected:
226 QgsSimpleMarkerSymbolLayer *mLayer = nullptr;
227
228 private slots:
229 void setSize();
230 void setAngle();
231 void setOffset();
232 void mSizeUnitWidget_changed();
233 void mOffsetUnitWidget_changed();
234 void mStrokeWidthUnitWidget_changed();
235 void mStrokeStyleComboBox_currentIndexChanged( int index );
236 void mStrokeWidthSpinBox_valueChanged( double d );
237 void mHorizontalAnchorComboBox_currentIndexChanged( int index );
238 void mVerticalAnchorComboBox_currentIndexChanged( int index );
239 void setShape();
240 void updateAssistantSymbol();
241 void penJoinStyleChanged();
242 void penCapStyleChanged();
243
244 private:
245
246 std::shared_ptr< QgsMarkerSymbol > mAssistantPreviewSymbol;
247};
248
250
251#include "ui_widget_simplefill.h"
252
254
259class GUI_EXPORT QgsSimpleFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSimpleFill
260{
261 Q_OBJECT
262
263 public:
264
270 QgsSimpleFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
271
277
278 // from base class
279 void setSymbolLayer( QgsSymbolLayer *layer ) override;
280 QgsSymbolLayer *symbolLayer() override;
281
282 public slots:
283 void setColor( const QColor &color );
284 void setStrokeColor( const QColor &color );
285
286 protected:
287 QgsSimpleFillSymbolLayer *mLayer = nullptr;
288
289 private slots:
290 void setBrushStyle();
291 void strokeWidthChanged();
292 void strokeStyleChanged();
293 void offsetChanged();
294 void mStrokeWidthUnitWidget_changed();
295 void mOffsetUnitWidget_changed();
296
297};
298
299
301
302#include "ui_widget_filledmarker.h"
303
305
312class GUI_EXPORT QgsFilledMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetFilledMarker
313{
314 Q_OBJECT
315
316 public:
317
323 QgsFilledMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
325
331
332 // from base class
333 void setSymbolLayer( QgsSymbolLayer *layer ) override;
334 QgsSymbolLayer *symbolLayer() override;
335
336 protected:
337 QgsFilledMarkerSymbolLayer *mLayer = nullptr;
338
339 private slots:
340
341 void updateAssistantSymbol();
342 void setShape();
343 void setSize();
344 void setAngle();
345 void setOffset();
346 void mSizeUnitWidget_changed();
347 void mOffsetUnitWidget_changed();
348 void mHorizontalAnchorComboBox_currentIndexChanged( int index );
349 void mVerticalAnchorComboBox_currentIndexChanged( int index );
350
351 private:
352
353 std::shared_ptr< QgsMarkerSymbol > mAssistantPreviewSymbol;
354};
355
357
358#include "ui_widget_gradientfill.h"
359
361
366class GUI_EXPORT QgsGradientFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetGradientFill
367{
368 Q_OBJECT
369
370 public:
371
377 QgsGradientFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
378
384
385 // from base class
386 void setSymbolLayer( QgsSymbolLayer *layer ) override;
387 QgsSymbolLayer *symbolLayer() override;
388
389 public slots:
390 void setColor( const QColor &color );
391 void setColor2( const QColor &color );
392
396 void applyColorRamp();
397 void setGradientType( int index );
398 void setCoordinateMode( int index );
399 void setGradientSpread( int index );
400
401 protected:
402 QgsGradientFillSymbolLayer *mLayer = nullptr;
403
404 private slots:
405 void offsetChanged();
406 void referencePointChanged();
407 void mOffsetUnitWidget_changed();
408 void colorModeChanged();
409 void mSpinAngle_valueChanged( double value );
410
411};
412
414
415#include "ui_widget_shapeburstfill.h"
416
418
423class GUI_EXPORT QgsShapeburstFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetShapeburstFill
424{
425 Q_OBJECT
426
427 public:
428
435
441
442 // from base class
443 void setSymbolLayer( QgsSymbolLayer *layer ) override;
444 QgsSymbolLayer *symbolLayer() override;
445
446 public slots:
447 void setColor( const QColor &color );
448 void setColor2( const QColor &color );
449
450 protected:
452
453 private slots:
454 void colorModeChanged();
455 void mSpinBlurRadius_valueChanged( int value );
456 void mSpinMaxDistance_valueChanged( double value );
457 void mDistanceUnitWidget_changed();
458 void mRadioUseWholeShape_toggled( bool value );
459 void applyColorRamp();
460 void offsetChanged();
461 void mOffsetUnitWidget_changed();
462 void mIgnoreRingsCheckBox_stateChanged( int state );
463};
464
466
467#include "ui_widget_markerline.h"
468
470
475class GUI_EXPORT QgsMarkerLineSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetMarkerLine
476{
477 Q_OBJECT
478
479 public:
480
486 QgsMarkerLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
487
493
494 // from base class
495 void setSymbolLayer( QgsSymbolLayer *layer ) override;
496 QgsSymbolLayer *symbolLayer() override;
497 void setContext( const QgsSymbolWidgetContext &context ) override;
498
499 public slots:
500
501 void setInterval( double val );
502 void setOffsetAlongLine( double val );
503
504 protected:
505
506 QgsMarkerLineSymbolLayer *mLayer = nullptr;
507
508 private slots:
509 void setRotate();
510 void setOffset();
511 void setPlacement();
512 void mIntervalUnitWidget_changed();
513 void mOffsetUnitWidget_changed();
514 void mOffsetAlongLineUnitWidget_changed();
515 void averageAngleUnitChanged();
516 void setAverageAngle( double val );
517
518};
519
520
521#include "ui_widget_hashline.h"
522
524
531class GUI_EXPORT QgsHashedLineSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetHashedLine
532{
533 Q_OBJECT
534
535 public:
536
542 QgsHashedLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
543
549
550 // from base class
551 void setSymbolLayer( QgsSymbolLayer *layer ) override;
552 QgsSymbolLayer *symbolLayer() override;
553 void setContext( const QgsSymbolWidgetContext &context ) override;
554
555 private slots:
556
557 void setInterval( double val );
558 void setOffsetAlongLine( double val );
559 void setHashLength( double val );
560 void setHashAngle( double val );
561
562 void setRotate();
563 void setOffset();
564 void setPlacement();
565 void mIntervalUnitWidget_changed();
566 void mOffsetUnitWidget_changed();
567 void mOffsetAlongLineUnitWidget_changed();
568 void hashLengthUnitWidgetChanged();
569 void averageAngleUnitChanged();
570 void setAverageAngle( double val );
571 private:
572 QgsHashedLineSymbolLayer *mLayer = nullptr;
573
574
575};
576
578
579#include "ui_widget_svgmarker.h"
580
582
587class GUI_EXPORT QgsSvgMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSvgMarker
588{
589 Q_OBJECT
590
591 public:
592
598 QgsSvgMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
600
606
607 // from base class
608 void setSymbolLayer( QgsSymbolLayer *layer ) override;
609 QgsSymbolLayer *symbolLayer() override;
610
611 void setContext( const QgsSymbolWidgetContext &context ) override;
612
613 public slots:
615 void setSvgPath( const QString &name );
617 void setSvgParameters( const QMap<QString, QgsProperty> &parameters );
618
619
620 protected:
621 // TODO QGIS 4: remove
622
627 Q_DECL_DEPRECATED void populateList() SIP_DEPRECATED {}
628
635 void setGuiForSvg( const QgsSvgMarkerSymbolLayer *layer, bool skipDefaultColors = false );
636
637 QgsSvgMarkerSymbolLayer *mLayer = nullptr;
638
639 private slots:
640 void svgSourceChanged( const QString &text );
641 void mChangeColorButton_colorChanged( const QColor &color );
642 void mChangeStrokeColorButton_colorChanged( const QColor &color );
643 void mStrokeWidthSpinBox_valueChanged( double d );
644 void mSizeUnitWidget_changed();
645 void mStrokeWidthUnitWidget_changed();
646 void mOffsetUnitWidget_changed();
647 void mHorizontalAnchorComboBox_currentIndexChanged( int index );
648 void mVerticalAnchorComboBox_currentIndexChanged( int index );
649 void setWidth();
650 void setHeight();
651 void lockAspectRatioChanged( bool locked );
652 void setAngle();
653 void setOffset();
654 void updateAssistantSymbol();
655
656 private:
657
658 std::shared_ptr< QgsMarkerSymbol > mAssistantPreviewSymbol;
659
660};
661
663
664#include "ui_widget_rastermarker.h"
665
667
674class GUI_EXPORT QgsRasterMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetRasterMarker
675{
676 Q_OBJECT
677
678 public:
679
685 QgsRasterMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
686
692
693 // from base class
694 void setSymbolLayer( QgsSymbolLayer *layer ) override;
695 QgsSymbolLayer *symbolLayer() override;
696 void setContext( const QgsSymbolWidgetContext &context ) override;
697
698 protected:
699
700 QgsRasterMarkerSymbolLayer *mLayer = nullptr;
701
702 private slots:
703 void imageSourceChanged( const QString &text );
704 void mSizeUnitWidget_changed();
705 void mOffsetUnitWidget_changed();
706 void mHorizontalAnchorComboBox_currentIndexChanged( int index );
707 void mVerticalAnchorComboBox_currentIndexChanged( int index );
708 void setWidth();
709 void setHeight();
710 void setLockAspectRatio( bool locked );
711 void setAngle();
712 void setOffset();
713 void setOpacity( double value );
714 void updatePreviewImage();
715
716};
717
718
720
721#include "ui_widget_animatedmarker.h"
722
724
731class GUI_EXPORT QgsAnimatedMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetAnimatedMarker
732{
733 Q_OBJECT
734
735 public:
736
743
749
750 // from base class
751 void setSymbolLayer( QgsSymbolLayer *layer ) override;
752 QgsSymbolLayer *symbolLayer() override;
753 void setContext( const QgsSymbolWidgetContext &context ) override;
754
755 protected:
756
758
759 private slots:
760 void imageSourceChanged( const QString &text );
761 void mSizeUnitWidget_changed();
762 void mOffsetUnitWidget_changed();
763 void mHorizontalAnchorComboBox_currentIndexChanged( int index );
764 void mVerticalAnchorComboBox_currentIndexChanged( int index );
765 void setWidth();
766 void setHeight();
767 void setLockAspectRatio( bool locked );
768 void setAngle();
769 void setOffset();
770 void setOpacity( double value );
771 void updatePreviewImage();
772
773 private:
774
775 QMovie *mPreviewMovie = nullptr;
776
777};
778
779
781
782#include "ui_widget_rasterfill.h"
783
785
790class GUI_EXPORT QgsRasterFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetRasterFill
791{
792 Q_OBJECT
793
794 public:
795
801 QgsRasterFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
802
808
809 // from base class
810 void setSymbolLayer( QgsSymbolLayer *layer ) override;
811 QgsSymbolLayer *symbolLayer() override;
812
813 protected:
814 QgsRasterFillSymbolLayer *mLayer = nullptr;
815
816 private slots:
817 void imageSourceChanged( const QString &text );
818 void setCoordinateMode( int index );
819 void opacityChanged( double value );
820 void offsetChanged();
821 void mOffsetUnitWidget_changed();
822 void mRotationSpinBox_valueChanged( double d );
823 void mWidthUnitWidget_changed();
824 void mWidthSpinBox_valueChanged( double d );
825
826 private:
827 void updatePreviewImage();
828};
829
830
832
833#include "ui_widget_rasterline.h"
834
836
843class GUI_EXPORT QgsRasterLineSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetRasterLine
844{
845 Q_OBJECT
846
847 public:
848
854 QgsRasterLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
855
861
862 // from base class
863 void setSymbolLayer( QgsSymbolLayer *layer ) override;
864 QgsSymbolLayer *symbolLayer() override;
865
866 protected:
867
868 QgsRasterLineSymbolLayer *mLayer = nullptr;
869
870 private slots:
871 void imageSourceChanged( const QString &text );
872 void updatePreviewImage();
873
874};
875
876
878
879#include "ui_widget_gradientline.h"
880
882
889class GUI_EXPORT QgsLineburstSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetGradientLine
890{
891 Q_OBJECT
892
893 public:
894
900 QgsLineburstSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
901
907
908 // from base class
909 void setSymbolLayer( QgsSymbolLayer *layer ) override;
910 QgsSymbolLayer *symbolLayer() override;
911
912 protected:
913
914 QgsLineburstSymbolLayer *mLayer = nullptr;
915
916};
917
919
920#include "ui_widget_svgfill.h"
921
923
928class GUI_EXPORT QgsSVGFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSVGFill
929{
930 Q_OBJECT
931
932 public:
933
939 QgsSVGFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
940
946
947 // from base class
948 void setSymbolLayer( QgsSymbolLayer *layer ) override;
949 QgsSymbolLayer *symbolLayer() override;
950 void setContext( const QgsSymbolWidgetContext &context ) override;
951
952 protected:
953 QgsSVGFillSymbolLayer *mLayer = nullptr;
954
961 void updateParamGui( bool resetValues = true );
962
963 private slots:
964 void mTextureWidthSpinBox_valueChanged( double d );
965 void svgSourceChanged( const QString &text );
966 void setFile( const QString &name );
967 void setSvgParameters( const QMap<QString, QgsProperty> &parameters );
968 void mRotationSpinBox_valueChanged( double d );
969 void mChangeColorButton_colorChanged( const QColor &color );
970 void mChangeStrokeColorButton_colorChanged( const QColor &color );
971 void mStrokeWidthSpinBox_valueChanged( double d );
972 void mTextureWidthUnitWidget_changed();
973 void mSvgStrokeWidthUnitWidget_changed();
974};
975
977
978#include "ui_widget_linepatternfill.h"
979
981
986class GUI_EXPORT QgsLinePatternFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetLinePatternFill
987{
988 Q_OBJECT
989
990 public:
991
998
1004
1005 void setSymbolLayer( QgsSymbolLayer *layer ) override;
1006 QgsSymbolLayer *symbolLayer() override;
1007
1008 protected:
1010
1011 private slots:
1012 void mAngleSpinBox_valueChanged( double d );
1013 void mDistanceSpinBox_valueChanged( double d );
1014 void mOffsetSpinBox_valueChanged( double d );
1015 void mDistanceUnitWidget_changed();
1016 void mOffsetUnitWidget_changed();
1017};
1018
1020
1021#include "ui_widget_pointpatternfill.h"
1022
1024
1029class GUI_EXPORT QgsPointPatternFillSymbolLayerWidget: public QgsSymbolLayerWidget, private Ui::WidgetPointPatternFill
1030{
1031 Q_OBJECT
1032
1033 public:
1034
1041
1047
1048 void setSymbolLayer( QgsSymbolLayer *layer ) override;
1049 QgsSymbolLayer *symbolLayer() override;
1050
1051 protected:
1053
1054 private slots:
1055 void mHorizontalDistanceSpinBox_valueChanged( double d );
1056 void mVerticalDistanceSpinBox_valueChanged( double d );
1057 void mHorizontalDisplacementSpinBox_valueChanged( double d );
1058 void mVerticalDisplacementSpinBox_valueChanged( double d );
1059 void mHorizontalOffsetSpinBox_valueChanged( double d );
1060 void mVerticalOffsetSpinBox_valueChanged( double d );
1061 void mHorizontalDistanceUnitWidget_changed();
1062 void mVerticalDistanceUnitWidget_changed();
1063 void mHorizontalDisplacementUnitWidget_changed();
1064 void mVerticalDisplacementUnitWidget_changed();
1065 void mHorizontalOffsetUnitWidget_changed();
1066 void mVerticalOffsetUnitWidget_changed();
1067};
1068
1069
1071
1072#include "ui_widget_randommarkerfill.h"
1073
1075
1084class GUI_EXPORT QgsRandomMarkerFillSymbolLayerWidget: public QgsSymbolLayerWidget, private Ui::WidgetRandomMarkerFill
1085{
1086 Q_OBJECT
1087
1088 public:
1089
1096
1102
1103 void setSymbolLayer( QgsSymbolLayer *layer ) override;
1104 QgsSymbolLayer *symbolLayer() override;
1105
1106 private:
1107 QgsRandomMarkerFillSymbolLayer *mLayer = nullptr;
1108
1109 private slots:
1110
1111 void countMethodChanged( int );
1112 void countChanged( int d );
1113 void densityAreaChanged( double d );
1114 void densityAreaUnitChanged();
1115 void seedChanged( int d );
1116};
1117
1119
1120#include "ui_widget_fontmarker.h"
1121
1123class CharacterWidget;
1124
1129class GUI_EXPORT QgsFontMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetFontMarker
1130{
1131 Q_OBJECT
1132
1133 public:
1134
1140 QgsFontMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1142
1148
1149 // from base class
1150 void setSymbolLayer( QgsSymbolLayer *layer ) override;
1151 QgsSymbolLayer *symbolLayer() override;
1152
1153 public slots:
1154 void setFontFamily( const QFont &font );
1155 void setColor( const QColor &color );
1156
1161 void setColorStroke( const QColor &color );
1162 void setSize( double size );
1163 void setAngle( double angle );
1164
1169 void setCharacter( QChar chr );
1170
1176 void setCharacterFromText( const QString &text );
1177
1178 protected:
1179 QgsFontMarkerSymbolLayer *mLayer = nullptr;
1180 CharacterWidget *widgetChar = nullptr;
1181
1182 private slots:
1183
1188 void setFontStyle( const QString &style );
1189
1190 void setOffset();
1191 void mSizeUnitWidget_changed();
1192 void mOffsetUnitWidget_changed();
1193 void mStrokeWidthUnitWidget_changed();
1194 void mStrokeWidthSpinBox_valueChanged( double d );
1195
1196 void populateFontStyleComboBox();
1197 void mFontStyleComboBox_currentIndexChanged( int index );
1198
1199 void mHorizontalAnchorComboBox_currentIndexChanged( int index );
1200 void mVerticalAnchorComboBox_currentIndexChanged( int index );
1201 void penJoinStyleChanged();
1202 void updateAssistantSymbol();
1203
1204 private:
1205
1206 std::shared_ptr< QgsMarkerSymbol > mAssistantPreviewSymbol;
1207
1208 QFont mRefFont;
1209 QFontDatabase mFontDB;
1210
1211};
1212
1214
1215
1216#include "ui_widget_centroidfill.h"
1217
1219
1224class GUI_EXPORT QgsCentroidFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetCentroidFill
1225{
1226 Q_OBJECT
1227
1228 public:
1229
1235 QgsCentroidFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1236
1242
1243 // from base class
1244 void setSymbolLayer( QgsSymbolLayer *layer ) override;
1245 QgsSymbolLayer *symbolLayer() override;
1246
1247 protected:
1249
1250 private slots:
1251 void mDrawInsideCheckBox_stateChanged( int state );
1252 void mDrawAllPartsCheckBox_stateChanged( int state );
1253 void mClipPointsCheckBox_stateChanged( int state );
1254 void mClipOnCurrentPartOnlyCheckBox_stateChanged( int state );
1255};
1256
1257
1258#include "ui_qgsgeometrygeneratorwidgetbase.h"
1259#include "qgis_gui.h"
1260
1262
1267class GUI_EXPORT QgsGeometryGeneratorSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::GeometryGeneratorWidgetBase
1268{
1269 Q_OBJECT
1270
1271 public:
1272
1279
1284
1285 // from base class
1286 void setSymbolLayer( QgsSymbolLayer *layer ) override;
1287 QgsSymbolLayer *symbolLayer() override;
1288
1289 private:
1290 QgsGeometryGeneratorSymbolLayer *mLayer = nullptr;
1291 int mBlockSignals = 0;
1292
1293 private slots:
1294 void updateExpression( const QString &string );
1295 void updateSymbolType();
1296};
1297
1298#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.
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...
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.
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsGradientFillSymbolLayerWidget.
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 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.
Map canvas is a class for displaying all GIS data types on a canvas.
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.
~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