save maps using the file dialog
| 559 | |
| 560 | //save maps using the file dialog |
| 561 | void 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 | |
| 576 | void MainWindow::save(QUrl url) { |
| 577 | //if saving process was aborted or input image is empty |
nothing calls this directly
no outgoing calls
no test coverage detected