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

Method addRightClickMenuEntries

Gui/KnobGuiFile.cpp:382–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380}
381
382void
383KnobGuiFile::addRightClickMenuEntries(QMenu* menu)
384{
385 QAction* makeAbsoluteAction = new QAction(tr("Make absolute"), menu);
386 QObject::connect( makeAbsoluteAction, SIGNAL(triggered()), this, SLOT(onMakeAbsoluteTriggered()) );
387
388 makeAbsoluteAction->setToolTip( tr("Make the file-path absolute if it was previously relative to any project path") );
389 menu->addAction(makeAbsoluteAction);
390 QAction* makeRelativeToProject = new QAction(tr("Make relative to project"), menu);
391 makeRelativeToProject->setToolTip( tr("Make the file-path relative to the [Project] path") );
392 QObject::connect( makeRelativeToProject, SIGNAL(triggered()), this, SLOT(onMakeRelativeTriggered()) );
393 menu->addAction(makeRelativeToProject);
394 QAction* simplify = new QAction(tr("Simplify"), menu);
395 QObject::connect( simplify, SIGNAL(triggered()), this, SLOT(onSimplifyTriggered()) );
396 simplify->setToolTip( tr("Same as make relative but will pick the longest project variable to simplify") );
397 menu->addAction(simplify);
398
399 menu->addSeparator();
400 QMenu* qtMenu = _lineEdit->createStandardContextMenu();
401 qtMenu->setFont( QApplication::font() ); // necessary
402 qtMenu->setTitle( tr("Edit") );
403 menu->addMenu(qtMenu);
404}
405
406void
407KnobGuiFile::onMakeAbsoluteTriggered()

Callers

nothing calls this directly

Calls 8

fontFunction · 0.85
addActionMethod · 0.80
addSeparatorMethod · 0.80
setFontMethod · 0.80
setTitleMethod · 0.80
isMultiPathMethod · 0.80
setToolTipMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected