16#ifndef QGSGRADUATEDSYMBOLRENDERERWIDGET_H
17#define QGSGRADUATEDSYMBOLRENDERERWIDGET_H
19#include <QStandardItem>
30#include "ui_qgsgraduatedsymbolrendererwidget.h"
39class GUI_EXPORT QgsGraduatedSymbolRendererModel :
public QAbstractItemModel
43 QgsGraduatedSymbolRendererModel( QObject *parent =
nullptr, QScreen *screen =
nullptr );
44 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
45 Qt::DropActions supportedDropActions()
const override;
46 QVariant data(
const QModelIndex &index,
int role )
const override;
47 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
48 QVariant headerData(
int section, Qt::Orientation orientation,
int role )
const override;
49 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
50 int columnCount(
const QModelIndex & = QModelIndex() )
const override;
51 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
52 QModelIndex parent(
const QModelIndex &index )
const override;
53 QStringList mimeTypes()
const override;
54 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
55 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
62 void deleteRows( QList<int> rows );
64 void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder )
override;
65 void updateSymbology();
74 QPointer<QScreen> mScreen;
78class QgsGraduatedSymbolRendererViewStyle :
public QgsProxyStyle
83 explicit QgsGraduatedSymbolRendererViewStyle( QWidget *parent );
85 void drawPrimitive( PrimitiveElement element,
const QStyleOption *option, QPainter *painter,
const QWidget *widget =
nullptr )
const override;
107 void disableSymbolLevels()
override SIP_SKIP;
111 void graduatedColumnChanged(
const QString &field );
112 void classifyGraduated();
113 void reapplyColorRamp();
115 void rangesDoubleClicked(
const QModelIndex &idx );
116 void rangesClicked(
const QModelIndex &idx );
117 void changeCurrentValue( QStandardItem *item );
122 void deleteClasses();
124 void deleteAllClasses();
126 void toggleBoundariesLink(
bool linked );
128 void labelFormatChanged();
130 void showSymbolLevels();
133 void modelDataChanged();
140 void refreshRanges(
bool reset );
146 void mSizeUnitWidget_changed();
147 void methodComboBox_currentIndexChanged(
int );
148 void updateMethodParameters();
150 void dataDefinedSizeLegend();
151 void changeGraduatedSymbol();
152 void selectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
153 void symmetryPointEditingFinished();
154 void classifyGraduatedImpl();
158 void pasteSymbolToSelection()
override;
161 void updateUiFromRenderer(
bool updateCount =
true );
162 void connectUpdateHandlers();
163 void disconnectUpdateHandlers();
167 QList<int> selectedClasses();
170 void changeRangeSymbol(
int rangeIdx );
171 void changeRange(
int rangeIdx );
173 void changeSelectedSymbols();
175 void applyChangeToSymbol();
177 QList<QgsSymbol *> selectedSymbols()
override;
178 QgsSymbol *findSymbolForRange(
double lowerBound,
double upperBound,
const QgsRangeList &ranges )
const;
179 void refreshSymbolView()
override;
181 void keyPressEvent( QKeyEvent *event )
override;
190 void toggleMethodWidgets( MethodMode mode );
192 void clearParameterWidgets();
194 std::unique_ptr<QgsGraduatedSymbolRenderer> mRenderer;
196 std::unique_ptr<QgsSymbol> mGraduatedSymbol;
200 QgsGraduatedSymbolRendererModel *mModel =
nullptr;
205 QAction *mActionLevels =
nullptr;
206 std::vector<std::unique_ptr<QgsAbstractProcessingParameterWidgetWrapper>> mParameterWidgetWrappers;
208 int mBlockUpdates = 0;
QgsDoubleValidator is a QLineEdit Validator that combines QDoubleValidator and QRegularExpressionVali...
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 vector feature renderer which uses numeric attributes to classify features into different ranges.
A QProxyStyle subclass which correctly sets the base style to match the QGIS application style,...
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 data sets.
QList< QgsLegendSymbolItem > QgsLegendSymbolList
QList< QgsRendererRange > QgsRangeList