Mercurial > hg > svgui
comparison widgets/CSVAudioFormatDialog.cpp @ 1322:f33ee2702447 import-audio-data
Propose to take only value-like columns as audio samples, not all numeric ones - now that it's easy enough for the user to overrule
author | Chris Cannam |
---|---|
date | Wed, 12 Sep 2018 15:17:38 +0100 (2018-09-12) |
parents | 4616e1e89189 |
children |
comparison
equal
deleted
inserted
replaced
1321:4616e1e89189 | 1322:f33ee2702447 |
---|---|
80 m_fuzzyColumn = i; | 80 m_fuzzyColumn = i; |
81 | 81 |
82 cpc->addItem(tr("<ignore>")); | 82 cpc->addItem(tr("<ignore>")); |
83 cpc->addItem(tr("Audio channels")); | 83 cpc->addItem(tr("Audio channels")); |
84 cpc->setCurrentIndex | 84 cpc->setCurrentIndex |
85 (m_format.isColumnNumeric(i-1) ? 1 : 0); | 85 (m_format.getColumnPurpose(i-1) == CSVFormat::ColumnValue ? |
86 1 : 0); | |
86 | 87 |
87 exampleLayout->addWidget | 88 exampleLayout->addWidget |
88 (new QLabel(tr("(%1 more)").arg(columns - i)), 1, i); | 89 (new QLabel(tr("(%1 more)").arg(columns - i)), 1, i); |
89 break; | 90 break; |
90 } | 91 } |
91 | 92 |
92 cpc->addItem(tr("<ignore>")); | 93 cpc->addItem(tr("<ignore>")); |
93 cpc->addItem(tr("Audio channel")); | 94 cpc->addItem(tr("Audio channel")); |
94 if (m_format.isColumnNumeric(i)) { | 95 cpc->setCurrentIndex |
95 cpc->setCurrentIndex(1); | 96 (m_format.getColumnPurpose(i) == CSVFormat::ColumnValue ? 1 : 0); |
96 } else { | |
97 cpc->setCurrentIndex(0); | |
98 } | |
99 | 97 |
100 for (int j = 0; j < example.size() && j < 6; ++j) { | 98 for (int j = 0; j < example.size() && j < 6; ++j) { |
101 if (i >= example[j].size()) { | 99 if (i >= example[j].size()) { |
102 continue; | 100 continue; |
103 } | 101 } |