15#ifndef QGSRULEBASEDLABELINGWIDGET_H
16#define QGSRULEBASEDLABELINGWIDGET_H
21#include "ui_qgsrulebasedlabelingwidget.h"
48 Qt::ItemFlags
flags(
const QModelIndex &
index )
const override;
49 QVariant
data(
const QModelIndex &
index,
int role = Qt::DisplayRole )
const override;
50 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
51 int rowCount(
const QModelIndex &
parent = QModelIndex() )
const override;
52 int columnCount(
const QModelIndex & = QModelIndex() )
const override;
54 QModelIndex
index(
int row,
int column,
const QModelIndex &
parent = QModelIndex() )
const override;
56 QModelIndex
parent(
const QModelIndex &
index )
const override;
59 bool setData(
const QModelIndex &
index,
const QVariant &value,
int role = Qt::EditRole )
override;
64 QMimeData *
mimeData(
const QModelIndexList &indexes )
const override;
65 bool dropMimeData(
const QMimeData *
data, Qt::DropAction action,
int row,
int column,
const QModelIndex &
parent )
override;
67 bool removeRows(
int row,
int count,
const QModelIndex &
parent = QModelIndex() )
override;
118 void setDockMode(
bool dockMode )
override;
123 void editRule(
const QModelIndex &index );
128 void liveUpdateRuleFromPanel();
139 QAction *mCopyAction =
nullptr;
140 QAction *mPasteAction =
nullptr;
141 QAction *mDeleteAction =
nullptr;
150#include <QDialogButtonBox>
152#include "ui_qgslabelingrulepropswidget.h"
178 void setDockMode(
bool dockMode )
override;
192 void buildExpression();
200 QgsLabelingGui *mLabelingGui =
nullptr;
245 void buildExpression();
250 void accept()
override;
257 QDialogButtonBox *buttonBox =
nullptr;
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
QgsLabelingRulePropsDialog(QgsRuleBasedLabeling::Rule *rule, QgsVectorLayer *layer, QWidget *parent=nullptr, QgsMapCanvas *mapCanvas=nullptr)
Constructor for QgsLabelingRulePropsDialog.
QgsRuleBasedLabeling::Rule * rule()
Returns the current set rule.
Map canvas is a class for displaying all GIS data types on a canvas.
Base class for all map layer types.
Contains settings for how a map layer will be labeled.
Model for rule based rendering rules view.
QgsRuleBasedLabelingModel(QgsRuleBasedLabeling::Rule *rootRule, QObject *parent=nullptr)
constructor
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
QStringList mimeTypes() const override
void finishedAddingRules()
Notify the model that one is done inserting new rules.
QgsRuleBasedLabeling::Rule * mRootRule
Qt::DropActions supportedDropActions() const override
void insertRule(const QModelIndex &parent, int before, QgsRuleBasedLabeling::Rule *newrule)
Inserts a new rule at the specified position.
void removeRule(const QModelIndex &index)
Removes the rule at the specified position.
void willAddRules(const QModelIndex &parent, int count)
Notify the model that new rules will be added.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
provide model index for parent's child item
QgsRuleBasedLabeling::Rule * ruleForIndex(const QModelIndex &index) const
Returns the rule at the specified index.
void updateRule(const QModelIndex &index)
Update rule and all its descendants.
void updateRule(const QModelIndex &parent, int row)
Updates the rule at the specified position.
QMimeData * mimeData(const QModelIndexList &indexes) const override
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) override
int rowCount(const QModelIndex &parent=QModelIndex()) const override
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
QModelIndex parent(const QModelIndex &index) const override
provide parent model index
Qt::ItemFlags flags(const QModelIndex &index) const override
int columnCount(const QModelIndex &=QModelIndex()) const override
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
A child rule for QgsRuleBasedLabeling.
Represents a vector layer which manages a vector based dataset.