comparison 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
comparison
equal deleted inserted replaced
559:5bcfc5606528 560:e15afed2bfeb
27 class CSVFormatDialog : public QDialog 27 class CSVFormatDialog : public QDialog
28 { 28 {
29 Q_OBJECT 29 Q_OBJECT
30 30
31 public: 31 public:
32 CSVFormatDialog(QWidget *parent, CSVFormat initialFormat, 32 CSVFormatDialog(QWidget *parent, CSVFormat initialFormat);
33 size_t defaultSampleRate);
34 ~CSVFormatDialog(); 33 ~CSVFormatDialog();
35 34
36 CSVFormat getFormat() const; 35 CSVFormat getFormat() const;
37 36
38 protected slots: 37 protected slots:
39 void modelTypeChanged(int type); 38 void modelTypeChanged(int type);
40 void timingTypeChanged(int type); 39 void timingTypeChanged(int type);
41 void durationTypeChanged(int type);
42 void sampleRateChanged(QString); 40 void sampleRateChanged(QString);
43 void windowSizeChanged(QString); 41 void windowSizeChanged(QString);
42 void columnPurposeChanged(int purpose);
44 43
45 protected: 44 protected:
46 CSVFormat::ModelType m_modelType; 45 CSVFormat m_format;
47 CSVFormat::TimingType m_timingType;
48 CSVFormat::DurationType m_durationType;
49 CSVFormat::TimeUnits m_timeUnits;
50
51 QString m_separator;
52 size_t m_sampleRate;
53 size_t m_windowSize;
54
55 QString::SplitBehavior m_behaviour;
56
57 QList<QStringList> m_example;
58 int m_maxExampleCols;
59 QTableWidget *m_exampleWidget;
60 46
61 QComboBox *m_modelTypeCombo; 47 QComboBox *m_modelTypeCombo;
62 QComboBox *m_timingTypeCombo; 48 QComboBox *m_timingTypeCombo;
63 QLabel *m_durationTypeLabel;
64 QComboBox *m_durationTypeCombo;
65 QLabel *m_sampleRateLabel; 49 QLabel *m_sampleRateLabel;
66 QComboBox *m_sampleRateCombo; 50 QComboBox *m_sampleRateCombo;
67 QLabel *m_windowSizeLabel; 51 QLabel *m_windowSizeLabel;
68 QComboBox *m_windowSizeCombo; 52 QComboBox *m_windowSizeCombo;
69 53
70 void populateExample(); 54 QList<QComboBox *> m_columnPurposeCombos;
71 }; 55 };
72 56
73 #endif 57 #endif