anpstudio 0.1.0
ANP Studio — Analytic Network Process desktop application
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Member Functions | List of all members
NetworkCanvas Class Reference

Visual editor for clusters, nodes, and connections. More...

#include <network_canvas.hpp>

Inherits QGraphicsView.

Signals

void nodeActivated (const QString &name)
 Emitted to open a node's subnetwork (e.g.
 
void selectionChanged (const QString &cluster, const QString &node)
 Emitted when the user selects a cluster or node on the canvas.
 

Public Member Functions

 NetworkCanvas (Document *doc, QWidget *parent=nullptr)
 
void rebuild ()
 Rebuilds scene items from the current network.
 
void setConnectMode (bool on)
 Enables or disables click-to-connect link mode.
 
bool connectMode () const
 
void select (const QString &cluster, const QString &node)
 Highlights a cluster/node from Document selection.
 

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *event) override
 Shows context menu for add/connect operations.
 
void mousePressEvent (QMouseEvent *event) override
 Handles node selection and connect-mode clicks.
 

Detailed Description

Visual editor for clusters, nodes, and connections.

Supports connect mode for drawing links and persists layout positions back to the Document model.

Constructor & Destructor Documentation

◆ NetworkCanvas()

NetworkCanvas::NetworkCanvas ( Document doc,
QWidget *  parent = nullptr 
)
explicit
Parameters
docDocument whose network is displayed.
parentOptional parent widget.

Member Function Documentation

◆ connectMode()

bool NetworkCanvas::connectMode ( ) const
inline
Returns
True when connect mode is active.

◆ nodeActivated

void NetworkCanvas::nodeActivated ( const QString &  name)
signal

Emitted to open a node's subnetwork (e.g.

from context menu).


The documentation for this class was generated from the following file: