MCPcopy Create free account
hub / github.com/LibrePCB/LibrePCB / triggerSchematic

Method triggerSchematic

libs/librepcb/editor/mainwindow.cpp:1114–1138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1112}
1113
1114void MainWindow::triggerSchematic(int project, int schematic,
1115 ui::SchematicAction a) noexcept {
1116 std::shared_ptr<ProjectEditor> prjEditor = mApp.getProjects().value(project);
1117 if (!prjEditor) return;
1118
1119 switch (a) {
1120 case ui::SchematicAction::Open: {
1121 openSchematicTab(project, schematic);
1122 break;
1123 }
1124 case ui::SchematicAction::Rename: {
1125 prjEditor->execRenameSheetDialog(schematic);
1126 break;
1127 }
1128 case ui::SchematicAction::Delete: {
1129 prjEditor->execDeleteSheetDialog(schematic);
1130 break;
1131 }
1132 default: {
1133 qWarning() << "Unhandled action in MainWindow::triggerSchematic():"
1134 << static_cast<int>(a);
1135 break;
1136 }
1137 }
1138}
1139
1140void MainWindow::triggerBoard(int project, int board,
1141 ui::BoardAction a) noexcept {

Callers 1

triggerMethod · 0.80

Calls 3

execRenameSheetDialogMethod · 0.80
execDeleteSheetDialogMethod · 0.80
valueMethod · 0.45

Tested by 1

triggerMethod · 0.64