18#ifndef QGSPROCESSINGMODELCOMPONENT_H
19#define QGSPROCESSINGMODELCOMPONENT_H
27class QgsProcessingModelComment;
35class CORE_EXPORT QgsProcessingModelComponent
39 virtual ~QgsProcessingModelComponent() =
default;
45 QString description()
const;
51 void setDescription(
const QString &description );
57 QPointF position()
const;
63 void setPosition( QPointF position );
77 void setSize( QSizeF size );
96 void setColor(
const QColor &color );
102 bool linksCollapsed( Qt::Edge edge )
const;
109 void setLinksCollapsed( Qt::Edge edge,
bool collapsed );
115 SIP_SKIP virtual const QgsProcessingModelComment *comment()
const {
return nullptr; }
121 virtual QgsProcessingModelComment *comment() {
return nullptr; }
127 virtual void setComment(
const QgsProcessingModelComment &comment );
134 virtual QgsProcessingModelComponent *clone()
const = 0
SIP_FACTORY;
139 QgsProcessingModelComponent(
const QString &description = QString() );
142 QgsProcessingModelComponent(
const QgsProcessingModelComponent &other ) =
default;
145 QgsProcessingModelComponent &operator=(
const QgsProcessingModelComponent &other ) =
default;
151 void saveCommonProperties( QVariantMap &map )
const;
157 void restoreCommonProperties(
const QVariantMap &map );
167 void copyNonDefinitionProperties(
const QgsProcessingModelComponent &other );
171 static constexpr double DEFAULT_COMPONENT_WIDTH = 200;
172 static constexpr double DEFAULT_COMPONENT_HEIGHT = 30;
177 QString mDescription;
179 QSizeF mSize = QSizeF( DEFAULT_COMPONENT_WIDTH, DEFAULT_COMPONENT_HEIGHT );
182 bool mTopEdgeLinksCollapsed =
true;
183 bool mBottomEdgeLinksCollapsed =
true;