| 370 | } |
| 371 | |
| 372 | void 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 |
no test coverage detected