15 #ifndef QGSRULEBASEDLABELINGWIDGET_H
16 #define QGSRULEBASEDLABELINGWIDGET_H
25 #include "ui_qgsrulebasedlabelingwidget.h"
49 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
50 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
51 QVariant headerData(
int section, Qt::Orientation orientation,
52 int role = Qt::DisplayRole )
const override;
53 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
54 int columnCount(
const QModelIndex & = QModelIndex() )
const override;
56 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
58 QModelIndex parent(
const QModelIndex &index )
const override;
61 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
64 Qt::DropActions supportedDropActions()
const override;
65 QStringList mimeTypes()
const override;
66 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
67 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
69 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
79 void updateRule(
const QModelIndex &parent,
int row );
81 void updateRule(
const QModelIndex &index );
83 void removeRule(
const QModelIndex &index );
86 void willAddRules(
const QModelIndex &parent,
int count );
92 void finishedAddingRules();
109 class GUI_EXPORT QgsRuleBasedLabelingWidget :
public QgsPanelWidget,
private Ui::QgsRuleBasedLabelingWidget
115 ~QgsRuleBasedLabelingWidget()
override;
125 void editRule(
const QModelIndex &index );
130 void liveUpdateRuleFromPanel();
141 QAction *mCopyAction =
nullptr;
142 QAction *mPasteAction =
nullptr;
143 QAction *mDeleteAction =
nullptr;
149 class QgsLabelingGui;
151 #include "ui_qgslabelingrulepropswidget.h"
160 class GUI_EXPORT QgsLabelingRulePropsWidget :
public QgsPanelWidget,
private Ui::QgsLabelingRulePropsWidget
167 QWidget *parent =
nullptr,
QgsMapCanvas *mapCanvas =
nullptr );
168 ~QgsLabelingRulePropsWidget()
override;
181 void buildExpression();
187 QgsLabelingGui *mLabelingGui =
nullptr;
194 #endif // QGSRULEBASEDLABELINGWIDGET_H