本文整理汇总了C++中GraphNode::removeOutEdges方法的典型用法代码示例。如果您正苦于以下问题:C++ GraphNode::removeOutEdges方法的具体用法?C++ GraphNode::removeOutEdges怎么用?C++ GraphNode::removeOutEdges使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GraphNode
的用法示例。
在下文中一共展示了GraphNode::removeOutEdges方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotListCalled
/**
* Shows a list of function calls from the current node.
* The list is displayed in a query dialogue. The user can the select which
* calls should be displayed in the graph.
* This slot is connected to the "List Called Functions" popup menu
* action.
*/
void GraphWidget::slotListCalled()
{
GraphNode* pNode;
// Make sure the menu item is a node
pNode = dynamic_cast<GraphNode*>(m_pMenuItem);
if (pNode == NULL)
return;
QueryViewDlg dlg(0, (QWidget*)parent());
// Show the query view dialogue
dlg.query(CscopeFrontend::Called, pNode->getFunc());
if (dlg.exec() != QDialog::Accepted)
return;
// The OK button was clicked, replace current calls with the listed ones
pNode->removeOutEdges();
QueryView::Iterator itr;
CallData data;
data.m_sCaller = pNode->getFunc();
// Add all listed calls
for (itr = dlg.getIterator(); !itr.isEOF(); itr.next()) {
data.m_sCallee = itr.getFunc();
data.m_sFile = itr.getFile();
data.m_sLine = itr.getLine();
data.m_sText = itr.getText();
addCall(data);
}
// Clean-up and redraw the graph
removeDisconnected(pNode);
draw();
}