comparison data/fileio/CSVFormat.h @ 630:11a664058dd8

* Start revamping the CSV import dialog so as to show a "purpose" for each column. These are estimated from the file now, but changing them does not actually do anything yet.
author Chris Cannam
date Fri, 16 Jul 2010 16:51:39 +0000
parents 35499d48a5d1
children 3a5ee4b6c9ad
comparison
equal deleted inserted replaced
629:35499d48a5d1 630:11a664058dd8
93 DurationType getDurationType() const { return m_durationType; } 93 DurationType getDurationType() const { return m_durationType; }
94 TimeUnits getTimeUnits() const { return m_timeUnits; } 94 TimeUnits getTimeUnits() const { return m_timeUnits; }
95 QString getSeparator() const { return m_separator; } 95 QString getSeparator() const { return m_separator; }
96 size_t getSampleRate() const { return m_sampleRate; } 96 size_t getSampleRate() const { return m_sampleRate; }
97 size_t getWindowSize() const { return m_windowSize; } 97 size_t getWindowSize() const { return m_windowSize; }
98 int getColumnCount() const { return m_columnCount; }
98 99
99 QString::SplitBehavior getSplitBehaviour() const { return m_behaviour; } 100 QString::SplitBehavior getSplitBehaviour() const { return m_behaviour; }
100 QList<ColumnPurpose> getColumnPurposes() const { return m_columnPurposes; } 101 QList<ColumnPurpose> getColumnPurposes() const { return m_columnPurposes; }
102
103 ColumnPurpose getColumnPurpose(int i) { return m_columnPurposes[i]; }
101 104
102 void setModelType(ModelType t) { m_modelType = t; } 105 void setModelType(ModelType t) { m_modelType = t; }
103 void setTimingType(TimingType t) { m_timingType = t; } 106 void setTimingType(TimingType t) { m_timingType = t; }
104 void setDurationType(DurationType t) { m_durationType = t; } 107 void setDurationType(DurationType t) { m_durationType = t; }
105 void setTimeUnits(TimeUnits t) { m_timeUnits = t; } 108 void setTimeUnits(TimeUnits t) { m_timeUnits = t; }
106 void setSeparator(QString s) { m_separator = s; } 109 void setSeparator(QString s) { m_separator = s; }
107 void setSampleRate(size_t r) { m_sampleRate = r; } 110 void setSampleRate(size_t r) { m_sampleRate = r; }
108 void setWindowSize(size_t s) { m_windowSize = s; } 111 void setWindowSize(size_t s) { m_windowSize = s; }
112 void setColumnCount(int c) { m_columnCount = c; }
109 113
110 void setSplitBehaviour(QString::SplitBehavior b) { m_behaviour = b; } 114 void setSplitBehaviour(QString::SplitBehavior b) { m_behaviour = b; }
111 void setColumnPurposes(QList<ColumnPurpose> cl) { m_columnPurposes = cl; } 115 void setColumnPurposes(QList<ColumnPurpose> cl) { m_columnPurposes = cl; }
112 116
117 void setColumnPurpose(int i, ColumnPurpose p) { m_columnPurposes[i] = p; }
118
113 // read-only; only valid if format has been guessed: 119 // read-only; only valid if format has been guessed:
114 QList<ColumnQualities> getColumnQualities() const { return m_columnQualities; } 120 QList<ColumnQualities> getColumnQualities() const { return m_columnQualities; }
115 121
116 // read-only; only valid if format has been guessed: 122 // read-only; only valid if format has been guessed:
117 QList<QStringList> getExample() const { return m_example; } 123 QList<QStringList> getExample() const { return m_example; }