16 #ifndef QGSDATADEFINEDSIZELEGENDWIDGET_H 17 #define QGSDATADEFINEDSIZELEGENDWIDGET_H 23 #include "ui_qgsdatadefinedsizelegendwidget.h" 27 #include <QStyledItemDelegate> 29 class QStandardItemModel;
46 class GUI_EXPORT QgsDataDefinedSizeLegendWidget :
public QgsPanelWidget,
private Ui::QgsDataDefinedSizeLegendWidget
58 ~QgsDataDefinedSizeLegendWidget()
override;
69 void removeSizeClass();
70 void onSizeClassesChanged();
73 std::unique_ptr<QgsMarkerSymbol> mSourceSymbol;
74 bool mOverrideSymbol =
false;
81 QStandardItemModel *mSizeClassesModel =
nullptr;
88 class SizeClassDelegate :
public QStyledItemDelegate
93 SizeClassDelegate( QObject *parent )
94 : QStyledItemDelegate( parent )
98 QWidget *createEditor( QWidget *parent,
const QStyleOptionViewItem &,
const QModelIndex & )
const override 100 QLineEdit *lineEdit =
new QLineEdit( parent );
101 QDoubleValidator *validator =
new QDoubleValidator( 0, 1e6, 1, lineEdit );
102 lineEdit->setValidator( validator );
110 #endif // QGSDATADEFINEDSIZELEGENDWIDGET_H
Map canvas is a class for displaying all GIS data types on a canvas.
A marker symbol type, for rendering Point and MultiPoint geometries.
The QgsLayerTreeModel class is model implementation for Qt item views framework.
Namespace with helper functions for layer tree operations.
A store for object properties.
Represents a vector layer which manages a vector based data sets.
Object that keeps configuration of appearance of marker symbol's data-defined size in legend...
Layer tree node points to a map layer.