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"
31#include <QStandardItemModel>
32#include <QItemDelegate>
40class GUI_EXPORT QgsPropertyAbstractTransformerWidget :
public QWidget
48 , mDefinition( definition )
65class GUI_EXPORT QgsPropertyGenericNumericAssistantWidget :
public QgsPropertyAbstractTransformerWidget,
private Ui::PropertyGenericNumericAssistant
77class GUI_EXPORT QgsPropertySizeAssistantWidget :
public QgsPropertyAbstractTransformerWidget,
private Ui::PropertySizeAssistant
90class GUI_EXPORT QgsPropertyColorAssistantWidget :
public QgsPropertyAbstractTransformerWidget,
private Ui::PropertyColorAssistant
148 void setSymbol( std::shared_ptr< QgsSymbol > symbol ) { mSymbol = symbol; updatePreview(); }
SIP_SKIP
150 void setDockMode(
bool dockMode )
override;
153 void computeValuesFromLayer();
154 void updatePreview();
161 QgsPropertyAbstractTransformerWidget *mTransformerWidget =
nullptr;
165 QStandardItemModel mPreviewList;
167 std::shared_ptr< QgsSymbol > mSymbol;
169 bool computeValuesFromExpression(
const QString &expression,
double &minValue,
double &maxValue )
const;
170 bool computeValuesFromField(
const QString &fieldName,
double &minValue,
double &maxValue )
const;
176class QgsAssistantPreviewItemDelegate :
public QItemDelegate
181 explicit QgsAssistantPreviewItemDelegate( QStandardItemModel *model ) : mModel( model ) {}
183 QSize sizeHint(
const QStyleOptionViewItem & ,
const QModelIndex &index )
const override
185 QSize size = mModel->item( index.row() )->icon().actualSize( QSize( 512, 512 ) );
191 QStandardItemModel *mModel =
nullptr;
Abstract interface for generating an expression context.
Layer tree group node serves as a container for layers and further groups.
Layer tree node points to a map layer.
Map canvas is a class for displaying all GIS data types on a canvas.
Definition for a property.
A store for object properties.
Abstract base class for all rendered symbols.
Represents a vector layer which manages a vector based data sets.