18#ifndef QGSDIAGRAMPROPERTIES_H
19#define QGSDIAGRAMPROPERTIES_H
24#include "ui_qgsdiagrampropertiesbase.h"
32#include <QStyledItemDelegate>
126 void updateProperty();
129 void createAuxiliaryField();
134 QButtonGroup *mPlacePointBtnGrp =
nullptr;
136 QButtonGroup *mPlaceLineBtnGrp =
nullptr;
138 QButtonGroup *mPlacePolygonBtnGrp =
nullptr;
140 std::unique_ptr<QgsPaintEffect> mPaintEffect;
144 ColumnAttributeExpression = 0,
151 RoleAttributeExpression = Qt::UserRole,
154 QString showExpressionBuilder(
const QString &initialExpression );
156 QgsPropertyCollection mDataDefinedProperties;
159 QString mDiagramType;
160 std::unique_ptr<QgsDataDefinedSizeLegend> mSizeLegend;
162 QString guessLegendText(
const QString &expression );
163 QgsMapCanvas *mMapCanvas =
nullptr;
167 bool mAllowedToEditDls =
true;
176 void connectValueChanged(
const QList<QWidget *> &widgets );
183 std::unique_ptr<QgsDiagram> createDiagramObject();
190 std::unique_ptr<QgsDiagramSettings> createDiagramSettings();
197 std::unique_ptr<QgsDiagramRenderer> createRenderer();
204 QgsDiagramLayerSettings createDiagramLayerSettings();
209 void insertDefaults();
214 void updateDataDefinedButtons();
219 void updateDataDefinedButton( QgsPropertyOverrideButton *button );
229 void setDiagramEnabled(
const bool enabled );
239 bool isDiagramEnabled()
const;
257 : QStyledItemDelegate( parent )
260 QWidget *
createEditor( QWidget *,
const QStyleOptionViewItem &,
const QModelIndex & )
const override
EditBlockerDelegate(QObject *parent=nullptr)
QWidget * createEditor(QWidget *, const QStyleOptionViewItem &, const QModelIndex &) const override
Stores the settings for rendering of all diagrams for a layer.
Property
Data definable properties.
friend class QgsStackedDiagramPropertiesDialog
void syncToSettings(const QgsDiagramLayerSettings *dls)
Updates the widget to reflect the diagram layer settings.
void scalingTypeChanged()
void mDiagramAttributesTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column)
void mAddCategoryPushButton_clicked()
bool isAllowedToEditDiagramLayerSettings() const
Returns whether this widget is allowed to edit diagram layer settings.
void mDiagramTypeComboBox_currentIndexChanged(int index)
void syncToLayer()
Updates the widget to reflect the layer's current diagram settings.
friend class QgsStackedDiagramProperties
void mRemoveCategoryPushButton_clicked()
QgsDiagramProperties(QgsVectorLayer *layer, QWidget *parent, QgsMapCanvas *canvas)
void showSizeLegendDialog()
void setDiagramType(const QString diagramType)
Defines the widget's diagram type and lets it know it should hide the type comboBox.
void addAttribute(QTreeWidgetItem *item)
Adds an attribute from the list of available attributes to the assigned attributes with a random colo...
void mFindMaximumValueButton_clicked()
void showAddAttributeExpressionDialog()
void syncToRenderer(const QgsDiagramRenderer *dr)
Updates the widget to reflect the diagram renderer.
void mAttributesTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column)
void auxiliaryFieldCreated()
friend class TestQgsDiagramProperties
void updatePlacementWidgets()
void setAllowedToEditDiagramLayerSettings(bool allowed)
Sets whether the widget should show diagram layer settings.
void mDiagramStackedWidget_currentChanged(int index)
Evaluates and returns the diagram settings relating to a diagram for a specific feature.
Abstract interface for generating an expression context.
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
Map canvas is a class for displaying all GIS data types on a canvas.
Represents a vector layer which manages a vector based dataset.