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

Method onRightClickMenuRequested

Gui/DockablePanel.cpp:1603–1639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1601}
1602
1603void
1604DockablePanel::onRightClickMenuRequested(const QPoint & pos)
1605{
1606 QWidget* emitter = qobject_cast<QWidget*>( sender() );
1607
1608 assert(emitter);
1609
1610 EffectInstance* isEffect = dynamic_cast<EffectInstance*>(_imp->_holder);
1611 if (isEffect) {
1612 NodePtr master = isEffect->getNode()->getMasterNode();
1613 Menu menu(this);
1614 //menu.setFont( QFont(appFont,appFontSize) );
1615 QAction* userParams = new QAction(tr("Manage user parameters..."), &menu);
1616 menu.addAction(userParams);
1617
1618
1619 QAction* setKeys = new QAction(tr("Set key on all parameters"), &menu);
1620 menu.addAction(setKeys);
1621
1622 QAction* removeAnimation = new QAction(tr("Remove animation on all parameters"), &menu);
1623 menu.addAction(removeAnimation);
1624
1625 if ( master || !_imp->_holder || !_imp->_holder->getApp() || _imp->_holder->getApp()->isGuiFrozen() ) {
1626 setKeys->setEnabled(false);
1627 removeAnimation->setEnabled(false);
1628 }
1629
1630 QAction* ret = menu.exec( emitter->mapToGlobal(pos) );
1631 if (ret == setKeys) {
1632 setKeyOnAllParameters();
1633 } else if (ret == removeAnimation) {
1634 removeAnimationOnAllParameters();
1635 } else if (ret == userParams) {
1636 onManageUserParametersActionTriggered();
1637 }
1638 }
1639} // onRightClickMenuRequested
1640
1641void
1642DockablePanel::onManageUserParametersActionTriggered()

Callers

nothing calls this directly

Calls 7

getMasterNodeMethod · 0.80
addActionMethod · 0.80
getNodeMethod · 0.45
getAppMethod · 0.45
isGuiFrozenMethod · 0.45
setEnabledMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected