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

Method createNodeViewerInterface

Gui/ViewerTab30.cpp:504–532  ·  view source on GitHub ↗

* @brief Creates a new viewer interface context for this node. This is not shared among viewers. **/

Source from the content-addressed store, hash-verified

502 * @brief Creates a new viewer interface context for this node. This is not shared among viewers.
503 **/
504void
505ViewerTab::createNodeViewerInterface(const NodeGuiPtr& n)
506{
507 if (!n) {
508 return;
509 }
510 ViewerTabPrivate::NodeViewerContextsMap::iterator found = _imp->nodesContext.find(n);
511 if ( found != _imp->nodesContext.end() ) {
512 // Already exists
513 return;
514 }
515
516 NodeViewerContextPtr nodeContext = NodeViewerContext::create(n, this);
517 nodeContext->createGui();
518 _imp->nodesContext.insert( std::make_pair(n, nodeContext) );
519
520 if ( n->isSettingsPanelVisible() ) {
521 setPluginViewerInterface(n);
522 } else {
523 QToolBar *toolbar = nodeContext->getToolBar();
524 if (toolbar) {
525 toolbar->hide();
526 }
527 QWidget* w = nodeContext->getContainerWidget();
528 if (w) {
529 w->hide();
530 }
531 }
532}
533
534/**
535 * @brief Set the current viewer interface for a given plug-in to be the one of the given node

Callers

nothing calls this directly

Calls 7

getToolBarMethod · 0.80
hideMethod · 0.80
findMethod · 0.45
endMethod · 0.45
createGuiMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected