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

Method showIcicleTree

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

Source from the content-addressed store, hash-verified

487}
488
489void ExecutionWindow::showIcicleTree()
490{
491
492 const auto &tree = execution_.tree();
493 /// Can only show icicle tree when the tree is fully built
494 /// TODO: change this to allow partially built trees
495 //if (!tree.isDone())
496 // return;
497
498 if (!it_dock_)
499 {
500 /// Create Icicle Tree Widget
501
502 it_dock_ = new QDockWidget("Icicle Tree", this);
503 it_dock_->setAllowedAreas(Qt::BottomDockWidgetArea | Qt::TopDockWidgetArea);
504 addDockWidget(Qt::TopDockWidgetArea, it_dock_);
505
506 icicle_tree_.reset(new pixel_view::IcicleCanvas(tree));
507 icicle_tree_->setDarkMode(dark_mode_);
508 it_dock_->setWidget(icicle_tree_.get());
509
510 connect(icicle_tree_.get(), &pixel_view::IcicleCanvas::nodeClicked, this, &ExecutionWindow::nodeSelected);
511 connect(icicle_tree_.get(), &pixel_view::IcicleCanvas::nodeClicked, traditional_view_.get(), &tree::TraditionalView::centerCurrentNode);
512
513 /// Note: nodeSelected can be triggered by some other view
514 connect(this, &ExecutionWindow::nodeSelected, icicle_tree_.get(), &pixel_view::IcicleCanvas::selectNode);
515 }
516
517 if (it_dock_->isHidden())
518 {
519 it_dock_->show();
520 }
521 else
522 {
523 it_dock_->hide();
524 }
525}
526
527void ExecutionWindow::toggleLanternView(bool checked)
528{

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected