void GVSkeletonGraph::addNode(const QString& name){ setlocale(LC_NUMERIC,"en_US.UTF-8"); if(_nodes.contains(name)) removeNode(name); _nodes.insert(name, _agnode(_graph, name)); }
//------------------------------------------------------------------------------ // Name: GraphNode // Desc: //------------------------------------------------------------------------------ GraphNode::GraphNode(GraphWidget *graph, const QString &text, const QColor &color) : color_(color), graph_(graph) { setFlag(QGraphicsItem::ItemIsMovable, true); setFlag(QGraphicsItem::ItemIsSelectable, true); setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); setAcceptHoverEvents(true); setCacheMode(QGraphicsItem::DeviceCoordinateCache); setZValue(NodeZValue); drawLabel(text); graph->scene()->addItem(this); QString name = QString("Node%1").arg(reinterpret_cast<uintptr_t>(this)); node_ = _agnode(graph->graph_, name); _agset(node_, "fixedsize", "0"); _agset(node_, "width", QString("%1").arg(boundingRect().width() / 96.0)); _agset(node_, "height", QString("%1").arg(boundingRect().height() / 96.0)); }
void GVSubGraph::addNode(const QString& name) { if(_nodes.contains(name)) removeNode(name); _nodes.insert(name, _agnode(_graph, name)); }
void GVSkeletonGraph::addNode(const QString& name){ setlocale(LC_NUMERIC,"en_US.UTF-8"); // Débug séparateur de décimales en version française if(_nodes.contains(name)) removeNode(name); _nodes.insert(name, _agnode(_graph, name)); }