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();
 
  111 #include "ui_qgsrulebasedrendererwidget.h" 
  129     void setDockMode( 
bool dockMode ) 
override;
 
  135     void editRule( 
const QModelIndex &index );
 
  137     void countFeatures();
 
  140     void refineRuleScales();
 
  141     void refineRuleCategories();
 
  142     void refineRuleRanges();
 
  144     void setRenderingOrder();
 
  146     void currentRuleChanged( 
const QModelIndex ¤t = QModelIndex(), 
const QModelIndex &previous = QModelIndex() );
 
  147     void selectedRulesChanged();
 
  149     void saveSectionWidth( 
int section, 
int oldSize, 
int newSize );
 
  150     void restoreSectionWidths();
 
  153     void refineRule( 
int type );
 
  155     void refineRuleCategoriesGui();
 
  157     void refineRuleRangesGui();
 
  158     void refineRuleScalesGui( 
const QModelIndexList &index );
 
  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" 
  194 #include "qgis_gui.h" 
  236     void buildExpression();
 
  247     void setDockMode( 
bool dockMode ) 
override;
 
  283     void buildExpression();
 
  284     void accept() 
override;
 
  291     QDialogButtonBox *buttonBox = 
nullptr;
 
QgsRuleBasedRenderer::Rule * rule()
Tree model for the rules:
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