comparison widgets/CSVFormatDialog.cpp @ 546:24d1d1528717

* Add start frame get/set to EditableDenseThreeDimensionalModel and use it when importing grids from CSV with timings attached
author Chris Cannam
date Fri, 11 Sep 2009 15:42:32 +0000
parents ed65126e503d
children 5bcfc5606528
comparison
equal deleted inserted replaced
545:be5c35d3f409 546:24d1d1528717
190 void 190 void
191 CSVFormatDialog::modelTypeChanged(int type) 191 CSVFormatDialog::modelTypeChanged(int type)
192 { 192 {
193 m_modelType = (CSVFormat::ModelType)type; 193 m_modelType = (CSVFormat::ModelType)type;
194 194
195 if (m_modelType == CSVFormat::ThreeDimensionalModel) { 195 // if (m_modelType == CSVFormat::ThreeDimensionalModel) {
196 // We can't load 3d models with explicit timing, because the 3d 196 // We can't load 3d models with explicit timing, because the 3d
197 // model is dense so we need a fixed sample increment 197 // model is dense so we need a fixed sample increment
198 m_timingTypeCombo->setCurrentIndex(2); 198 // m_timingTypeCombo->setCurrentIndex(2);
199 timingTypeChanged(2); 199 // timingTypeChanged(2);
200 } 200 // }
201 } 201 }
202 202
203 void 203 void
204 CSVFormatDialog::timingTypeChanged(int type) 204 CSVFormatDialog::timingTypeChanged(int type)
205 { 205 {
210 m_timeUnits = CSVFormat::TimeSeconds; 210 m_timeUnits = CSVFormat::TimeSeconds;
211 m_sampleRateCombo->setEnabled(false); 211 m_sampleRateCombo->setEnabled(false);
212 m_sampleRateLabel->setEnabled(false); 212 m_sampleRateLabel->setEnabled(false);
213 m_windowSizeCombo->setEnabled(false); 213 m_windowSizeCombo->setEnabled(false);
214 m_windowSizeLabel->setEnabled(false); 214 m_windowSizeLabel->setEnabled(false);
215 if (m_modelType == CSVFormat::ThreeDimensionalModel) { 215 // if (m_modelType == CSVFormat::ThreeDimensionalModel) {
216 m_modelTypeCombo->setCurrentIndex(1); 216 // m_modelTypeCombo->setCurrentIndex(1);
217 modelTypeChanged(1); 217 // modelTypeChanged(1);
218 } 218 // }
219 break; 219 break;
220 220
221 case 1: 221 case 1:
222 m_timingType = CSVFormat::ExplicitTiming; 222 m_timingType = CSVFormat::ExplicitTiming;
223 m_timeUnits = CSVFormat::TimeAudioFrames; 223 m_timeUnits = CSVFormat::TimeAudioFrames;
224 m_sampleRateCombo->setEnabled(true); 224 m_sampleRateCombo->setEnabled(true);
225 m_sampleRateLabel->setEnabled(true); 225 m_sampleRateLabel->setEnabled(true);
226 m_windowSizeCombo->setEnabled(false); 226 m_windowSizeCombo->setEnabled(false);
227 m_windowSizeLabel->setEnabled(false); 227 m_windowSizeLabel->setEnabled(false);
228 if (m_modelType == CSVFormat::ThreeDimensionalModel) { 228 // if (m_modelType == CSVFormat::ThreeDimensionalModel) {
229 m_modelTypeCombo->setCurrentIndex(1); 229 // m_modelTypeCombo->setCurrentIndex(1);
230 modelTypeChanged(1); 230 // modelTypeChanged(1);
231 } 231 // }
232 break; 232 break;
233 233
234 case 2: 234 case 2:
235 m_timingType = CSVFormat::ImplicitTiming; 235 m_timingType = CSVFormat::ImplicitTiming;
236 m_timeUnits = CSVFormat::TimeWindows; 236 m_timeUnits = CSVFormat::TimeWindows;