refactor: fix file case

This commit is contained in:
2025-07-10 13:49:25 +01:00
parent 9350b64567
commit 2d0c8fcfba
34 changed files with 72 additions and 72 deletions

View File

@@ -0,0 +1,46 @@
#pragma once
#include <QGraphicsItem>
#include "Gui/Network/SocketGraphic.h"
#include <QPainter>
class NodeEdgeGraphic
: public QGraphicsItem
{
public:
NodeEdgeGraphic(SocketGraphic* socket1, SocketGraphic* socket2, QGraphicsItem *parent = nullptr);
~NodeEdgeGraphic();
QRectF boundingRect() const override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
QPainterPath shape() const override;
// void setColor(QColor color);
// void useDefaultColor();
void updateDeleteHighlightPen();
void setPos(QPointF pos1, QPointF pos2);
void setStartPos(QPointF pos);
void setEndPos(QPointF pos);
void cleanUp();
void setDeleteHighlight(bool enable);
QPen deleteHighlightPen_;
QPen defaultPen_;
bool deleteHighlight_=false;
private:
SocketGraphic* socket1_;
SocketGraphic* socket2_;
QColor color_;
QColor defaultColor_;
QPointF pos1_;
QPointF pos2_;
QPainterPath path_;
QRectF boundRect_;
qreal padding_=40;
QPointF hoverPos_;
void updatePath();
protected:
void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override;
};