| 1448 | } |
| 1449 | |
| 1450 | QAction *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 | |
| 1468 | void ShaderViewer::updateWindowTitle() |
| 1469 | { |
nothing calls this directly
no test coverage detected