comparison data/fileio/CSVFormat.h @ 1516:ad46f6e80369 import-audio-data

Accessors + overlooked initialiser
author Chris Cannam
date Fri, 07 Sep 2018 18:12:20 +0100
parents ffec849858a7
children 2d291eac9f21
comparison
equal deleted inserted replaced
1515:ffec849858a7 1516:ad46f6e80369
80 m_separator(","), 80 m_separator(","),
81 m_sampleRate(44100), 81 m_sampleRate(44100),
82 m_windowSize(1024), 82 m_windowSize(1024),
83 m_columnCount(0), 83 m_columnCount(0),
84 m_variableColumnCount(false), 84 m_variableColumnCount(false),
85 m_audioSampleRange(SampleRangeOther),
85 m_allowQuoting(true), 86 m_allowQuoting(true),
86 m_maxExampleCols(0) 87 m_maxExampleCols(0)
87 { } 88 { }
88 89
89 CSVFormat(QString path); // guess format 90 CSVFormat(QString path); // guess format
101 TimingType getTimingType() const { return m_timingType; } 102 TimingType getTimingType() const { return m_timingType; }
102 TimeUnits getTimeUnits() const { return m_timeUnits; } 103 TimeUnits getTimeUnits() const { return m_timeUnits; }
103 sv_samplerate_t getSampleRate() const { return m_sampleRate; } 104 sv_samplerate_t getSampleRate() const { return m_sampleRate; }
104 int getWindowSize() const { return m_windowSize; } 105 int getWindowSize() const { return m_windowSize; }
105 int getColumnCount() const { return m_columnCount; } 106 int getColumnCount() const { return m_columnCount; }
107 AudioSampleRange getAudioSampleRange() const { return m_audioSampleRange; }
106 bool getAllowQuoting() const { return m_allowQuoting; } 108 bool getAllowQuoting() const { return m_allowQuoting; }
107 QChar getSeparator() const { 109 QChar getSeparator() const {
108 if (m_separator == "") return ' '; 110 if (m_separator == "") return ' ';
109 else return m_separator[0]; 111 else return m_separator[0];
110 } 112 }
114 void setTimeUnits(TimeUnits t) { m_timeUnits = t; } 116 void setTimeUnits(TimeUnits t) { m_timeUnits = t; }
115 void setSeparator(QChar s) { m_separator = s; } 117 void setSeparator(QChar s) { m_separator = s; }
116 void setSampleRate(sv_samplerate_t r) { m_sampleRate = r; } 118 void setSampleRate(sv_samplerate_t r) { m_sampleRate = r; }
117 void setWindowSize(int s) { m_windowSize = s; } 119 void setWindowSize(int s) { m_windowSize = s; }
118 void setColumnCount(int c) { m_columnCount = c; } 120 void setColumnCount(int c) { m_columnCount = c; }
121 void setAudioSampleRange(AudioSampleRange r) { m_audioSampleRange = r; }
119 void setAllowQuoting(bool q) { m_allowQuoting = q; } 122 void setAllowQuoting(bool q) { m_allowQuoting = q; }
120 123
121 QList<ColumnPurpose> getColumnPurposes() const { return m_columnPurposes; } 124 QList<ColumnPurpose> getColumnPurposes() const { return m_columnPurposes; }
122 void setColumnPurposes(QList<ColumnPurpose> cl) { m_columnPurposes = cl; } 125 void setColumnPurposes(QList<ColumnPurpose> cl) { m_columnPurposes = cl; }
123 126