ui: graph edges clickable
The graph views edges are now clickable. On click the edge and its connected nodes will be displayed. fortune cookie message = Be prepared to accept an exciting opportunity in the future.
This commit is contained in:
@@ -5,8 +5,9 @@
|
||||
|
||||
#include "component/view/graphElements/GraphNode.h"
|
||||
|
||||
QtGraphEdge::QtGraphEdge(const std::weak_ptr<GraphNode>& owner, const std::weak_ptr<GraphNode>& target)
|
||||
: m_owner(owner)
|
||||
QtGraphEdge::QtGraphEdge(const std::weak_ptr<GraphNode>& owner, const std::weak_ptr<GraphNode>& target, const Id id)
|
||||
: GraphEdge(id)
|
||||
, m_owner(owner)
|
||||
, m_target(target)
|
||||
, m_color(0, 0, 0, 0)
|
||||
{
|
||||
@@ -99,3 +100,9 @@ Vec4i QtGraphEdge::getColor() const
|
||||
{
|
||||
return m_color;
|
||||
}
|
||||
|
||||
void QtGraphEdge::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event)
|
||||
{
|
||||
MessageActivateToken message(m_tokenId);
|
||||
message.dispatch();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user