16#ifndef QGSGRADUATEDSYMBOLRENDERERWIDGET_H
17#define QGSGRADUATEDSYMBOLRENDERERWIDGET_H
19#include "ui_qgsgraduatedsymbolrendererwidget.h"
29#include <QStandardItem>
37class GUI_EXPORT QgsGraduatedSymbolRendererModel :
public QAbstractItemModel
41 QgsGraduatedSymbolRendererModel( QObject *parent =
nullptr, QScreen *screen =
nullptr );
42 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
43 Qt::DropActions supportedDropActions()
const override;
44 QVariant data(
const QModelIndex &index,
int role )
const override;
45 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
46 QVariant headerData(
int section, Qt::Orientation orientation,
int role )
const override;
47 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
48 int columnCount(
const QModelIndex & = QModelIndex() )
const override;
49 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
50 QModelIndex parent(
const QModelIndex &index )
const override;
51 QStringList mimeTypes()
const override;
52 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
53 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
55 void setRenderer( QgsGraduatedSymbolRenderer *renderer );
57 QgsRendererRange rendererRange(
const QModelIndex &index );
58 void addClass( QgsSymbol *symbol );
59 void addClass(
const QgsRendererRange &range );
60 void deleteRows( QList<int> rows );
62 void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder )
override;
63 void updateSymbology();
70 QgsGraduatedSymbolRenderer *mRenderer =
nullptr;
72 QPointer<QScreen> mScreen;
76class QgsGraduatedSymbolRendererViewStyle :
public QgsProxyStyle
81 explicit QgsGraduatedSymbolRendererViewStyle( QWidget *parent );
83 void drawPrimitive( PrimitiveElement element,
const QStyleOption *option, QPainter *painter,
const QWidget *widget =
nullptr )
const override;
145 void mSizeUnitWidget_changed();
146 void methodComboBox_currentIndexChanged(
int );
147 void updateMethodParameters();
149 void dataDefinedSizeLegend();
150 void changeGraduatedSymbol();
151 void selectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
152 void symmetryPointEditingFinished();
153 void classifyGraduatedImpl();
189 void toggleMethodWidgets( MethodMode mode );
191 void clearParameterWidgets();
193 std::unique_ptr<QgsGraduatedSymbolRenderer> mRenderer;
195 std::unique_ptr<QgsSymbol> mGraduatedSymbol;
199 QgsGraduatedSymbolRendererModel *mModel =
nullptr;
204 QAction *mActionLevels =
nullptr;
206 std::unique_ptr< QgsClassificationMethod > mClassificationMethod;
207 std::vector<std::unique_ptr<QgsAbstractProcessingParameterWidgetWrapper>> mParameterWidgetWrappers;
209 int mBlockUpdates = 0;
A custom validator which allows entry of doubles in a locale-tolerant way.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Abstract base class for all 2D vector feature renderers.
A QProxyStyle subclass which correctly sets the base style to match the QGIS application style,...
A database of saved style entities, including symbols, color ramps, text formats and others.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Abstract base class for all rendered symbols.
Represents a vector layer which manages a vector based dataset.
QList< QgsLegendSymbolItem > QgsLegendSymbolList
QList< QgsRendererRange > QgsRangeList