QGIS API Documentation  3.14.0-Pi (9f7028fd23)
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"
22 #include "qgssymbolwidgetcontext.h"
23 #include "qgssymbollayer.h"
24 #include <QWidget>
25 #include <QStandardItemModel>
26 
27 class QgsVectorLayer;
28 class QgsMapCanvas;
29 
34 class GUI_EXPORT QgsSymbolLayerWidget : public QWidget, protected QgsExpressionContextGenerator
35 {
36  Q_OBJECT
37 
38  public:
39 
45  QgsSymbolLayerWidget( QWidget *parent SIP_TRANSFERTHIS, QgsVectorLayer *vl = nullptr )
46  : QWidget( parent )
47  , mVectorLayer( vl )
48  {}
49 
50  virtual void setSymbolLayer( QgsSymbolLayer *layer ) = 0;
51  virtual QgsSymbolLayer *symbolLayer() = 0;
52 
59  virtual void setContext( const QgsSymbolWidgetContext &context );
60 
66  QgsSymbolWidgetContext context() const;
67 
72  const QgsVectorLayer *vectorLayer() const { return mVectorLayer; }
73 
74  protected:
75 
82  void registerDataDefinedButton( QgsPropertyOverrideButton *button, QgsSymbolLayer::Property key );
83 
85 
86  private:
87  QgsVectorLayer *mVectorLayer = nullptr;
88 
89  QgsMapCanvas *mMapCanvas = nullptr;
90 
91  signals:
92 
97  void changed();
98 
105  void symbolChanged();
106 
107  protected slots:
108  void updateDataDefinedProperty();
109 
110  private slots:
111  void createAuxiliaryField();
112 
113  private:
114  QgsSymbolWidgetContext mContext;
115 };
116 
118 
119 #include "ui_widget_simpleline.h"
120 
122 
127 class GUI_EXPORT QgsSimpleLineSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSimpleLine
128 {
129  Q_OBJECT
130 
131  public:
132 
138  QgsSimpleLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
139 
145 
146  // from base class
147  void setSymbolLayer( QgsSymbolLayer *layer ) override;
148  QgsSymbolLayer *symbolLayer() override;
149 
150  protected:
151  QgsSimpleLineSymbolLayer *mLayer = nullptr;
152 
153  //creates a new icon for the 'change pattern' button
154  void updatePatternIcon();
155 
156  void resizeEvent( QResizeEvent *event ) override;
157 
158  private slots:
159 
160  void updateAssistantSymbol();
161  void penWidthChanged();
162  void colorChanged( const QColor &color );
163  void penStyleChanged();
164  void offsetChanged();
165  void mCustomCheckBox_stateChanged( int state );
166  void mChangePatternButton_clicked();
167  void mPenWidthUnitWidget_changed();
168  void mOffsetUnitWidget_changed();
169  void mDashPatternUnitWidget_changed();
170  void mDrawInsideCheckBox_stateChanged( int state );
171 
172  private:
173 
174  std::shared_ptr< QgsLineSymbol > mAssistantPreviewSymbol;
175 
176 };
177 
179 
180 #include "ui_widget_simplemarker.h"
181 
183 
188 class GUI_EXPORT QgsSimpleMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSimpleMarker
189 {
190  Q_OBJECT
191 
192  public:
193 
199  QgsSimpleMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
200 
206 
207  // from base class
208  void setSymbolLayer( QgsSymbolLayer *layer ) override;
209  QgsSymbolLayer *symbolLayer() override;
210 
211  public slots:
212 
213  void setColorStroke( const QColor &color );
214  void setColorFill( const QColor &color );
215 
216  protected:
217  QgsSimpleMarkerSymbolLayer *mLayer = nullptr;
218 
219  private slots:
220  void setSize();
221  void setAngle();
222  void setOffset();
223  void mSizeUnitWidget_changed();
224  void mOffsetUnitWidget_changed();
225  void mStrokeWidthUnitWidget_changed();
226  void mStrokeStyleComboBox_currentIndexChanged( int index );
227  void mStrokeWidthSpinBox_valueChanged( double d );
228  void mHorizontalAnchorComboBox_currentIndexChanged( int index );
229  void mVerticalAnchorComboBox_currentIndexChanged( int index );
230  void setShape();
231  void updateAssistantSymbol();
232  void penJoinStyleChanged();
233 
234  private:
235 
236  std::shared_ptr< QgsMarkerSymbol > mAssistantPreviewSymbol;
237 };
238 
240 
241 #include "ui_widget_simplefill.h"
242 
244 
249 class GUI_EXPORT QgsSimpleFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSimpleFill
250 {
251  Q_OBJECT
252 
253  public:
254 
260  QgsSimpleFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
261 
267 
268  // from base class
269  void setSymbolLayer( QgsSymbolLayer *layer ) override;
270  QgsSymbolLayer *symbolLayer() override;
271 
272  public slots:
273  void setColor( const QColor &color );
274  void setStrokeColor( const QColor &color );
275 
276  protected:
277  QgsSimpleFillSymbolLayer *mLayer = nullptr;
278 
279  private slots:
280  void setBrushStyle();
281  void strokeWidthChanged();
282  void strokeStyleChanged();
283  void offsetChanged();
284  void mStrokeWidthUnitWidget_changed();
285  void mOffsetUnitWidget_changed();
286 
287 };
288 
289 
291 
292 #include "ui_widget_filledmarker.h"
293 
295 
302 class GUI_EXPORT QgsFilledMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetFilledMarker
303 {
304  Q_OBJECT
305 
306  public:
307 
313  QgsFilledMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
314 
320 
321  // from base class
322  void setSymbolLayer( QgsSymbolLayer *layer ) override;
323  QgsSymbolLayer *symbolLayer() override;
324 
325  protected:
326  QgsFilledMarkerSymbolLayer *mLayer = nullptr;
327 
328  private slots:
329 
330  void updateAssistantSymbol();
331  void setShape();
332  void setSize();
333  void setAngle();
334  void setOffset();
335  void mSizeUnitWidget_changed();
336  void mOffsetUnitWidget_changed();
337  void mHorizontalAnchorComboBox_currentIndexChanged( int index );
338  void mVerticalAnchorComboBox_currentIndexChanged( int index );
339 
340  private:
341 
342  std::shared_ptr< QgsMarkerSymbol > mAssistantPreviewSymbol;
343 };
344 
346 
347 #include "ui_widget_gradientfill.h"
348 
350 
355 class GUI_EXPORT QgsGradientFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetGradientFill
356 {
357  Q_OBJECT
358 
359  public:
360 
366  QgsGradientFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
367 
373 
374  // from base class
375  void setSymbolLayer( QgsSymbolLayer *layer ) override;
376  QgsSymbolLayer *symbolLayer() override;
377 
378  public slots:
379  void setColor( const QColor &color );
380  void setColor2( const QColor &color );
381 
385  void applyColorRamp();
386  void setGradientType( int index );
387  void setCoordinateMode( int index );
388  void setGradientSpread( int index );
389 
390  protected:
391  QgsGradientFillSymbolLayer *mLayer = nullptr;
392 
393  private slots:
394  void offsetChanged();
395  void referencePointChanged();
396  void mOffsetUnitWidget_changed();
397  void colorModeChanged();
398  void mSpinAngle_valueChanged( double value );
399 
400 };
401 
403 
404 #include "ui_widget_shapeburstfill.h"
405 
407 
412 class GUI_EXPORT QgsShapeburstFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetShapeburstFill
413 {
414  Q_OBJECT
415 
416  public:
417 
423  QgsShapeburstFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
424 
430 
431  // from base class
432  void setSymbolLayer( QgsSymbolLayer *layer ) override;
433  QgsSymbolLayer *symbolLayer() override;
434 
435  public slots:
436  void setColor( const QColor &color );
437  void setColor2( const QColor &color );
438 
439  protected:
440  QgsShapeburstFillSymbolLayer *mLayer = nullptr;
441 
442  private slots:
443  void colorModeChanged();
444  void mSpinBlurRadius_valueChanged( int value );
445  void mSpinMaxDistance_valueChanged( double value );
446  void mDistanceUnitWidget_changed();
447  void mRadioUseWholeShape_toggled( bool value );
448  void applyColorRamp();
449  void offsetChanged();
450  void mOffsetUnitWidget_changed();
451  void mIgnoreRingsCheckBox_stateChanged( int state );
452 };
453 
455 
456 #include "ui_widget_markerline.h"
457 
459 
464 class GUI_EXPORT QgsMarkerLineSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetMarkerLine
465 {
466  Q_OBJECT
467 
468  public:
469 
475  QgsMarkerLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
476 
482 
483  // from base class
484  void setSymbolLayer( QgsSymbolLayer *layer ) override;
485  QgsSymbolLayer *symbolLayer() override;
486 
487  public slots:
488 
489  void setInterval( double val );
490  void setOffsetAlongLine( double val );
491 
492  protected:
493 
494  QgsMarkerLineSymbolLayer *mLayer = nullptr;
495 
496  private slots:
497  void setRotate();
498  void setOffset();
499  void setPlacement();
500  void mIntervalUnitWidget_changed();
501  void mOffsetUnitWidget_changed();
502  void mOffsetAlongLineUnitWidget_changed();
503  void averageAngleUnitChanged();
504  void setAverageAngle( double val );
505 
506 };
507 
508 
509 #include "ui_widget_hashline.h"
510 
512 
519 class GUI_EXPORT QgsHashedLineSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetHashedLine
520 {
521  Q_OBJECT
522 
523  public:
524 
530  QgsHashedLineSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
531 
537 
538  // from base class
539  void setSymbolLayer( QgsSymbolLayer *layer ) override;
540  QgsSymbolLayer *symbolLayer() override;
541 
542  private slots:
543 
544  void setInterval( double val );
545  void setOffsetAlongLine( double val );
546  void setHashLength( double val );
547  void setHashAngle( double val );
548 
549  void setRotate();
550  void setOffset();
551  void setPlacement();
552  void mIntervalUnitWidget_changed();
553  void mOffsetUnitWidget_changed();
554  void mOffsetAlongLineUnitWidget_changed();
555  void hashLengthUnitWidgetChanged();
556  void averageAngleUnitChanged();
557  void setAverageAngle( double val );
558  private:
559  QgsHashedLineSymbolLayer *mLayer = nullptr;
560 
561 
562 };
563 
565 
566 #include "ui_widget_svgmarker.h"
567 
569 
574 class GUI_EXPORT QgsSvgMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSvgMarker
575 {
576  Q_OBJECT
577 
578  public:
579 
585  QgsSvgMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
586 
592 
593  // from base class
594  void setSymbolLayer( QgsSymbolLayer *layer ) override;
595  QgsSymbolLayer *symbolLayer() override;
596 
597  void setContext( const QgsSymbolWidgetContext &context ) override;
598 
599  protected:
600 
601  void populateList();
602  //update gui for svg file (insert new path, update activation of gui elements for svg params)
603  void setGuiForSvg( const QgsSvgMarkerSymbolLayer *layer );
604 
605  QgsSvgMarkerSymbolLayer *mLayer = nullptr;
606 
607  private slots:
608  void setName( const QModelIndex &idx );
609  void populateIcons( const QModelIndex &idx );
610  void svgSourceChanged( const QString &text );
611  void mChangeColorButton_colorChanged( const QColor &color );
612  void mChangeStrokeColorButton_colorChanged( const QColor &color );
613  void mStrokeWidthSpinBox_valueChanged( double d );
614  void mSizeUnitWidget_changed();
615  void mStrokeWidthUnitWidget_changed();
616  void mOffsetUnitWidget_changed();
617  void mHorizontalAnchorComboBox_currentIndexChanged( int index );
618  void mVerticalAnchorComboBox_currentIndexChanged( int index );
619  void setWidth();
620  void setHeight();
621  void lockAspectRatioChanged( bool locked );
622  void setAngle();
623  void setOffset();
624  void updateAssistantSymbol();
625 
626  private:
627 
628  std::shared_ptr< QgsMarkerSymbol > mAssistantPreviewSymbol;
629  int mIconSize = 30;
630 
631 };
632 
634 
635 #include "ui_widget_rastermarker.h"
636 
638 
645 class GUI_EXPORT QgsRasterMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetRasterMarker
646 {
647  Q_OBJECT
648 
649  public:
650 
656  QgsRasterMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
657 
663 
664  // from base class
665  void setSymbolLayer( QgsSymbolLayer *layer ) override;
666  QgsSymbolLayer *symbolLayer() override;
667  void setContext( const QgsSymbolWidgetContext &context ) override;
668 
669  protected:
670 
671  QgsRasterMarkerSymbolLayer *mLayer = nullptr;
672 
673  private slots:
674  void imageSourceChanged( const QString &text );
675  void mSizeUnitWidget_changed();
676  void mOffsetUnitWidget_changed();
677  void mHorizontalAnchorComboBox_currentIndexChanged( int index );
678  void mVerticalAnchorComboBox_currentIndexChanged( int index );
679  void setWidth();
680  void setHeight();
681  void setLockAspectRatio( bool locked );
682  void setAngle();
683  void setOffset();
684  void setOpacity( double value );
685  void updatePreviewImage();
686 
687 };
688 
690 
691 #include "ui_widget_rasterfill.h"
692 
694 
699 class GUI_EXPORT QgsRasterFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetRasterFill
700 {
701  Q_OBJECT
702 
703  public:
704 
710  QgsRasterFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
711 
717 
718  // from base class
719  void setSymbolLayer( QgsSymbolLayer *layer ) override;
720  QgsSymbolLayer *symbolLayer() override;
721 
722  protected:
723  QgsRasterFillSymbolLayer *mLayer = nullptr;
724 
725  private slots:
726  void imageSourceChanged( const QString &text );
727  void setCoordinateMode( int index );
728  void opacityChanged( double value );
729  void offsetChanged();
730  void mOffsetUnitWidget_changed();
731  void mRotationSpinBox_valueChanged( double d );
732  void mWidthUnitWidget_changed();
733  void mWidthSpinBox_valueChanged( double d );
734 
735  private:
736  void updatePreviewImage();
737 };
738 
740 
741 #include "ui_widget_svgfill.h"
742 
744 
749 class GUI_EXPORT QgsSVGFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetSVGFill
750 {
751  Q_OBJECT
752 
753  public:
754 
760  QgsSVGFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
761 
767 
768  // from base class
769  void setSymbolLayer( QgsSymbolLayer *layer ) override;
770  QgsSymbolLayer *symbolLayer() override;
771  void setContext( const QgsSymbolWidgetContext &context ) override;
772 
773  protected:
774  QgsSVGFillSymbolLayer *mLayer = nullptr;
775  void insertIcons();
776 
783  void updateParamGui( bool resetValues = true );
784 
785  private slots:
786  void mTextureWidthSpinBox_valueChanged( double d );
787  void svgSourceChanged( const QString &text );
788  void setFile( const QModelIndex &item );
789  void populateIcons( const QModelIndex &item );
790  void mRotationSpinBox_valueChanged( double d );
791  void mChangeColorButton_colorChanged( const QColor &color );
792  void mChangeStrokeColorButton_colorChanged( const QColor &color );
793  void mStrokeWidthSpinBox_valueChanged( double d );
794  void mTextureWidthUnitWidget_changed();
795  void mSvgStrokeWidthUnitWidget_changed();
796 
797  private:
798  int mIconSize = 30;
799 };
800 
802 
803 #include "ui_widget_linepatternfill.h"
804 
806 
811 class GUI_EXPORT QgsLinePatternFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetLinePatternFill
812 {
813  Q_OBJECT
814 
815  public:
816 
822  QgsLinePatternFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
823 
829 
830  void setSymbolLayer( QgsSymbolLayer *layer ) override;
831  QgsSymbolLayer *symbolLayer() override;
832 
833  protected:
834  QgsLinePatternFillSymbolLayer *mLayer = nullptr;
835 
836  private slots:
837  void mAngleSpinBox_valueChanged( double d );
838  void mDistanceSpinBox_valueChanged( double d );
839  void mOffsetSpinBox_valueChanged( double d );
840  void mDistanceUnitWidget_changed();
841  void mOffsetUnitWidget_changed();
842 };
843 
845 
846 #include "ui_widget_pointpatternfill.h"
847 
849 
854 class GUI_EXPORT QgsPointPatternFillSymbolLayerWidget: public QgsSymbolLayerWidget, private Ui::WidgetPointPatternFill
855 {
856  Q_OBJECT
857 
858  public:
859 
865  QgsPointPatternFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
866 
872 
873  void setSymbolLayer( QgsSymbolLayer *layer ) override;
874  QgsSymbolLayer *symbolLayer() override;
875 
876  protected:
878 
879  private slots:
880  void mHorizontalDistanceSpinBox_valueChanged( double d );
881  void mVerticalDistanceSpinBox_valueChanged( double d );
882  void mHorizontalDisplacementSpinBox_valueChanged( double d );
883  void mVerticalDisplacementSpinBox_valueChanged( double d );
884  void mHorizontalOffsetSpinBox_valueChanged( double d );
885  void mVerticalOffsetSpinBox_valueChanged( double d );
886  void mHorizontalDistanceUnitWidget_changed();
887  void mVerticalDistanceUnitWidget_changed();
888  void mHorizontalDisplacementUnitWidget_changed();
889  void mVerticalDisplacementUnitWidget_changed();
890  void mHorizontalOffsetUnitWidget_changed();
891  void mVerticalOffsetUnitWidget_changed();
892 };
893 
894 
896 
897 #include "ui_widget_randommarkerfill.h"
898 
900 
909 class GUI_EXPORT QgsRandomMarkerFillSymbolLayerWidget: public QgsSymbolLayerWidget, private Ui::WidgetRandomMarkerFill
910 {
911  Q_OBJECT
912 
913  public:
914 
920  QgsRandomMarkerFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
921 
927 
928  void setSymbolLayer( QgsSymbolLayer *layer ) override;
929  QgsSymbolLayer *symbolLayer() override;
930 
931  private:
932  QgsRandomMarkerFillSymbolLayer *mLayer = nullptr;
933 
934  private slots:
935 
936  void countMethodChanged( int );
937  void countChanged( int d );
938  void densityAreaChanged( double d );
939  void densityAreaUnitChanged();
940  void seedChanged( int d );
941 };
942 
944 
945 #include "ui_widget_fontmarker.h"
946 
948 class CharacterWidget;
949 
954 class GUI_EXPORT QgsFontMarkerSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetFontMarker
955 {
956  Q_OBJECT
957 
958  public:
959 
965  QgsFontMarkerSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
966 
972 
973  // from base class
974  void setSymbolLayer( QgsSymbolLayer *layer ) override;
975  QgsSymbolLayer *symbolLayer() override;
976 
977  public slots:
978  void setFontFamily( const QFont &font );
979  void setColor( const QColor &color );
980 
984  void setColorStroke( const QColor &color );
985  void setSize( double size );
986  void setAngle( double angle );
987 
992  void setCharacter( QChar chr );
993 
999  void setCharacterFromText( const QString &text );
1000 
1001  protected:
1002  QgsFontMarkerSymbolLayer *mLayer = nullptr;
1003  CharacterWidget *widgetChar = nullptr;
1004 
1005  private slots:
1006 
1011  void setFontStyle( const QString &style );
1012 
1013  void setOffset();
1014  void mSizeUnitWidget_changed();
1015  void mOffsetUnitWidget_changed();
1016  void mStrokeWidthUnitWidget_changed();
1017  void mStrokeWidthSpinBox_valueChanged( double d );
1018 
1019  void populateFontStyleComboBox();
1020  void mFontStyleComboBox_currentIndexChanged( int index );
1021 
1022  void mHorizontalAnchorComboBox_currentIndexChanged( int index );
1023  void mVerticalAnchorComboBox_currentIndexChanged( int index );
1024  void penJoinStyleChanged();
1025  void updateAssistantSymbol();
1026 
1027  private:
1028 
1029  std::shared_ptr< QgsMarkerSymbol > mAssistantPreviewSymbol;
1030 
1031  QFont mRefFont;
1032  QFontDatabase mFontDB;
1033 
1034 };
1035 
1037 
1038 
1039 #include "ui_widget_centroidfill.h"
1040 
1042 
1047 class GUI_EXPORT QgsCentroidFillSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::WidgetCentroidFill
1048 {
1049  Q_OBJECT
1050 
1051  public:
1052 
1058  QgsCentroidFillSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1059 
1065 
1066  // from base class
1067  void setSymbolLayer( QgsSymbolLayer *layer ) override;
1068  QgsSymbolLayer *symbolLayer() override;
1069 
1070  protected:
1071  QgsCentroidFillSymbolLayer *mLayer = nullptr;
1072 
1073  private slots:
1074  void mDrawInsideCheckBox_stateChanged( int state );
1075  void mDrawAllPartsCheckBox_stateChanged( int state );
1076  void mClipPointsCheckBox_stateChanged( int state );
1077  void mClipOnCurrentPartOnlyCheckBox_stateChanged( int state );
1078 };
1079 
1080 
1081 #include "ui_qgsgeometrygeneratorwidgetbase.h"
1082 #include "qgis_gui.h"
1083 
1085 
1090 class GUI_EXPORT QgsGeometryGeneratorSymbolLayerWidget : public QgsSymbolLayerWidget, private Ui::GeometryGeneratorWidgetBase
1091 {
1092  Q_OBJECT
1093 
1094  public:
1095 
1101  QgsGeometryGeneratorSymbolLayerWidget( QgsVectorLayer *vl, QWidget *parent SIP_TRANSFERTHIS = nullptr );
1102 
1107 
1108  // from base class
1109  void setSymbolLayer( QgsSymbolLayer *layer ) override;
1110  QgsSymbolLayer *symbolLayer() override;
1111 
1112  private:
1113  QgsGeometryGeneratorSymbolLayer *mLayer = nullptr;
1114 
1115  private slots:
1116  void updateExpression( const QString &string );
1117  void updateSymbolType();
1118 };
1119 
1120 #endif
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition: qgsexpressioncontext.h:369
QgsPointPatternFillSymbolLayer
Definition: qgsfillsymbollayer.h:1465
QgsSimpleLineSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsSimpleLineSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:144
QgsGradientFillSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsGradientFillSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:372
QgsSymbolLayerWidget::setSymbolLayer
virtual void setSymbolLayer(QgsSymbolLayer *layer)=0
QgsLinePatternFillSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsLinePatternFillSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:828
QgsFilledMarkerSymbolLayer
Filled marker symbol layer, consisting of a shape which is rendered using a QgsFillSymbol....
Definition: qgsmarkersymbollayer.h:426
QgsSymbolLayerWidget::vectorLayer
const QgsVectorLayer * vectorLayer() const
Returns the vector layer associated with the widget.
Definition: qgssymbollayerwidget.h:72
QgsSimpleFillSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsSimpleFillSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:266
QgsMarkerLineSymbolLayerWidget
Definition: qgssymbollayerwidget.h:464
QgsSymbolLayerWidget::symbolLayer
virtual QgsSymbolLayer * symbolLayer()=0
QgsGradientFillSymbolLayer
Definition: qgsfillsymbollayer.h:175
QgsHashedLineSymbolLayer
Definition: qgslinesymbollayer.h:656
CharacterWidget
Definition: characterwidget.h:69
QgsSimpleLineSymbolLayerWidget
Definition: qgssymbollayerwidget.h:127
QgsSymbolLayerWidget
Definition: qgssymbollayerwidget.h:34
QgsSymbolWidgetContext
Definition: qgssymbolwidgetcontext.h:35
QgsMapCanvas
Definition: qgsmapcanvas.h:83
QgsPointPatternFillSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsPointPatternFillSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:871
QgsRandomMarkerFillSymbolLayerWidget
Definition: qgssymbollayerwidget.h:909
QgsSimpleMarkerSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsSimpleMarkerSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:205
QgsMarkerLineSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsMarkerLineSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:481
QgsRasterFillSymbolLayer
A class for filling symbols with a repeated raster image.
Definition: qgsfillsymbollayer.h:725
QgsSvgMarkerSymbolLayerWidget
Definition: qgssymbollayerwidget.h:574
QgsRandomMarkerFillSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsRandomMarkerFillSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:926
QgsMarkerLineSymbolLayer
Definition: qgslinesymbollayer.h:567
qgssymbolwidgetcontext.h
QgsPropertyOverrideButton
Definition: qgspropertyoverridebutton.h:50
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsCentroidFillSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsCentroidFillSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:1064
QgsRasterFillSymbolLayerWidget
Definition: qgssymbollayerwidget.h:699
QgsSymbolLayer
Definition: qgssymbollayer.h:52
QgsSvgMarkerSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsSvgMarkerSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:591
QgsSymbolLayerWidget::setContext
virtual void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression ...
Definition: qgssymbollayerwidget.cpp:105
QgsRasterFillSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsRasterFillSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:716
QgsFontMarkerSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsFontMarkerSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:971
QgsSimpleLineSymbolLayer
Definition: qgslinesymbollayer.h:39
QgsHashedLineSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsHashedLineSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:536
QgsLinePatternFillSymbolLayer
Definition: qgsfillsymbollayer.h:1217
QgsSimpleMarkerSymbolLayer
Simple marker symbol layer, consisting of a rendered shape with solid fill color and an stroke.
Definition: qgsmarkersymbollayer.h:198
QgsSvgMarkerSymbolLayer
Definition: qgsmarkersymbollayer.h:482
QgsGradientFillSymbolLayerWidget
Definition: qgssymbollayerwidget.h:355
qgis_sip.h
QgsGeometryGeneratorSymbolLayer
Definition: qgsgeometrygeneratorsymbollayer.h:26
QgsSVGFillSymbolLayer
Definition: qgsfillsymbollayer.h:950
QgsShapeburstFillSymbolLayer
Definition: qgsfillsymbollayer.h:349
QgsExpressionContextGenerator::createExpressionContext
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
QgsRasterMarkerSymbolLayer
Raster marker symbol layer class.
Definition: qgsmarkersymbollayer.h:650
QgsRasterMarkerSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsRasterMarkerSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:662
qgssymbollayer.h
QgsShapeburstFillSymbolLayerWidget
Definition: qgssymbollayerwidget.h:412
QgsGeometryGeneratorSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Will be registered as factory.
Definition: qgssymbollayerwidget.h:1106
QgsLinePatternFillSymbolLayerWidget
Definition: qgssymbollayerwidget.h:811
QgsCentroidFillSymbolLayerWidget
Definition: qgssymbollayerwidget.h:1047
QgsSVGFillSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsSVGFillSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:766
QgsSimpleMarkerSymbolLayerWidget
Definition: qgssymbollayerwidget.h:188
QgsVectorLayer
Definition: qgsvectorlayer.h:385
QgsShapeburstFillSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsShapeburstFillSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:429
QgsFontMarkerSymbolLayer
Definition: qgsmarkersymbollayer.h:800
QgsRandomMarkerFillSymbolLayer
Definition: qgsfillsymbollayer.h:1736
QgsSVGFillSymbolLayerWidget
Definition: qgssymbollayerwidget.h:749
QgsSimpleFillSymbolLayer
Definition: qgsfillsymbollayer.h:39
QgsFontMarkerSymbolLayerWidget
Definition: qgssymbollayerwidget.h:954
QgsSymbolLayer::Property
Property
Data definable properties.
Definition: qgssymbollayer.h:130
QgsGeometryGeneratorSymbolLayerWidget
Definition: qgssymbollayerwidget.h:1090
QgsCentroidFillSymbolLayer
Definition: qgsfillsymbollayer.h:1925
QgsPointPatternFillSymbolLayerWidget
Definition: qgssymbollayerwidget.h:854
QgsFilledMarkerSymbolLayerWidget::create
static QgsSymbolLayerWidget * create(QgsVectorLayer *vl)
Creates a new QgsFilledMarkerSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:319
QgsExpressionContextGenerator
Definition: qgsexpressioncontextgenerator.h:36
MathUtils::angle
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
Definition: MathUtils.cpp:786
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
QgsSimpleFillSymbolLayerWidget
Definition: qgssymbollayerwidget.h:249
QgsFilledMarkerSymbolLayerWidget
Widget for configuring QgsFilledMarkerSymbolLayer symbol layers.
Definition: qgssymbollayerwidget.h:302
qgspropertyoverridebutton.h
QgsRasterMarkerSymbolLayerWidget
Widget for configuring QgsRasterMarkerSymbolLayer symbol layers.
Definition: qgssymbollayerwidget.h:645
QgsSymbolLayerWidget::QgsSymbolLayerWidget
QgsSymbolLayerWidget(QWidget *parent, QgsVectorLayer *vl=nullptr)
Constructor for QgsSymbolLayerWidget.
Definition: qgssymbollayerwidget.h:45
QgsHashedLineSymbolLayerWidget
Definition: qgssymbollayerwidget.h:519