MCPcopy Create free account
hub / github.com/baldurk/renderdoc / MakeExecuteAction

Method MakeExecuteAction

qrenderdoc/Windows/ShaderViewer.cpp:1450–1466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1448}
1449
1450QAction *ShaderViewer::MakeExecuteAction(QString name, const QIcon &icon, QString tooltip,
1451 QKeySequence shortcut)
1452{
1453 QAction *act = new QAction(name, this);
1454 // set the shortcut context to something that shouldn't fire, since we want to handle this
1455 // ourselves - we just want Qt to *display* the shortcut
1456 act->setShortcutContext(Qt::WidgetShortcut);
1457 act->setToolTip(tooltip);
1458 act->setIcon(icon);
1459 if(!shortcut.isEmpty())
1460 {
1461 act->setShortcut(shortcut);
1462 m_Ctx.GetMainWindow()->RegisterShortcut(act->shortcut().toString(), this,
1463 [act](QWidget *) { act->activate(QAction::Trigger); });
1464 }
1465 return act;
1466}
1467
1468void ShaderViewer::updateWindowTitle()
1469{

Callers

nothing calls this directly

Calls 6

RegisterShortcutMethod · 0.80
setToolTipMethod · 0.45
setIconMethod · 0.45
isEmptyMethod · 0.45
GetMainWindowMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected