MCPcopy Create free account
hub / github.com/MrKepzie/Natron / onItemEnabledCheckBoxChecked

Method onItemEnabledCheckBoxChecked

Gui/TrackerPanel.cpp:1414–1437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1412} // TrackerPanel::onItemDataChanged
1413
1414void
1415TrackerPanel::onItemEnabledCheckBoxChecked(bool checked)
1416{
1417 AnimatedCheckBox* widget = qobject_cast<AnimatedCheckBox*>( sender() );
1418 QWidget* widgetContainer = widget->parentWidget();
1419
1420 assert(widget);
1421 for (std::size_t i = 0; i < _imp->items.size(); ++i) {
1422 QWidget* cellW = _imp->view->cellWidget(i, COL_ENABLED);
1423 if (widgetContainer == cellW) {
1424 TrackMarkerPtr marker = _imp->items[i].marker.lock();
1425 boost::shared_ptr<TrackerContext> context = getContext();
1426 // Set the selection to only this marker otherwise all markers will get the enabled value
1427 context->beginEditSelection(TrackerContext::eTrackSelectionInternal);
1428 context->clearSelection(TrackerContext::eTrackSelectionInternal);
1429 context->addTrackToSelection(marker, TrackerContext::eTrackSelectionInternal);
1430 context->endEditSelection(TrackerContext::eTrackSelectionInternal);
1431 marker->setEnabledFromGui(marker->getCurrentTime(), checked);
1432 widget->setAnimation( marker->getEnabledNessAnimationLevel() );
1433 break;
1434 }
1435 }
1436 getNode()->getNode()->getApp()->redrawAllViewers();
1437}
1438
1439void
1440TrackerPanel::onItemMotionModelChanged(int index)

Callers

nothing calls this directly

Calls 15

cellWidgetMethod · 0.80
beginEditSelectionMethod · 0.80
addTrackToSelectionMethod · 0.80
endEditSelectionMethod · 0.80
setEnabledFromGuiMethod · 0.80
getNodeFunction · 0.70
sizeMethod · 0.45
lockMethod · 0.45
clearSelectionMethod · 0.45
getCurrentTimeMethod · 0.45
setAnimationMethod · 0.45

Tested by

no test coverage detected