comparison widgets/CSVFormatDialog.h @ 959:2633a1d73e39

Address #1214, layer import produces wrong layer type. We needed a more principled approach to making sure the format gets updated properly and the dialog elements are consistent (basically separating making the dialog elements consistent from subsequently updating the format). This change should provide that, though there may be gotchas still.
author Chris Cannam
date Tue, 12 May 2015 12:31:37 +0100
parents c9d6cf9c51c8
children fcc1f45f7bd5
comparison
equal deleted inserted replaced
947:e53a87a5efb2 959:2633a1d73e39
38 protected slots: 38 protected slots:
39 void timingTypeChanged(int type); 39 void timingTypeChanged(int type);
40 void sampleRateChanged(QString); 40 void sampleRateChanged(QString);
41 void windowSizeChanged(QString); 41 void windowSizeChanged(QString);
42 void columnPurposeChanged(int purpose); 42 void columnPurposeChanged(int purpose);
43
44 void updateFormatFromDialog();
43 void updateModelLabel(); 45 void updateModelLabel();
44 46
45 protected: 47 protected:
46 CSVFormat m_format; 48 CSVFormat m_format;
47 int m_maxDisplayCols; 49 int m_maxDisplayCols;
50
51 enum TimingOption {
52 TimingExplicitSeconds = 0,
53 TimingExplicitMsec,
54 TimingExplicitSamples,
55 TimingImplicit
56 };
57 std::map<TimingOption, QString> m_timingLabels;
58 TimingOption m_initialTimingOption;
59
60 void updateComboVisibility();
61 void applyStartTimePurpose();
62 void removeStartTimePurpose();
48 63
49 QComboBox *m_timingTypeCombo; 64 QComboBox *m_timingTypeCombo;
50 QLabel *m_sampleRateLabel; 65 QLabel *m_sampleRateLabel;
51 QComboBox *m_sampleRateCombo; 66 QComboBox *m_sampleRateCombo;
52 QLabel *m_windowSizeLabel; 67 QLabel *m_windowSizeLabel;