MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / showPixelTree

Method showPixelTree

cp-profiler/src/cpprofiler/execution_window.cpp:456–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454}
455
456void ExecutionWindow::showPixelTree()
457{
458 const auto &tree = execution_.tree();
459
460 /// Can only show pixel tree when the tree is fully built
461 /// TODO: change this to allow partially built trees
462 //if (!tree.isDone())
463 // return;
464
465 if (!pt_dock_)
466 {
467 pt_dock_ = new QDockWidget("Pixel Tree", this);
468 pt_dock_->setAllowedAreas(Qt::BottomDockWidgetArea);
469 addDockWidget(Qt::BottomDockWidgetArea, pt_dock_);
470 pixel_tree_.reset(new pixel_view::PtCanvas(tree));
471 pixel_tree_->setDarkMode(dark_mode_);
472 pt_dock_->setWidget(pixel_tree_.get());
473
474 connect(pixel_tree_.get(), &pixel_view::PtCanvas::nodesSelected, [this](const std::vector<NodeID> &nodes) {
475 traditional_view_->highlightSubtrees(nodes, true, false);
476 });
477 }
478
479 if (pt_dock_->isHidden())
480 {
481 pt_dock_->show();
482 }
483 else
484 {
485 pt_dock_->hide();
486 }
487}
488
489void ExecutionWindow::showIcicleTree()
490{

Callers

nothing calls this directly

Calls 5

highlightSubtreesMethod · 0.80
isHiddenMethod · 0.80
resetMethod · 0.45
setDarkModeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected