MCPcopy Create free account
hub / github.com/abreheret/PixelAnnotationTool / loadConfigFile

Method loadConfigFile

src/main_window.cpp:460–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458}
459
460void MainWindow::loadConfigFile() {
461 QString file = QFileDialog::getOpenFileName(this, tr("Open Config File"), QString(), tr("JSon file (*.json)"));
462 QFile open_file(file);
463 if (!open_file.open(QIODevice::ReadOnly)) {
464 qWarning("Couldn't open save file.");
465 return;
466 }
467 QJsonObject object;
468 QByteArray saveData = open_file.readAll();
469 QJsonDocument loadDoc(QJsonDocument::fromJson(saveData));
470
471 labels.clear();
472 labels.read(loadDoc.object());
473 open_file.close();
474
475 loadConfigLabels();
476 update();
477}
478
479void MainWindow::on_actionAbout_triggered() {
480 AboutDialog *d = new AboutDialog(this);

Callers

nothing calls this directly

Calls 1

readMethod · 0.80

Tested by

no test coverage detected