16#ifndef QGSRULEBASEDRENDERERWIDGET_H
17#define QGSRULEBASEDRENDERERWIDGET_H
28#include <QAbstractItemModel>
57 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
58 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
59 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
60 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
61 int columnCount(
const QModelIndex & = QModelIndex() )
const override;
62 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
63 QModelIndex parent(
const QModelIndex &index )
const override;
66 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
69 Qt::DropActions supportedDropActions()
const override;
70 QStringList mimeTypes()
const override;
71 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
72 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
74 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
81 void updateRule(
const QModelIndex &parent,
int row );
83 void updateRule(
const QModelIndex &index );
84 void removeRule(
const QModelIndex &index );
94 void willAddRules(
const QModelIndex &parent,
int count );
95 void finishedAddingRules();
98 void setFeatureCounts(
const QHash<QgsRuleBasedRenderer::Rule *, QgsRuleBasedRendererCount> &countMap )
SIP_SKIP;
99 void clearFeatureCounts();
110#include "ui_qgsrulebasedrendererwidget.h"
127 void setDockMode(
bool dockMode )
override;
133 void editRule(
const QModelIndex &index );
135 void countFeatures();
138 void refineRuleScales();
139 void refineRuleCategories();
140 void refineRuleRanges();
142 void setRenderingOrder();
144 void currentRuleChanged(
const QModelIndex ¤t = QModelIndex(),
const QModelIndex &previous = QModelIndex() );
145 void selectedRulesChanged();
147 void saveSectionWidth(
int section,
int oldSize,
int newSize );
148 void restoreSectionWidths();
151 void refineRule(
int type );
153 void refineRuleCategoriesGui();
155 void refineRuleRangesGui();
156 void refineRuleScalesGui(
const QModelIndexList &index );
158 void setSymbolLevels(
const QList<QgsLegendSymbolItem> &levels,
bool enabled )
override;
162 QList<QgsSymbol *> selectedSymbols()
override;
164 void refreshSymbolView()
override;
165 void keyPressEvent( QKeyEvent *event )
override;
170 QMenu *mRefineMenu =
nullptr;
171 QAction *mDeleteAction =
nullptr;
174 QMenu *mContextMenu =
nullptr;
177 void copy()
override;
178 void paste()
override;
179 void pasteSymbolToSelection()
override;
185 void liveUpdateRuleFromPanel();
186 void showContextMenu( QPoint p );
193#include "ui_qgsrendererrulepropsdialogbase.h"
231 void buildExpression();
242 void setDockMode(
bool dockMode )
override;
277 void buildExpression();
278 void accept()
override;
285 QDialogButtonBox *buttonBox =
nullptr;
Abstract base class for all 2D vector feature renderers.
QgsRuleBasedRenderer::Rule * rule()
Tree model for the rules:
QPointer< QScreen > mScreen
QHash< QgsRuleBasedRenderer::Rule *, QgsRuleBasedRendererCount > mFeatureCountMap
This class keeps data about a rules for rule-based renderer.
QList< QgsRuleBasedRenderer::Rule * > RuleList
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.
QHash< QgsRuleBasedRenderer::Rule *, int > duplicateCountMap