Skip to content

Styling of the qt nodes by providing styling information on the flowpipe nodes #14

@PaulSchweizer

Description

@PaulSchweizer

Provide a way to define the styling on the Flowpipe Node.

My first use case would be color:

I would imagine something like this:

@Node(
    metadata={"FlowpipeEditorWidget": {"color": "#ff0000"}},
)
def SetTicket():
    pass

would then add thopse values to the qt node:

    def _add_node(self, fp_node: INode, point: QtCore.QPoint) -> BaseNode:
        qt_node = self.graph.create_node(
            "flowpipe.FlowpipeNode",
            name=fp_node.name,
            pos=[point.x(), point.y()],
            **fp_node.metadata.get("FlowpipeEditorWidget", {})
        )

Important would be to provide transparency on the possible metadata values.
I am not sure how to best do that atm. We would have to investigate our options.
Kind of like defining the flowpipe-editor as a "plugin" to flowpipe which then extends the type hints for the metadata. I don't have an answer to this yet, but would think there is a feasible solution

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions