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

Method saveConfigFile

src/main_window.cpp:446–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444}
445
446void MainWindow::saveConfigFile() {
447 QString file = QFileDialog::getSaveFileName(this, tr("Save Config File"), QString(), tr("JSon file (*.json)"));
448 QFile save_file(file);
449 if (!save_file.open(QIODevice::WriteOnly)) {
450 qWarning("Couldn't open save file.");
451 return ;
452 }
453 QJsonObject object;
454 labels.write(object);
455 QJsonDocument saveDoc(object);
456 save_file.write(saveDoc.toJson());
457 save_file.close();
458}
459
460void MainWindow::loadConfigFile() {
461 QString file = QFileDialog::getOpenFileName(this, tr("Open Config File"), QString(), tr("JSon file (*.json)"));

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected