MCPcopy Create free account
hub / github.com/Theverat/NormalmapGenerator / saveUserFilePath

Method saveUserFilePath

src_gui/mainwindow.cpp:561–574  ·  view source on GitHub ↗

save maps using the file dialog

Source from the content-addressed store, hash-verified

559
560//save maps using the file dialog
561void MainWindow::saveUserFilePath() {
562 if(input.isNull())
563 return;
564
565 QFileDialog::Options options(QFileDialog::DontConfirmOverwrite);
566 QUrl url = QFileDialog::getSaveFileUrl(this, "Save as", loadedImagePath,
567 "Image Formats (*.png *.jpg *.jpeg *.tiff *.ppm *.bmp *.xpm)",
568 0, options);
569
570 if(!url.isValid() || url.toLocalFile().isEmpty())
571 return;
572
573 save(url);
574}
575
576void MainWindow::save(QUrl url) {
577 //if saving process was aborted or input image is empty

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected