18 #ifndef QGSPROPERTYASSISTANTWIDGET_H 19 #define QGSPROPERTYASSISTANTWIDGET_H 23 #include "ui_qgspropertyassistantwidgetbase.h" 24 #include "ui_qgspropertysizeassistantwidget.h" 25 #include "ui_qgspropertycolorassistantwidget.h" 26 #include "ui_qgspropertygenericnumericassistantwidget.h" 32 #include <QStandardItemModel> 33 #include <QItemDelegate> 41 class GUI_EXPORT QgsPropertyAbstractTransformerWidget :
public QWidget
49 , mDefinition( definition )
66 class GUI_EXPORT QgsPropertyGenericNumericAssistantWidget :
public QgsPropertyAbstractTransformerWidget,
private Ui::PropertyGenericNumericAssistant
78 class GUI_EXPORT QgsPropertySizeAssistantWidget :
public QgsPropertyAbstractTransformerWidget,
private Ui::PropertySizeAssistant
91 class GUI_EXPORT QgsPropertyColorAssistantWidget :
public QgsPropertyAbstractTransformerWidget,
private Ui::PropertyColorAssistant
150 void setSymbol( std::shared_ptr< QgsSymbol > symbol ) { mSymbol = symbol; updatePreview(); }
SIP_SKIP 155 void computeValuesFromLayer();
156 void updatePreview();
164 QgsPropertyAbstractTransformerWidget *mTransformerWidget =
nullptr;
168 QStandardItemModel mPreviewList;
170 std::shared_ptr< QgsSymbol > mSymbol;
172 bool computeValuesFromExpression(
const QString &expression,
double &minValue,
double &maxValue )
const;
173 bool computeValuesFromField(
const QString &fieldName,
double &minValue,
double &maxValue )
const;
180 class QgsAssistantPreviewItemDelegate :
public QItemDelegate
185 explicit QgsAssistantPreviewItemDelegate( QStandardItemModel *model ) : mModel( model ) {}
187 QSize sizeHint(
const QStyleOptionViewItem & ,
const QModelIndex &index )
const override 189 QSize size = mModel->item( index.row() )->icon().actualSize( QSize( 512, 512 ) );
195 QStandardItemModel *mModel =
nullptr;
203 #endif // QGSPROPERTYASSISTANTWIDGET_H Layer tree group node serves as a container for layers and further groups.
Map canvas is a class for displaying all GIS data types on a canvas.
A store for object properties.
Definition for a property.
Abstract interface for generating an expression context.
Represents a vector layer which manages a vector based data sets.
Layer tree node points to a map layer.