18 #ifndef QGSPROCESSINGMODELCOMPONENT_H
19 #define QGSPROCESSINGMODELCOMPONENT_H
21 #include "qgis_core.h"
27 class QgsProcessingModelComment;
36 class CORE_EXPORT QgsProcessingModelComponent
40 virtual ~QgsProcessingModelComponent() =
default;
46 QString description()
const;
52 void setDescription(
const QString &description );
58 QPointF position()
const;
64 void setPosition( QPointF position );
78 void setSize( QSizeF size );
97 void setColor(
const QColor &color );
103 bool linksCollapsed( Qt::Edge edge )
const;
110 void setLinksCollapsed( Qt::Edge edge,
bool collapsed );
116 SIP_SKIP virtual const QgsProcessingModelComment *comment()
const {
return nullptr; }
122 virtual QgsProcessingModelComment *comment() {
return nullptr; }
128 virtual void setComment(
const QgsProcessingModelComment &comment );
135 virtual QgsProcessingModelComponent *clone()
const = 0
SIP_FACTORY;
140 QgsProcessingModelComponent(
const QString &description = QString() );
143 QgsProcessingModelComponent(
const QgsProcessingModelComponent &other ) =
default;
146 QgsProcessingModelComponent &operator=(
const QgsProcessingModelComponent &other ) =
default;
152 void saveCommonProperties( QVariantMap &map )
const;
158 void restoreCommonProperties(
const QVariantMap &map );
168 void copyNonDefinitionProperties(
const QgsProcessingModelComponent &other );
172 static constexpr
double DEFAULT_COMPONENT_WIDTH = 200;
173 static constexpr
double DEFAULT_COMPONENT_HEIGHT = 30;
178 QString mDescription;
180 QSizeF mSize = QSizeF( DEFAULT_COMPONENT_WIDTH, DEFAULT_COMPONENT_HEIGHT );
183 bool mTopEdgeLinksCollapsed =
true;
184 bool mBottomEdgeLinksCollapsed =
true;