@@ -36,8 +36,7 @@ class NODE_EDITOR_PUBLIC AbstractNodeGeometry
3636 // / Port position in node's coordinate system.
3737 virtual QPointF portPosition (NodeId const nodeId,
3838 PortType const portType,
39- PortIndex const index) const
40- = 0;
39+ PortIndex const index) const = 0;
4140
4241 // / A convenience function using the `portPosition` and a given transformation.
4342 virtual QPointF portScenePosition (NodeId const nodeId,
@@ -48,8 +47,7 @@ class NODE_EDITOR_PUBLIC AbstractNodeGeometry
4847 // / Defines where to draw port label. The point corresponds to a font baseline.
4948 virtual QPointF portTextPosition (NodeId const nodeId,
5049 PortType const portType,
51- PortIndex const portIndex) const
52- = 0;
50+ PortIndex const portIndex) const = 0;
5351
5452 /* *
5553 * Defines where to start drawing the caption. The point corresponds to a font
@@ -60,6 +58,15 @@ class NODE_EDITOR_PUBLIC AbstractNodeGeometry
6058 // / Caption rect is needed for estimating the total node size.
6159 virtual QRectF captionRect (NodeId const nodeId) const = 0;
6260
61+ /* *
62+ * Defines where to start drawing the label. The point corresponds to a font
63+ * baseline.
64+ */
65+ virtual QPointF labelPosition (NodeId const nodeId) const = 0;
66+
67+ // / Caption rect is needed for estimating the total node size.
68+ virtual QRectF labelRect (NodeId const nodeId) const = 0;
69+
6370 // / Position for an embedded widget. Return any value if you don't embed.
6471 virtual QPointF widgetPosition (NodeId const nodeId) const = 0;
6572
@@ -69,6 +76,8 @@ class NODE_EDITOR_PUBLIC AbstractNodeGeometry
6976
7077 virtual QRect resizeHandleRect (NodeId const nodeId) const = 0;
7178
79+ virtual int getPortSpacing () = 0;
80+
7281protected:
7382 AbstractGraphModel &_graphModel;
7483};
0 commit comments