-
Notifications
You must be signed in to change notification settings - Fork 948
Expand file tree
/
Copy pathDefaultConnectionPainter.hpp
More file actions
30 lines (24 loc) · 1.16 KB
/
DefaultConnectionPainter.hpp
File metadata and controls
30 lines (24 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
#include <QtGui/QPainter>
#include <QtGui/QPainterPath>
#include "AbstractConnectionPainter.hpp"
#include "Definitions.hpp"
namespace QtNodes {
class ConnectionGeometry;
class ConnectionGraphicsObject;
class DefaultConnectionPainter : public AbstractConnectionPainter
{
public:
void paint(QPainter *painter, ConnectionGraphicsObject const &cgo) const override;
QPainterPath getPainterStroke(ConnectionGraphicsObject const &cgo) const override;
static QPolygonF createArrowPoly(const QPainterPath& p, double mRadius,double arrowSize,bool drawIn = true);
private:
QPainterPath cubicPath(ConnectionGraphicsObject const &connection) const;
void drawSketchLine(QPainter *painter, ConnectionGraphicsObject const &cgo,QPainterPath const & cubic) const;
void drawHoveredOrSelected(QPainter *painter, ConnectionGraphicsObject const &cgo,QPainterPath const & cubic) const;
void drawNormalLine(QPainter *painter, ConnectionGraphicsObject const &cgo,QPainterPath const & cubic) const;
#ifdef NODE_DEBUG_DRAWING
void debugDrawing(QPainter *painter, ConnectionGraphicsObject const &cgo,QPainterPath const & cubic) const;
#endif
};
} // namespace QtNodes