forked from paceholder/nodeeditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNodeState.cpp
More file actions
42 lines (33 loc) · 774 Bytes
/
NodeState.cpp
File metadata and controls
42 lines (33 loc) · 774 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
42
#include "NodeState.hpp"
#include "ConnectionGraphicsObject.hpp"
#include "NodeGraphicsObject.hpp"
namespace QtNodes {
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();
}
} // namespace QtNodes