feat: add node edges

This commit is contained in:
parker
2025-06-20 23:12:09 +01:00
parent cf876320d8
commit 20c6ad2b64
10 changed files with 211 additions and 28 deletions

View File

@@ -0,0 +1,27 @@
#include "gui/network/SocketGraphic.h"
#include <QTextDocument>
#include <iostream>
#include <qgraphicsitem.h>
SocketGraphic::SocketGraphic(QGraphicsItem *parent)
: QGraphicsItem(parent)
{
socketSize_ = 3;
}
QRectF SocketGraphic::boundingRect() const
{
auto boundRect = QRect(-socketSize_/2, -socketSize_/2, socketSize_, socketSize_);
return boundRect;
}
void SocketGraphic::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
QBrush whiteBrush = QBrush("white");
painter->setPen(Qt::NoPen);
painter->setBrush(whiteBrush);
painter->drawEllipse(QPoint(0,0), socketSize_, socketSize_);
}