16 #ifndef QGSGRADUATEDSYMBOLRENDERERWIDGET_H 
   17 #define QGSGRADUATEDSYMBOLRENDERERWIDGET_H 
   19 #include <QStandardItem> 
   29 #include "ui_qgsgraduatedsymbolrendererwidget.h" 
   37 class GUI_EXPORT QgsGraduatedSymbolRendererModel : 
public QAbstractItemModel
 
   41     QgsGraduatedSymbolRendererModel( QObject *parent = 
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;
 
   60     void deleteRows( QList<int> rows );
 
   62     void sort( 
int column, Qt::SortOrder order = Qt::AscendingOrder ) 
override;
 
   63     void updateSymbology();
 
   75 class QgsGraduatedSymbolRendererViewStyle: 
public QgsProxyStyle 
   80     explicit QgsGraduatedSymbolRendererViewStyle( QWidget *parent );
 
   82     void drawPrimitive( PrimitiveElement element, 
const QStyleOption *option, QPainter *painter, 
const QWidget *widget = 
nullptr ) 
const override;
 
  104     void disableSymbolLevels() 
override SIP_SKIP;
 
  107     void graduatedColumnChanged( 
const QString &
field );
 
  108     void classifyGraduated();
 
  109     void reapplyColorRamp();
 
  111     void rangesDoubleClicked( 
const QModelIndex &idx );
 
  112     void rangesClicked( 
const QModelIndex &idx );
 
  113     void changeCurrentValue( QStandardItem *item );
 
  118     void deleteClasses();
 
  120     void deleteAllClasses();
 
  122     void toggleBoundariesLink( 
bool linked );
 
  124     void labelFormatChanged();
 
  126     void showSymbolLevels();
 
  129     void modelDataChanged();
 
  136     void refreshRanges( 
bool reset );
 
  142     void mSizeUnitWidget_changed();
 
  143     void methodComboBox_currentIndexChanged( 
int );
 
  144     void updateMethodParameters();
 
  146     void updateSymbolsFromWidget();
 
  147     void dataDefinedSizeLegend();
 
  148     void changeGraduatedSymbol();
 
  149     void selectionChanged( 
const QItemSelection &selected, 
const QItemSelection &deselected );
 
  150     void symmetryPointEditingFinished();
 
  154     void pasteSymbolToSelection() 
override;
 
  157     void updateUiFromRenderer( 
bool updateCount = 
true );
 
  158     void connectUpdateHandlers();
 
  159     void disconnectUpdateHandlers();
 
  163     QList<int> selectedClasses();
 
  166     void changeRangeSymbol( 
int rangeIdx );
 
  167     void changeRange( 
int rangeIdx );
 
  169     void changeSelectedSymbols();
 
  171     void applyChangeToSymbol();
 
  173     QList<QgsSymbol *> selectedSymbols() 
override;
 
  174     QgsSymbol *findSymbolForRange( 
double lowerBound, 
double upperBound, 
const QgsRangeList &ranges ) 
const;
 
  175     void refreshSymbolView() 
override;
 
  177     void keyPressEvent( QKeyEvent *event ) 
override;
 
  187     void toggleMethodWidgets( MethodMode mode );
 
  189     void clearParameterWidgets();
 
  191     std::unique_ptr< QgsGraduatedSymbolRenderer > mRenderer;
 
  193     std::unique_ptr< QgsSymbol > mGraduatedSymbol;
 
  197     QgsGraduatedSymbolRendererModel *mModel = 
nullptr;
 
  202     QAction *mActionLevels = 
nullptr;
 
  203     std::vector< std::unique_ptr< QgsAbstractProcessingParameterWidgetWrapper >> mParameterWidgetWrappers;
 
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