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

Method setPagesOrder

Gui/DockablePanel.cpp:544–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

542}
543
544void
545DockablePanel::setPagesOrder(const std::list<KnobPageGuiPtr>& orderedPages,
546 const KnobPageGuiPtr& curPage,
547 bool restorePageIndex)
548{
549 _imp->_tabWidget->clear();
550
551
552 int index = 0;
553 int i = 0;
554 for (std::list<KnobPageGuiPtr>::const_iterator it = orderedPages.begin(); it != orderedPages.end(); ++it, ++i) {
555 QString tabName = QString::fromUtf8( (*it)->pageKnob.lock()->getLabel().c_str() );
556 _imp->_tabWidget->addTab( (*it)->tab, tabName );
557 if ( restorePageIndex && (*it == curPage) ) {
558 index = i;
559 }
560 }
561
562 if ( (index >= 0) && ( index < int( orderedPages.size() ) ) ) {
563 _imp->_tabWidget->setCurrentIndex(index);
564 }
565}
566
567void
568DockablePanel::onKnobsRecreated()

Callers 9

createInstanceFunction · 0.45
createInstanceFunction · 0.45
createInstanceFunction · 0.45
createInstanceFunction · 0.45
createInstanceFunction · 0.45
createInstanceFunction · 0.45
createInstanceFunction · 0.45
createInstanceFunction · 0.45
createInstanceFunction · 0.45

Calls 8

addTabMethod · 0.80
clearMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
getLabelMethod · 0.45
lockMethod · 0.45
sizeMethod · 0.45
setCurrentIndexMethod · 0.45

Tested by

no test coverage detected