16 #ifndef QGSGRADUATEDSYMBOLRENDERERWIDGET_H
17 #define QGSGRADUATEDSYMBOLRENDERERWIDGET_H
19 #include <QStandardItem>
28 #include "ui_qgsgraduatedsymbolrendererwidget.h"
36 class GUI_EXPORT QgsGraduatedSymbolRendererModel :
public QAbstractItemModel
40 QgsGraduatedSymbolRendererModel( QObject *parent =
nullptr );
41 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
42 Qt::DropActions supportedDropActions()
const override;
43 QVariant data(
const QModelIndex &index,
int role )
const override;
44 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
45 QVariant headerData(
int section, Qt::Orientation orientation,
int role )
const override;
46 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
47 int columnCount(
const QModelIndex & = QModelIndex() )
const override;
48 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
49 QModelIndex parent(
const QModelIndex &index )
const override;
50 QStringList mimeTypes()
const override;
51 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
52 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
59 void deleteRows( QList<int> rows );
61 void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder )
override;
62 void updateSymbology();
74 class QgsGraduatedSymbolRendererViewStyle:
public QgsProxyStyle
79 explicit QgsGraduatedSymbolRendererViewStyle( QWidget *parent );
81 void drawPrimitive( PrimitiveElement element,
const QStyleOption *option, QPainter *painter,
const QWidget *widget =
nullptr )
const override;
103 void disableSymbolLevels()
override SIP_SKIP;
106 void graduatedColumnChanged(
const QString &
field );
107 void classifyGraduated();
108 void reapplyColorRamp();
110 void rangesDoubleClicked(
const QModelIndex &idx );
111 void rangesClicked(
const QModelIndex &idx );
112 void changeCurrentValue( QStandardItem *item );
117 void deleteClasses();
119 void deleteAllClasses();
121 void toggleBoundariesLink(
bool linked );
123 void labelFormatChanged();
125 void showSymbolLevels();
128 void modelDataChanged();
135 void refreshRanges(
bool reset );
141 void mSizeUnitWidget_changed();
142 void methodComboBox_currentIndexChanged(
int );
143 void updateMethodParameters();
145 void updateSymbolsFromWidget();
146 void dataDefinedSizeLegend();
147 void changeGraduatedSymbol();
148 void selectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
149 void symmetryPointEditingFinished();
153 void pasteSymbolToSelection()
override;
156 void updateUiFromRenderer(
bool updateCount =
true );
157 void connectUpdateHandlers();
158 void disconnectUpdateHandlers();
162 QList<int> selectedClasses();
165 void changeRangeSymbol(
int rangeIdx );
166 void changeRange(
int rangeIdx );
168 void changeSelectedSymbols();
170 void applyChangeToSymbol();
172 QList<QgsSymbol *> selectedSymbols()
override;
173 QgsSymbol *findSymbolForRange(
double lowerBound,
double upperBound,
const QgsRangeList &ranges )
const;
174 void refreshSymbolView()
override;
176 void keyPressEvent( QKeyEvent *event )
override;
186 void toggleMethodWidgets( MethodMode mode );
188 void clearParameterWidgets();
190 std::unique_ptr< QgsGraduatedSymbolRenderer > mRenderer;
192 std::unique_ptr< QgsSymbol > mGraduatedSymbol;
196 QgsGraduatedSymbolRendererModel *mModel =
nullptr;
200 QDoubleValidator *mSymmetryPointValidator =
nullptr;
201 QAction *mActionLevels =
nullptr;
202 std::vector< std::unique_ptr< QgsAbstractProcessingParameterWidgetWrapper >> mParameterWidgetWrappers;
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