Skip to content
Permalink
Browse files

Start using c++ base clases in model designer

  • Loading branch information
nyalldawson committed Mar 2, 2020
1 parent d9cc2ae commit 72d73054568dbe2be9434daaf6a5b578fcad07df
@@ -10,6 +10,7 @@




class QgsModelComponentGraphicItem : QGraphicsObject
{
%Docstring
@@ -32,6 +33,11 @@ Base class for graphic items representing model components in the model designer
Constructor for QgsModelComponentGraphicItem for the specified ``component``, with the specified ``parent`` item.

Ownership of ``component`` is transferred to the item.
%End

QgsProcessingModelComponent *component();
%Docstring
Returns the model component associated with this item.
%End

};
@@ -83,14 +83,14 @@ def updatePath(self):
self.endPoints = []
controlPoints = []
endPt = self.endItem.getLinkPointForParameter(self.endIndex)
if isinstance(self.startItem.element, QgsProcessingModelParameter):
if isinstance(self.startItem.component(), QgsProcessingModelParameter):
startPt = self.startItem.getLinkPointForParameter(self.startIndex)
else:
startPt = self.startItem.getLinkPointForOutput(self.startIndex)
if isinstance(self.endItem.element, QgsProcessingModelParameter):
if isinstance(self.endItem.component(), QgsProcessingModelParameter):
endPt = self.endItem.getLinkPointForParameter(self.startIndex)

if isinstance(self.startItem.element, QgsProcessingModelChildAlgorithm):
if isinstance(self.startItem.component(), QgsProcessingModelChildAlgorithm):
if self.startIndex != -1:
controlPoints.append(self.startItem.pos() + startPt)
controlPoints.append(self.startItem.pos() + startPt +

0 comments on commit 72d7305

Please sign in to comment.
You can’t perform that action at this time.