* @brief Creates a new viewer interface context for this node. This is not shared among viewers. **/
| 502 | * @brief Creates a new viewer interface context for this node. This is not shared among viewers. |
| 503 | **/ |
| 504 | void |
| 505 | ViewerTab::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 |
nothing calls this directly
no test coverage detected