MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / launchFirstRunSetup

Method launchFirstRunSetup

src/MainWindow.cpp:1341–1377  ·  view source on GitHub ↗

Setup wizard

Source from the content-addressed store, hash-verified

1339
1340// Setup wizard
1341void MainWindow::launchFirstRunSetup()
1342{
1343 QHBoxLayout *lbLayout = new QHBoxLayout;
1344 QMessageOverlay *lightBox = new QMessageOverlay(this);
1345 FirstLaunchWizard *wiz = new FirstLaunchWizard(_autostart, lightBox);
1346 QGraphicsOpacityEffect *eff = new QGraphicsOpacityEffect(lightBox);
1347 QPropertyAnimation *a = new QPropertyAnimation(eff, "opacity");
1348
1349 lightBox->setGraphicsEffect(eff);
1350 lightBox->setLayout(lbLayout);
1351 lightBox->layout()->addWidget(wiz);
1352 lightBox->show();
1353
1354 a->setDuration(500);
1355 a->setStartValue(0);
1356 a->setEndValue(1);
1357 a->setEasingCurve(QEasingCurve::InBack);
1358 a->start(QPropertyAnimation::DeleteWhenStopped);
1359
1360 connect(wiz, &FirstLaunchWizard::wizardFinished, [lightBox, eff, this]
1361 {
1362 QPropertyAnimation *b = new QPropertyAnimation(eff, "opacity");
1363 b->setDuration(500);
1364 b->setStartValue(1);
1365 b->setEndValue(0);
1366 b->setEasingCurve(QEasingCurve::OutCirc);
1367 b->start(QPropertyAnimation::DeleteWhenStopped);
1368
1369 connect(b, &QAbstractAnimation::finished, [lightBox, this]()
1370 {
1371 AppConfig::instance().set(AppConfig::SetupDone, true);
1372 lightBox->hide();
1373 _settingsFragment->fragment()->refreshAll();
1374 lightBox->deleteLater();
1375 });
1376 });
1377}
1378

Callers

nothing calls this directly

Calls 8

connectFunction · 0.85
setDurationMethod · 0.80
setEasingCurveMethod · 0.80
startMethod · 0.80
hideMethod · 0.80
refreshAllMethod · 0.80
setMethod · 0.45
fragmentMethod · 0.45

Tested by

no test coverage detected