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();
68 class QgsCategorizedSymbolRendererV2ViewStyle:
public QProxyStyle 73 explicit QgsCategorizedSymbolRendererV2ViewStyle(
QStyle* style =
nullptr );
75 void drawPrimitive( PrimitiveElement element,
const QStyleOption * option,
QPainter * painter,
const QWidget * widget =
nullptr )
const override;
105 void changeCategorizedSymbol();
106 void categoryColumnChanged(
const QString& field );
107 void categoriesDoubleClicked(
const QModelIndex & idx );
109 void addCategories();
110 void applyColorRamp();
111 void deleteCategories();
112 void deleteAllCategories();
114 void sizeScaleFieldChanged(
const QString& fldName );
117 void showSymbolLevels();
127 void matchToSymbolsFromLibrary();
135 void matchToSymbolsFromXml();
140 void updateSymbolsFromWidget();
144 void updateUiFromRenderer();
146 void updateCategorizedSymbolIcon();
149 void populateCategories();
152 int currentCategoryRow();
158 void changeSelectedSymbols();
160 void changeCategorySymbol();
166 void refreshSymbolView()
override;
167 void keyPressEvent(
QKeyEvent* event )
override;
174 QgsCategorizedSymbolRendererV2Model*
mModel;
177 QString mOldClassificationAttribute;
181 #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.
Abstract base class for color ramps.