MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / onExport

Method onExport

Components/PanoramicDialog.cpp:1093–1123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1091}
1092
1093void
1094PanoramicDialog::onExport(void)
1095{
1096 bool done = false;
1097
1098 do {
1099 QFileDialog dialog(this);
1100
1101 dialog.setFileMode(QFileDialog::FileMode::AnyFile);
1102 dialog.setAcceptMode(QFileDialog::AcceptSave);
1103 dialog.setWindowTitle(QString("Save panoramic spectrum"));
1104 dialog.setNameFilter(QString("MATLAB/Octave file (*.m)"));
1105
1106 if (dialog.exec()) {
1107 QString path = dialog.selectedFiles().first();
1108
1109 if (!this->saved.exportToFile(path)) {
1110 QMessageBox::warning(
1111 this,
1112 "Cannot open file",
1113 "Cannote save file in the specified location. Please choose "
1114 "a different location and try again.",
1115 QMessageBox::Ok);
1116 } else {
1117 done = true;
1118 }
1119 } else {
1120 done = true;
1121 }
1122 } while (!done);
1123}
1124
1125void
1126PanoramicDialog::onBandPlanChanged(int)

Callers

nothing calls this directly

Calls 1

exportToFileMethod · 0.80

Tested by

no test coverage detected