| 481 | } // PreferencesPanelPrivate::buildPluginGroupHierarchy |
| 482 | |
| 483 | void |
| 484 | PreferencesPanel::createPluginsView(QGridLayout* pluginsFrameLayout) |
| 485 | { |
| 486 | _imp->pluginsView = new QTreeWidget(this); |
| 487 | _imp->pluginsView->setAttribute(Qt::WA_MacShowFocusRect, 0); |
| 488 | |
| 489 | Label* restartWarningLabel = new Label(tr("<i>Changing any plug-in property requires a restart of %1</i>").arg( QString::fromUtf8(NATRON_APPLICATION_NAME) ), this); |
| 490 | pluginsFrameLayout->addWidget(restartWarningLabel, pluginsFrameLayout->rowCount(), 0, 1, 2); |
| 491 | |
| 492 | _imp->pluginFilterLabel = new Label(tr("Plugin Filter"), this); |
| 493 | |
| 494 | QString filterTt = tr("Display only plug-ins labels containing the letters in the filter much like the Tab menu in the Node Graph"); |
| 495 | _imp->pluginFilterLabel->setToolTip(filterTt); |
| 496 | |
| 497 | _imp->pluginFilterEdit = new LineEdit(this); |
| 498 | _imp->pluginFilterEdit->setToolTip(filterTt); |
| 499 | int row = pluginsFrameLayout->rowCount(); |
| 500 | pluginsFrameLayout->addWidget(_imp->pluginFilterLabel, row, 0, 1, 1); |
| 501 | pluginsFrameLayout->addWidget(_imp->pluginFilterEdit, row, 1, 1, 1); |
| 502 | connect( _imp->pluginFilterEdit, SIGNAL(textChanged(QString)), this, SLOT(filterPlugins(QString)) ); |
| 503 | |
| 504 | pluginsFrameLayout->addWidget(_imp->pluginsView, pluginsFrameLayout->rowCount(), 0, 1, 2); |
| 505 | |
| 506 | QTreeWidgetItem* treeHeader = new QTreeWidgetItem; |
| 507 | treeHeader->setToolTip(COL_PLUGIN_LABEL, tr("The label of the plug-in")); |
| 508 | treeHeader->setText( COL_PLUGIN_LABEL, tr("Label") ); |
| 509 | treeHeader->setToolTip(COL_PLUGINID, tr("The ID of the plug-in")); |
| 510 | treeHeader->setText( COL_PLUGINID, tr("ID") ); |
| 511 | treeHeader->setToolTip(COL_VERSION, tr("The version of the plug-in")); |
| 512 | treeHeader->setText( COL_VERSION, tr("Version") ); |
| 513 | treeHeader->setToolTip(COL_ENABLED, tr("If unchecked, the user will not be able to use a node with this plug-in")); |
| 514 | treeHeader->setText( COL_ENABLED, tr("Enabled") ); |
| 515 | treeHeader->setToolTip(COL_RS_ENABLED, tr("If unchecked, renders will always be made at full image resolution for this plug-in")); |
| 516 | treeHeader->setText( COL_RS_ENABLED, tr("R-S") ); |
| 517 | treeHeader->setToolTip(COL_MT_ENABLED, tr("If unchecked, there can only be a single render issued at a time for a node of this plug-in. This can alter performances a lot.")); |
| 518 | treeHeader->setText( COL_MT_ENABLED, tr("M-T") ); |
| 519 | treeHeader->setToolTip(COL_GL_ENABLED, tr("If unchecked, OpenGL rendering is disabled for any node with this plug-in. If the checkbox is disabled, the plug-in does not support OpenGL rendering")); |
| 520 | treeHeader->setText( COL_GL_ENABLED, tr("OpenGL") ); |
| 521 | _imp->pluginsView->setHeaderItem(treeHeader); |
| 522 | _imp->pluginsView->setSelectionMode(QAbstractItemView::NoSelection); |
| 523 | #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) |
| 524 | _imp->pluginsView->header()->setResizeMode(QHeaderView::ResizeToContents); |
| 525 | #else |
| 526 | _imp->pluginsView->header()->setSectionResizeMode(QHeaderView::ResizeToContents); |
| 527 | #endif |
| 528 | _imp->pluginsView->setSortingEnabled(true); |
| 529 | const PluginsMap& plugins = appPTR->getPluginsList(); |
| 530 | |
| 531 | |
| 532 | for (PluginsMap::const_iterator it = plugins.begin(); it != plugins.end(); ++it) { |
| 533 | if ( it->first.empty() ) { |
| 534 | continue; |
| 535 | } |
| 536 | assert(it->second.size() > 0); |
| 537 | |
| 538 | for (PluginVersionsOrdered::const_reverse_iterator itver = it->second.rbegin(); itver != it->second.rend(); ++itver) { |
| 539 | Plugin* plugin = *itver; |
| 540 | assert(plugin); |
nothing calls this directly
no test coverage detected