diff widgets/CSVFormatDialog.h @ 560:e15afed2bfeb

* 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 5bcfc5606528
children aced8ec09bc8
line wrap: on
line diff
--- a/widgets/CSVFormatDialog.h	Thu Jul 08 14:22:28 2010 +0000
+++ b/widgets/CSVFormatDialog.h	Fri Jul 16 16:51:39 2010 +0000
@@ -29,8 +29,7 @@
     Q_OBJECT
     
 public:
-    CSVFormatDialog(QWidget *parent, CSVFormat initialFormat,
-                    size_t defaultSampleRate);
+    CSVFormatDialog(QWidget *parent, CSVFormat initialFormat);
     ~CSVFormatDialog();
 
     CSVFormat getFormat() const;
@@ -38,36 +37,21 @@
 protected slots:
     void modelTypeChanged(int type);
     void timingTypeChanged(int type);
-    void durationTypeChanged(int type);
     void sampleRateChanged(QString);
     void windowSizeChanged(QString);
+    void columnPurposeChanged(int purpose);
 
 protected:
-    CSVFormat::ModelType  m_modelType;
-    CSVFormat::TimingType m_timingType;
-    CSVFormat::DurationType m_durationType;
-    CSVFormat::TimeUnits  m_timeUnits;
-
-    QString    m_separator;
-    size_t     m_sampleRate;
-    size_t     m_windowSize;
-
-    QString::SplitBehavior m_behaviour;
-    
-    QList<QStringList> m_example;
-    int m_maxExampleCols;
-    QTableWidget *m_exampleWidget;
+    CSVFormat m_format;
     
     QComboBox *m_modelTypeCombo;
     QComboBox *m_timingTypeCombo;
-    QLabel *m_durationTypeLabel;
-    QComboBox *m_durationTypeCombo;
     QLabel *m_sampleRateLabel;
     QComboBox *m_sampleRateCombo;
     QLabel *m_windowSizeLabel;
     QComboBox *m_windowSizeCombo;
 
-    void populateExample();
+    QList<QComboBox *> m_columnPurposeCombos;
 };
 
 #endif