16#ifndef QGSRULEBASEDRENDERERWIDGET_H
17#define QGSRULEBASEDRENDERERWIDGET_H
28#include <QAbstractItemModel>
58 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
59 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
60 QVariant headerData(
int section, Qt::Orientation orientation,
61 int role = Qt::DisplayRole )
const override;
62 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
63 int columnCount(
const QModelIndex & = QModelIndex() )
const override;
64 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
65 QModelIndex parent(
const QModelIndex &index )
const override;
68 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
71 Qt::DropActions supportedDropActions()
const override;
72 QStringList mimeTypes()
const override;
73 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
74 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
76 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
83 void updateRule(
const QModelIndex &parent,
int row );
85 void updateRule(
const QModelIndex &index );
86 void removeRule(
const QModelIndex &index );
96 void willAddRules(
const QModelIndex &parent,
int count );
97 void finishedAddingRules();
100 void setFeatureCounts(
const QHash<QgsRuleBasedRenderer::Rule *, QgsRuleBasedRendererCount> &countMap )
SIP_SKIP;
101 void clearFeatureCounts();
112#include "ui_qgsrulebasedrendererwidget.h"
130 void setDockMode(
bool dockMode )
override;
136 void editRule(
const QModelIndex &index );
138 void countFeatures();
141 void refineRuleScales();
142 void refineRuleCategories();
143 void refineRuleRanges();
145 void setRenderingOrder();
147 void currentRuleChanged(
const QModelIndex ¤t = QModelIndex(),
const QModelIndex &previous = QModelIndex() );
148 void selectedRulesChanged();
150 void saveSectionWidth(
int section,
int oldSize,
int newSize );
151 void restoreSectionWidths();
154 void refineRule(
int type );
156 void refineRuleCategoriesGui();
158 void refineRuleRangesGui();
159 void refineRuleScalesGui(
const QModelIndexList &index );
161 void setSymbolLevels(
const QList< QgsLegendSymbolItem > &levels,
bool enabled )
override;
165 QList<QgsSymbol *> selectedSymbols()
override;
167 void refreshSymbolView()
override;
168 void keyPressEvent( QKeyEvent *event )
override;
173 QMenu *mRefineMenu =
nullptr;
174 QAction *mDeleteAction =
nullptr;
177 QMenu *mContextMenu =
nullptr;
180 void copy()
override;
181 void paste()
override;
182 void pasteSymbolToSelection()
override;
188 void liveUpdateRuleFromPanel();
189 void showContextMenu( QPoint p );
196#include "ui_qgsrendererrulepropsdialogbase.h"
239 void buildExpression();
250 void setDockMode(
bool dockMode )
override;
286 void buildExpression();
287 void accept()
override;
294 QDialogButtonBox *buttonBox =
nullptr;
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