forked from l3enQ/nodeeditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNodeState.cpp
More file actions
54 lines (43 loc) · 972 Bytes
/
NodeState.cpp
File metadata and controls
54 lines (43 loc) · 972 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
43
44
45
46
47
48
49
50
51
52
53
54
#include "NodeState.hpp"
#include "ConnectionGraphicsObject.hpp"
#include "NodeGraphicsObject.hpp"
namespace QtNodes {
NodeState::NodeState(NodeGraphicsObject &ngo)
: _ngo(ngo)
, _hovered(false)
, _locked(false)
, _root(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();
}
QPointF NodeState::pressedPos() const
{
return _pressedPos;
}
void NodeState::setPressedPos(QPointF newPressedPos)
{
_pressedPos = newPressedPos;
}
} // namespace QtNodes