18#ifndef QGSDIAGRAMPROPERTIES_H
19#define QGSDIAGRAMPROPERTIES_H
23#include "ui_qgsdiagrampropertiesbase.h"
31#include <QStyledItemDelegate>
127 void updateProperty();
130 void createAuxiliaryField();
135 QButtonGroup *mPlacePointBtnGrp =
nullptr;
137 QButtonGroup *mPlaceLineBtnGrp =
nullptr;
139 QButtonGroup *mPlacePolygonBtnGrp =
nullptr;
141 std::unique_ptr<QgsPaintEffect> mPaintEffect;
145 ColumnAttributeExpression = 0,
152 RoleAttributeExpression = Qt::UserRole,
155 QString showExpressionBuilder(
const QString &initialExpression );
157 QgsPropertyCollection mDataDefinedProperties;
160 QString mDiagramType;
161 std::unique_ptr<QgsDataDefinedSizeLegend> mSizeLegend;
163 QString guessLegendText(
const QString &expression );
164 QgsMapCanvas *mMapCanvas =
nullptr;
168 bool mAllowedToEditDls =
true;
177 void connectValueChanged(
const QList<QWidget *> &widgets );
184 std::unique_ptr<QgsDiagram> createDiagramObject();
191 std::unique_ptr<QgsDiagramSettings> createDiagramSettings();
198 std::unique_ptr<QgsDiagramRenderer> createRenderer();
205 QgsDiagramLayerSettings createDiagramLayerSettings();
210 void insertDefaults();
215 void updateDataDefinedButtons();
220 void updateDataDefinedButton( QgsPropertyOverrideButton *button );
230 void setDiagramEnabled(
const bool enabled );
240 bool isDiagramEnabled()
const;
258 : QStyledItemDelegate( parent )
261 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.