ui: removed namespace nodes from graph

Nodes within namespaces are display their full name including the namespace.
This commit is contained in:
Eberhard Graether
2015-07-18 22:03:13 +02:00
parent 85d2ebc32a
commit e5a8609d7a
6 changed files with 68 additions and 11 deletions
@@ -5,13 +5,20 @@
#include "utility/messaging/type/MessageFocusOut.h"
#include "utility/messaging/type/MessageGraphNodeMove.h"
QtGraphNodeData::QtGraphNodeData(const Node* data, bool childVisible)
QtGraphNodeData::QtGraphNodeData(const Node* data, bool hasNamespace, bool childVisible)
: m_data(data)
, m_childVisible(childVisible)
{
this->setAcceptHoverEvents(true);
this->setName(data->getName());
if (hasNamespace)
{
this->setName(data->getFullName());
}
else
{
this->setName(data->getName());
}
}
QtGraphNodeData::~QtGraphNodeData()
@@ -35,10 +42,7 @@ Id QtGraphNodeData::getTokenId() const
void QtGraphNodeData::onClick()
{
if (!m_data->isType(Node::NODE_UNDEFINED | Node::NODE_NAMESPACE))
{
MessageActivateNode(m_data->getId(), m_data->getType(), m_data->getFullName()).dispatch();
}
MessageActivateNode(m_data->getId(), m_data->getType(), m_data->getFullName()).dispatch();
}
void QtGraphNodeData::moved(const Vec2i& oldPosition)