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

Method addExampleProjects

libs/librepcb/editor/guiapplication.cpp:372–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372void GuiApplication::addExampleProjects(QWidget* parent) noexcept {
373 const QString msg =
374 tr("This downloads some example projects from the internet and copies "
375 "them into the workspace to help you evaluating LibrePCB with real "
376 "projects.") %
377 "\n\n" %
378 tr("Once you don't need them anymore, just delete the examples "
379 "directory to get rid of them.");
380 const int ret =
381 QMessageBox::information(parent, tr("Add Example Projects"), msg,
382 QMessageBox::Ok | QMessageBox::Cancel);
383 if (ret == QMessageBox::Ok) {
384 InitializeWorkspaceWizardContext ctx(*mTheme, parent);
385 ctx.setWorkspacePath(mWorkspace.getPath());
386 ctx.installExampleProjects();
387 }
388}
389
390/*******************************************************************************
391 * Libraries

Callers 1

triggerMethod · 0.80

Calls 3

getPathMethod · 0.80
setWorkspacePathMethod · 0.45

Tested by

no test coverage detected