15 #ifndef QGSCATEGORIZEDSYMBOLRENDERERV2WIDGET_H 16 #define QGSCATEGORIZEDSYMBOLRENDERERV2WIDGET_H 20 #include <QStandardItem> 21 #include <QProxyStyle> 26 #include "ui_qgscategorizedsymbolrendererv2widget.h" 34 QgsCategorizedSymbolRendererV2Model(
QObject * parent =
nullptr );
39 QVariant headerData(
int section, Qt::Orientation orientation,
int role )
const override;
54 void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder )
override;
55 void updateSymbology();
66 class QgsCategorizedSymbolRendererV2ViewStyle:
public QProxyStyle 71 explicit QgsCategorizedSymbolRendererV2ViewStyle(
QStyle* style =
nullptr );
73 void drawPrimitive( PrimitiveElement element,
const QStyleOption * option,
QPainter * painter,
const QWidget * widget =
nullptr )
const override;
100 void changeCategorizedSymbol();
101 void categoryColumnChanged(
const QString& field );
102 void categoriesDoubleClicked(
const QModelIndex & idx );
104 void addCategories();
105 void applyColorRamp();
106 void deleteCategories();
107 void deleteAllCategories();
109 void sizeScaleFieldChanged(
const QString& fldName );
112 void showSymbolLevels();
122 void matchToSymbolsFromLibrary();
130 void matchToSymbolsFromXml();
134 void updateUiFromRenderer();
136 void updateCategorizedSymbolIcon();
139 void populateCategories();
142 int currentCategoryRow();
148 void changeSelectedSymbols();
150 void changeCategorySymbol();
157 void keyPressEvent(
QKeyEvent* event )
override;
164 QgsCategorizedSymbolRendererV2Model*
mModel;
167 QString mOldClassificationAttribute;
171 #endif // QGSCATEGORIZEDSYMBOLRENDERERV2WIDGET_H
virtual int rowCount(const QModelIndex &parent) const =0
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const =0
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
virtual QStringList mimeTypes() const
virtual void sort(int column, Qt::SortOrder order)
void rowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow)
virtual Qt::DropActions supportedDropActions() const
virtual QVariant data(const QModelIndex &index, int role) const =0
virtual QMimeData * mimeData(const QModelIndexList &indexes) const
virtual int columnCount(const QModelIndex &parent) const =0
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Represents a vector layer which manages a vector based data sets.