comparison main/MainWindow.cpp @ 1993:64e8701e77b4 import-audio-data

Remove sample range from dialog class now that it's in CSVFormat
author Chris Cannam
date Fri, 07 Sep 2018 18:13:26 +0100
parents 0cdf87d2f05b
children 2b83ca602ece
comparison
equal deleted inserted replaced
1992:592dceb28ba8 1993:64e8701e77b4
2902 if (format.isColumnNumeric(CSVFormat::ColumnNumeric)) { 2902 if (format.isColumnNumeric(CSVFormat::ColumnNumeric)) {
2903 format.setColumnPurpose(i, CSVFormat::ColumnValue); 2903 format.setColumnPurpose(i, CSVFormat::ColumnValue);
2904 } 2904 }
2905 } 2905 }
2906 2906
2907 CSVAudioFormatDialog::CSVSampleRange range;
2908
2909 { 2907 {
2910 CSVAudioFormatDialog *dialog = new CSVAudioFormatDialog(this, format); 2908 CSVAudioFormatDialog *dialog = new CSVAudioFormatDialog(this, format);
2911 if (dialog->exec() != QDialog::Accepted) { 2909 if (dialog->exec() != QDialog::Accepted) {
2912 delete dialog; 2910 delete dialog;
2913 return; 2911 return;
2914 } 2912 }
2915 format = dialog->getFormat(); 2913 format = dialog->getFormat();
2916 range = dialog->getSampleRange();
2917 delete dialog; 2914 delete dialog;
2918 } 2915 }
2919 2916
2920 FileOpenStatus status = FileOpenSucceeded; 2917 FileOpenStatus status = FileOpenSucceeded;
2921 2918
2922 ProgressDialog *progress = new ProgressDialog 2919 ProgressDialog *progress = new ProgressDialog
2923 (tr("Importing audio data..."), true, 0, this, Qt::ApplicationModal); 2920 (tr("Importing audio data..."), true, 0, this, Qt::ApplicationModal);
2924
2925 //!!! + sample range / scaling
2926 (void)range;
2927 2921
2928 WaveFileModel *model = qobject_cast<WaveFileModel *> 2922 WaveFileModel *model = qobject_cast<WaveFileModel *>
2929 (DataFileReaderFactory::loadCSV 2923 (DataFileReaderFactory::loadCSV
2930 (path, format, 2924 (path, format,
2931 getMainModel() ? getMainModel()->getSampleRate() : rate, 2925 getMainModel() ? getMainModel()->getSampleRate() : rate,