26 #include <QGraphicsObject> 28 #include "latexLink.h" 32 class QGraphicsSceneMouseEvent;
40 class Edge:
public QGraphicsObject
53 virtual ~
Edge()
override;
55 QString getName()
const;
56 qint32 getLineWidth()
const {
return lineWidth; }
58 const Node* getFirst()
const;
59 const Node* getSecond()
const;
63 bool isConnectedTo(
Node const* node)
const;
64 bool isFlipped()
const {
return flippedLabel; }
65 bool hasFocusInGraph()
const;
67 void unFocusInGraph();
68 void wheelEventCustom(
int delta);
70 bool getSign()
const {
return particleType > 0; }
71 qint32 getParticleType() {
return std::abs(particleType); }
72 QColor getColor()
const;
73 QColor getPaintColor()
const;
75 double getCurve()
const;
76 void setCurve(
double t_curve);
77 qreal getCurvature()
const;
80 void setDiagramWidget(DiagramWidget *t_widget) {
83 void setSides(
Node *t_first,
86 setFlipped(!flippedLabel);
88 void setColor(QColor t_color) {
92 void setParticleType(qint32 t_type);
94 enum {
Type =
static_cast<int>(UserType) + 2 };
95 int type()
const override {
return Type; }
97 QRectF boundingRect()
const override;
98 QPainterPath shape()
const override;
99 void paint(QPainter *painter,
100 QStyleOptionGraphicsItem
const*option,
101 QWidget *widget)
override;
103 void paintLine(QPainter *painter)
const;
104 void paintDashedLine(QPainter *painter)
const;
105 void paintDotLine(QPainter *painter)
const;
106 void paintSinusoid(QPainter *painter)
const;
107 void paintCycloid(QPainter *painter)
const;
108 void paintArrow(QPainter *painter)
const;
114 void setName(QString
const& t_name);
115 void setLineWidth(qint32 t_lineWidth);
116 void setFlipped(
bool t_flipped) {
117 flippedLabel = t_flipped;
122 void changeEdgeType(QAction *action);
125 void mousePressEvent(QGraphicsSceneMouseEvent *event)
override;
126 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
override;
127 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
override;
128 void keyPressEvent(QKeyEvent *event)
override;
132 Proxy *label =
nullptr;
137 DiagramWidget *widget;
142 mutable int signCurvature = 0;
143 mutable qreal curvature;
Definition: curvature.cpp:21
Type
Different types of gauge ficing parameter for gauge boson propagators.
Definition: gaugedGroup.h:92
Definition: diagram.h:243
Definition: amplitudeSimplification.h:38