ui: show tooltips when hovering nodes and edges
This commit is contained in:
@@ -246,6 +246,9 @@ void QtGraphView::doRefreshView()
|
||||
|
||||
utility::setWidgetBackgroundColor(QtViewWidgetWrapper::getWidgetOfView(this), backgroundColor);
|
||||
utility::setWidgetBackgroundColor(getView(), backgroundColor);
|
||||
|
||||
std::string css = utility::getStyleSheet("data/gui/graph_view/graph_view.css");
|
||||
getView()->setStyleSheet(css.c_str());
|
||||
}
|
||||
|
||||
std::shared_ptr<QtGraphNode> QtGraphView::findNodeRecursive(const std::list<std::shared_ptr<QtGraphNode>>& nodes, Id tokenId)
|
||||
|
||||
@@ -117,6 +117,15 @@ void QtGraphEdge::updateLine()
|
||||
}
|
||||
}
|
||||
|
||||
if (m_data)
|
||||
{
|
||||
m_child->setToolTip(QString::fromStdString(m_data->getTypeString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_child->setToolTip(QString::fromStdString(Edge::getTypeString(Edge::EDGE_AGGREGATION)));
|
||||
}
|
||||
|
||||
this->setZValue(style.zValue); // Used to draw edges always on top of nodes.
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ QtGraphNodeBundle::QtGraphNodeBundle(Id tokenId, size_t nodeCount, std::string n
|
||||
m_circle->setNumber(nodeCount);
|
||||
|
||||
this->setAcceptHoverEvents(true);
|
||||
|
||||
this->setToolTip("bundle");
|
||||
}
|
||||
|
||||
QtGraphNodeBundle::~QtGraphNodeBundle()
|
||||
|
||||
@@ -19,6 +19,8 @@ QtGraphNodeData::QtGraphNodeData(const Node* data, bool hasParent, bool childVis
|
||||
{
|
||||
this->setName(data->getName());
|
||||
}
|
||||
|
||||
this->setToolTip(QString::fromStdString(data->getTypeString()));
|
||||
}
|
||||
|
||||
QtGraphNodeData::~QtGraphNodeData()
|
||||
|
||||
Reference in New Issue
Block a user