Maki
Formally verified low-code orchestration
Loading...
Searching...
No Matches
StructureCanvas Class Reference
Inheritance diagram for StructureCanvas:
Canvas

Public Member Functions

Types::LibraryTypes type () const override
 Returns the type of library this canvas belongs to.
Public Member Functions inherited from Canvas
 Canvas (const QString &canvasId, std::shared_ptr< EdgeRouter > router, QObject *parent=nullptr)
 Constructs a new Canvas object.
QString id () const
 Returns the unique identifier for this canvas.
void pasteCopiedItems ()
 Pastes copied items onto the canvas.
void copySelectedItems (NodeItem *node)
 Copies selected items to the clipboard.
void deleteSelectedItems ()
 Deletes selected items from the canvas.
qreal getScale () const
 Returns the current scale of the canvas.
QPointF getCenter () const
 Returns the center position of the canvas.
void centerOnNodes ()
 Centers the canvas so the nodes are distributed.
VoidResult loadFromSave (const SaveInfo &info)
 Loads the canvas from save information.
QList< NodeItem * > availableNodes ()
 Returns a list of available node items.
QUndoStack * undoStack () const
 Returns a pointer to the undo stack associated with this canvas.
void nodeClicked (NodeItem *node)
 Handles node click events.
void populate (const FlowSaveInfo &flow)
 Populates the canvas with a given flow.
void themeChanged ()
 Handles theme change events.
void settingsChanged (const AppearanceSettings &appearance)
 Handles settings change events.
void removeNode (const NodeSaveInfo &info)
 Removes a node based on save information.
void moveNodeTo (const QString &nodeId, const QPointF &position)
 Moves a node to a new position.
void setNodeSize (const QString &nodeId, const QSizeF &size)
 Sets the size of a node.
void materializeTransition (std::shared_ptr< TransitionSaveInfo > info)
 Creates a transition based on save information.
virtual void removeTransition (const TransitionSaveInfo &info)
 Removes a transition based on save information.
void requestAlignNodes (const QList< Types::AlignmentNode > &items, Types::AlignmentMode mode, Types::AlignmentDirection direction)
 Requests alignment of nodes.
void alignNodes (const QList< Types::AlignmentNode > &items, Types::AlignmentMode mode, Types::AlignmentDirection direction, bool useGiven)
 Aligns nodes based on the given parameters.
std::pair< NodeItem *, PFlow > getFlow (const QString &flowId) const
 Returns a pointer to the flow if it exists;.
NodeItem * findNodeWithId (const QString &id) const
 Finds a node by its ID.

Additional Inherited Members

Public Slots inherited from Canvas
void focusOnNode (const QString &nodeId, const maki::FocusProperties &properties)
 Handles focus on a node.
void onRemoveNode (const QString &flowId, const QString &nodeId)
 Handles removal of a node.
void onFlowSelected (const QString &flowId, const QString &nodeId)
 Handles selection of a flow.
void onFlowRemoved (const QString &flowId, const QString &nodeId)
 Handles removal of a flow.
Signals inherited from Canvas
void nodeSelected (const QString &nodeId, bool selected)
 Emitted when a node is selected.
void nodeAdded (Canvas *canvas, NodeItem *node)
 Emitted when a node is added.
void nodeRemoved (Canvas *canvas, const QString &nodeId, const QString &parentId)
 Emitted when a node is removed.
void nodeModified (Canvas *canvas, const QString &nodeId)
 Emitted when a node is modified.
void transitionSelected (TransitionItem *transtion)
 Emitted when a transition is selected.
void createEvent (const QString &nodeId)
 Emitted when an event is created.
void openFlow (std::shared_ptr< FlowSaveInfo > flow, const QString &nodeId, const maki::FocusProperties &properties)
 Emitted when a flow is opened.
void focusOn (const QString &flowId, const QString &nodeId, const maki::FocusProperties &properties)
 Emitted when the user requests to focus on a node from the Canvas.
void flowAdded (const QString &flowId, const QString &nodeId)
 Emitted when a flow is added.
void flowRemoved (const QString &flowId, const QString &nodeId)
 Emitted when a flow is removed.
Protected Member Functions inherited from Canvas
void dragEnterEvent (QGraphicsSceneDragDropEvent *event) override
 Handles drag enter events.
void dragMoveEvent (QGraphicsSceneDragDropEvent *event) override
 Handles drag move events.
void dropEvent (QGraphicsSceneDragDropEvent *event) override
 Handles drop events.
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 Handles mouse press events.
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 Handles mouse move events.
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 Handles mouse release events.
void contextMenuEvent (QGraphicsSceneContextMenuEvent *event) override
 Handles context menu events.
CanvasView * parentView () const
 Returns the parent view of this canvas.
Protected Attributes inherited from Canvas
QUndoStack * mUndoStack = nullptr
 Pointer to the system edge router.
EventDispatcher< DocumentEvent >::Subscription mDocumentSubscription
 Pointer to the undo stack.

Member Function Documentation

◆ type()

Types::LibraryTypes StructureCanvas::type ( ) const
overridevirtual

Returns the type of library this canvas belongs to.

Returns
The library type as Types::LibraryTypes.

Reimplemented from Canvas.


The documentation for this class was generated from the following files:
  • /__w/maki/maki/app/system/structure_canvas.h
  • /__w/maki/maki/app/system/structure_canvas.cpp