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 );
88 void willAddRules(
const QModelIndex &parent,
int count );
89 void finishedAddingRules();
92 void setFeatureCounts(
const QHash<QgsRuleBasedRenderer::Rule *, QgsRuleBasedRendererCount> &countMap )
SIP_SKIP;
93 void clearFeatureCounts();
103 #include "ui_qgsrulebasedrendererwidget.h" 126 void editRule(
const QModelIndex &index );
128 void countFeatures();
131 void refineRuleScales();
132 void refineRuleCategories();
133 void refineRuleRanges();
135 void setRenderingOrder();
137 void currentRuleChanged(
const QModelIndex ¤t = QModelIndex(),
const QModelIndex &previous = QModelIndex() );
138 void selectedRulesChanged();
140 void saveSectionWidth(
int section,
int oldSize,
int newSize );
141 void restoreSectionWidths();
144 void refineRule(
int type );
146 void refineRuleCategoriesGui();
148 void refineRuleRangesGui();
149 void refineRuleScalesGui(
const QModelIndexList &index );
153 QList<QgsSymbol *> selectedSymbols()
override;
155 void refreshSymbolView()
override;
156 void keyPressEvent( QKeyEvent *event )
override;
161 QMenu *mRefineMenu =
nullptr;
162 QAction *mDeleteAction =
nullptr;
167 void copy()
override;
168 void paste()
override;
174 void liveUpdateRuleFromPanel();
181 #include "ui_qgsrendererrulepropsdialogbase.h" 182 #include "qgis_gui.h" 224 void buildExpression();
235 void setDockMode(
bool dockMode )
override;
273 void buildExpression();
274 void accept()
override;
281 QDialogButtonBox *buttonBox =
nullptr;
285 #endif // QGSRULEBASEDRENDERERWIDGET_H
Tree model for the rules:
Abstract base class for all rendered symbols.
This class keeps data about a rules for rule-based renderer.
QList< QgsRuleBasedRenderer::Rule * > RuleList
QgsRuleBasedRenderer::Rule * rule()
QHash< QgsRuleBasedRenderer::Rule *, int > duplicateCountMap
Contains settings which reflect the context in which a symbol (or renderer) widget is shown...
When drawing a vector layer with rule-based renderer, it goes through the rules and draws features wi...
QHash< QgsRuleBasedRenderer::Rule *, QgsRuleBasedRendererCount > mFeatureCountMap
Represents a vector layer which manages a vector based data sets.