feat: add graph traversal function
This commit is contained in:
@@ -72,10 +72,8 @@ private:
|
||||
template<typename T>
|
||||
QGraphicsItem* itemOfType(QList<QGraphicsItem*> items)
|
||||
{
|
||||
// std::cout << "count: " << items.size() << "\n";
|
||||
for(QGraphicsItem* item : items)
|
||||
{
|
||||
std::cout << "item: " << typeid(*item).name() << "\n";
|
||||
if(item && typeid(*item)==typeid(T))
|
||||
{
|
||||
return item;
|
||||
|
||||
@@ -101,9 +101,6 @@ QRectF NodeEdgeGraphic::boundingRect() const
|
||||
}
|
||||
|
||||
QPainterPath NodeEdgeGraphic::shape() const{
|
||||
// FIX: shape not changing with node position
|
||||
std::cout << "setting shape to: " << socket1_->scenePos().x() << " " << socket2_->scenePos().x() <<"\n";
|
||||
|
||||
QPainterPathStroker stroker;
|
||||
stroker.setWidth(padding_);
|
||||
return stroker.createStroke(path_);
|
||||
|
||||
Reference in New Issue
Block a user