ui: Improved horizontal graph layout
* extend horizontal edges to origin column width * leave horizontal gap in the middle of the left and right buckets for routing edges * move left and right buckets vertically so that edges enter and leave horizontally * removed third pivoting for graph edges, all edges enter and leave relative to the node center now
This commit is contained in:
@@ -109,6 +109,7 @@ bool QtGraphNode::setPosition(const Vec2i& position)
|
||||
if (offset.x != 0 || offset.y != 0)
|
||||
{
|
||||
this->moveBy(offset.x, offset.y);
|
||||
setColumnSize(Vec2i());
|
||||
notifyEdgesAfterMove();
|
||||
return true;
|
||||
}
|
||||
@@ -116,7 +117,7 @@ bool QtGraphNode::setPosition(const Vec2i& position)
|
||||
return false;
|
||||
}
|
||||
|
||||
Vec2i QtGraphNode::getSize() const
|
||||
const Vec2i& QtGraphNode::getSize() const
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
@@ -130,6 +131,16 @@ void QtGraphNode::setSize(const Vec2i& size)
|
||||
m_undefinedRect->setRect(1, 1, size.x - 2, size.y - 2);
|
||||
}
|
||||
|
||||
const Vec2i& QtGraphNode::getColumnSize() const
|
||||
{
|
||||
return m_columnSize;
|
||||
}
|
||||
|
||||
void QtGraphNode::setColumnSize(const Vec2i& size)
|
||||
{
|
||||
m_columnSize = size;
|
||||
}
|
||||
|
||||
QSize QtGraphNode::size() const
|
||||
{
|
||||
return QSize(m_size.x, m_size.y);
|
||||
|
||||
Reference in New Issue
Block a user