16#ifndef QGSRULEBASEDRENDERERWIDGET_H
17#define QGSRULEBASEDRENDERERWIDGET_H
28#include <QAbstractItemModel>
61 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
62 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
63 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
64 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
65 int columnCount(
const QModelIndex & = QModelIndex() )
const override;
66 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
67 QModelIndex parent(
const QModelIndex &index )
const override;
70 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
73 Qt::DropActions supportedDropActions()
const override;
74 QStringList mimeTypes()
const override;
75 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
76 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
78 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
85 void updateRule(
const QModelIndex &parent,
int row );
87 void updateRule(
const QModelIndex &index );
88 void removeRule(
const QModelIndex &index );
98 void willAddRules(
const QModelIndex &parent,
int count );
99 void finishedAddingRules();
102 void setFeatureCounts(
const QHash<QgsRuleBasedRenderer::Rule *, QgsRuleBasedRendererCount> &countMap )
SIP_SKIP;
103 void clearFeatureCounts();
114#include "ui_qgsrulebasedrendererwidget.h"
132 void setDockMode(
bool dockMode )
override;
138 void editRule(
const QModelIndex &index );
140 void countFeatures();
143 void refineRuleScales();
144 void refineRuleCategories();
145 void refineRuleRanges();
147 void setRenderingOrder();
149 void currentRuleChanged(
const QModelIndex ¤t = QModelIndex(),
const QModelIndex &previous = QModelIndex() );
150 void selectedRulesChanged();
152 void saveSectionWidth(
int section,
int oldSize,
int newSize );
153 void restoreSectionWidths();
156 void refineRule(
int type );
158 void refineRuleCategoriesGui();
160 void refineRuleRangesGui();
161 void refineRuleScalesGui(
const QModelIndexList &index );
163 void setSymbolLevels(
const QList<QgsLegendSymbolItem> &levels,
bool enabled )
override;
167 QList<QgsSymbol *> selectedSymbols()
override;
169 void refreshSymbolView()
override;
170 void keyPressEvent( QKeyEvent *event )
override;
175 QMenu *mRefineMenu =
nullptr;
176 QAction *mDeleteAction =
nullptr;
179 QMenu *mContextMenu =
nullptr;
182 void copy()
override;
183 void paste()
override;
184 void pasteSymbolToSelection()
override;
190 void liveUpdateRuleFromPanel();
191 void showContextMenu( QPoint p );
198#include "ui_qgsrendererrulepropsdialogbase.h"
237 void buildExpression();
248 void setDockMode(
bool dockMode )
override;
284 void buildExpression();
285 void accept()
override;
292 QDialogButtonBox *buttonBox =
nullptr;
Abstract base class for all 2D vector feature renderers.
A dialog for editing the details of a rule based renderer rule.
QgsRuleBasedRenderer::Rule * rule()
Tree model for a rule-based renderer's rules.
QPointer< QScreen > mScreen
QHash< QgsRuleBasedRenderer::Rule *, QgsRuleBasedRendererCount > mFeatureCountMap
Represents an individual rule for a rule-based renderer.
QList< QgsRuleBasedRenderer::Rule * > RuleList
A database of saved style entities, including symbols, color ramps, text formats and others.
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 dataset.
QHash< QgsRuleBasedRenderer::Rule *, int > duplicateCountMap