33 lines
870 B
C
33 lines
870 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <QtGui/QPainter>
|
||
|
|
|
||
|
|
#include "abstractNodePainter.h"
|
||
|
|
#include "global.h"
|
||
|
|
|
||
|
|
|
||
|
|
class BasicGraphicsScene;
|
||
|
|
class GraphModel;
|
||
|
|
class NodeGeometry;
|
||
|
|
class NodeGraphicsObject;
|
||
|
|
class NodeState;
|
||
|
|
|
||
|
|
/// @ Lightweight class incapsulating paint code.
|
||
|
|
class DefaultNodePainter : public AbstractNodePainter
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
void paint(QPainter *painter, NodeGraphicsObject &ngo) const override;
|
||
|
|
|
||
|
|
void drawNodeRect(QPainter *painter, NodeGraphicsObject &ngo) const;
|
||
|
|
|
||
|
|
void drawConnectionPoints(QPainter *painter, NodeGraphicsObject &ngo) const;
|
||
|
|
|
||
|
|
void drawFilledConnectionPoints(QPainter *painter, NodeGraphicsObject &ngo) const;
|
||
|
|
|
||
|
|
void drawNodeCaption(QPainter *painter, NodeGraphicsObject &ngo) const;
|
||
|
|
|
||
|
|
void drawEntryLabels(QPainter *painter, NodeGraphicsObject &ngo) const;
|
||
|
|
|
||
|
|
void drawResizeRect(QPainter *painter, NodeGraphicsObject &ngo) const;
|
||
|
|
};
|