39 lines
723 B
C++
39 lines
723 B
C++
#include "nodeState.h"
|
|
|
|
#include "connectionGraphicsObject.h"
|
|
#include "nodeGraphicsObject.h"
|
|
|
|
NodeState::NodeState(NodeGraphicsObject &ngo)
|
|
: _ngo(ngo)
|
|
, _hovered(false)
|
|
, _resizing(false)
|
|
, _connectionForReaction{nullptr}
|
|
{
|
|
Q_UNUSED(_ngo);
|
|
}
|
|
|
|
void NodeState::setResizing(bool resizing)
|
|
{
|
|
_resizing = resizing;
|
|
}
|
|
|
|
bool NodeState::resizing() const
|
|
{
|
|
return _resizing;
|
|
}
|
|
|
|
ConnectionGraphicsObject const *NodeState::connectionForReaction() const
|
|
{
|
|
return _connectionForReaction.data();
|
|
}
|
|
|
|
void NodeState::storeConnectionForReaction(ConnectionGraphicsObject const *cgo)
|
|
{
|
|
_connectionForReaction = cgo;
|
|
}
|
|
|
|
void NodeState::resetConnectionForReaction()
|
|
{
|
|
_connectionForReaction.clear();
|
|
}
|