16#ifndef QGSGRADUATEDSYMBOLRENDERERWIDGET_H
17#define QGSGRADUATEDSYMBOLRENDERERWIDGET_H
19#include <QStandardItem>
30#include "ui_qgsgraduatedsymbolrendererwidget.h"
38class GUI_EXPORT QgsGraduatedSymbolRendererModel :
public QAbstractItemModel
42 QgsGraduatedSymbolRendererModel( QObject *parent =
nullptr, QScreen *screen =
nullptr );
43 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
44 Qt::DropActions supportedDropActions()
const override;
45 QVariant data(
const QModelIndex &index,
int role )
const override;
46 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
47 QVariant headerData(
int section, Qt::Orientation orientation,
int role )
const override;
48 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
49 int columnCount(
const QModelIndex & = QModelIndex() )
const override;
50 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
51 QModelIndex parent(
const QModelIndex &index )
const override;
52 QStringList mimeTypes()
const override;
53 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
54 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
61 void deleteRows( QList<int> rows );
63 void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder )
override;
64 void updateSymbology();
73 QPointer< QScreen > mScreen;
77class QgsGraduatedSymbolRendererViewStyle:
public QgsProxyStyle
82 explicit QgsGraduatedSymbolRendererViewStyle( QWidget *parent );
84 void drawPrimitive( PrimitiveElement element,
const QStyleOption *option, QPainter *painter,
const QWidget *widget =
nullptr )
const override;
106 void disableSymbolLevels()
override SIP_SKIP;
109 void graduatedColumnChanged(
const QString &
field );
110 void classifyGraduated();
111 void reapplyColorRamp();
113 void rangesDoubleClicked(
const QModelIndex &idx );
114 void rangesClicked(
const QModelIndex &idx );
115 void changeCurrentValue( QStandardItem *item );
120 void deleteClasses();
122 void deleteAllClasses();
124 void toggleBoundariesLink(
bool linked );
126 void labelFormatChanged();
128 void showSymbolLevels();
131 void modelDataChanged();
138 void refreshRanges(
bool reset );
144 void mSizeUnitWidget_changed();
145 void methodComboBox_currentIndexChanged(
int );
146 void updateMethodParameters();
148 void updateSymbolsFromWidget();
149 void dataDefinedSizeLegend();
150 void changeGraduatedSymbol();
151 void selectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
152 void symmetryPointEditingFinished();
153 void classifyGraduatedImpl();
157 void pasteSymbolToSelection()
override;
160 void updateUiFromRenderer(
bool updateCount =
true );
161 void connectUpdateHandlers();
162 void disconnectUpdateHandlers();
166 QList<int> selectedClasses();
169 void changeRangeSymbol(
int rangeIdx );
170 void changeRange(
int rangeIdx );
172 void changeSelectedSymbols();
174 void applyChangeToSymbol();
176 QList<QgsSymbol *> selectedSymbols()
override;
177 QgsSymbol *findSymbolForRange(
double lowerBound,
double upperBound,
const QgsRangeList &ranges )
const;
178 void refreshSymbolView()
override;
180 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...
Abstract interface for generating an expression context.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
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