| 380 | } |
| 381 | |
| 382 | void |
| 383 | KnobGuiFile::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 | |
| 406 | void |
| 407 | KnobGuiFile::onMakeAbsoluteTriggered() |
nothing calls this directly
no test coverage detected