MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / floatPane

Method floatPane

Gui/TabWidget.cpp:690–719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688} // closePane
689
690void
691TabWidget::floatPane(QPoint* position)
692{
693 QWidget* parent = parentWidget();
694
695 while (parent) {
696 FloatingWidget* isParentFloating = dynamic_cast<FloatingWidget*>(parent);
697 if (isParentFloating) {
698 return;
699 }
700 parent = parent->parentWidget();
701 }
702
703
704 FloatingWidget* floatingW = new FloatingWidget(_imp->gui, _imp->gui);
705 Splitter* parentSplitter = dynamic_cast<Splitter*>( parentWidget() );
706 //setParent(0);
707 if (parentSplitter) {
708 closeSplitterAndMoveOtherSplitToParent(parentSplitter);
709 }
710
711
712 floatingW->setWidget(this);
713
714 if (position) {
715 floatingW->move(*position);
716 }
717 _imp->gui->registerFloatingWindow(floatingW);
718 _imp->gui->checkNumberOfNonFloatingPanes();
719}
720
721void
722TabWidget::addNewViewer()

Callers 2

floatCurrentWidgetMethod · 0.45

Calls 4

setWidgetMethod · 0.80
moveMethod · 0.45

Tested by

no test coverage detected