16 #ifndef QGSDATADEFINEDSIZELEGENDWIDGET_H
17 #define QGSDATADEFINEDSIZELEGENDWIDGET_H
23 #include "ui_qgsdatadefinedsizelegendwidget.h"
28 #include <QStyledItemDelegate>
30 class QStandardItemModel;
47 class GUI_EXPORT QgsDataDefinedSizeLegendWidget :
public QgsPanelWidget,
private Ui::QgsDataDefinedSizeLegendWidget
59 ~QgsDataDefinedSizeLegendWidget()
override;
70 void removeSizeClass();
71 void onSizeClassesChanged();
74 std::unique_ptr<QgsMarkerSymbol> mSourceSymbol;
75 bool mOverrideSymbol =
false;
82 QStandardItemModel *mSizeClassesModel =
nullptr;
89 class SizeClassDelegate :
public QStyledItemDelegate
94 SizeClassDelegate( QObject *parent )
95 : QStyledItemDelegate( parent )
99 QWidget *createEditor( QWidget *parent,
const QStyleOptionViewItem &,
const QModelIndex & )
const override
101 QLineEdit *lineEdit =
new QLineEdit( parent );
103 lineEdit->setValidator( validator );
111 #endif // QGSDATADEFINEDSIZELEGENDWIDGET_H