MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / installButtonShortcuts

Function installButtonShortcuts

pj_dialog_host/src/widget_binding.cpp:1142–1155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1140// ---------------------------------------------------------------------------
1141
1142void installButtonShortcuts(QWidget* root, const PJ::WidgetDataView& view) {
1143 for (const auto& name : view.widgetNames()) {
1144 auto sc = view.shortcut(name);
1145 if (!sc) {
1146 continue;
1147 }
1148 auto* btn = root->findChild<QPushButton*>(QString::fromStdString(name));
1149 if (!btn) {
1150 continue;
1151 }
1152 auto* shortcut = new QShortcut(QKeySequence(QString::fromStdString(*sc)), root);
1153 QObject::connect(shortcut, &QShortcut::activated, btn, &QPushButton::click);
1154 }
1155}
1156
1157} // namespace PJ

Callers 2

showDialogMethod · 0.85
openPanelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected