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;
110 void graduatedColumnChanged(
const QString &field );
111 void classifyGraduated();
112 void reapplyColorRamp();
114 void rangesDoubleClicked(
const QModelIndex &idx );
115 void rangesClicked(
const QModelIndex &idx );
116 void changeCurrentValue( QStandardItem *item );
121 void deleteClasses();
123 void deleteAllClasses();
125 void toggleBoundariesLink(
bool linked );
127 void labelFormatChanged();
129 void showSymbolLevels();
132 void modelDataChanged();
139 void refreshRanges(
bool reset );
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();
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