Chris@378
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@378
|
2
|
Chris@378
|
3 /*
|
Chris@378
|
4 Sonic Visualiser
|
Chris@378
|
5 An audio file viewer and annotation editor.
|
Chris@378
|
6 Centre for Digital Music, Queen Mary, University of London.
|
Chris@1319
|
7 This file copyright 2006-2018 Chris Cannam and QMUL.
|
Chris@378
|
8
|
Chris@378
|
9 This program is free software; you can redistribute it and/or
|
Chris@378
|
10 modify it under the terms of the GNU General Public License as
|
Chris@378
|
11 published by the Free Software Foundation; either version 2 of the
|
Chris@378
|
12 License, or (at your option) any later version. See the file
|
Chris@378
|
13 COPYING included with this distribution for more information.
|
Chris@378
|
14 */
|
Chris@378
|
15
|
Chris@1319
|
16 #ifndef SV_CSV_AUDIO_FORMAT_DIALOG_H
|
Chris@1319
|
17 #define SV_CSV_AUDIO_FORMAT_DIALOG_H
|
Chris@378
|
18
|
Chris@378
|
19 #include "data/fileio/CSVFormat.h"
|
Chris@378
|
20
|
Chris@378
|
21 class QTableWidget;
|
Chris@378
|
22 class QComboBox;
|
Chris@378
|
23 class QLabel;
|
Chris@378
|
24
|
Chris@378
|
25 #include <QDialog>
|
Chris@378
|
26
|
Chris@1319
|
27 class CSVAudioFormatDialog : public QDialog
|
Chris@378
|
28 {
|
Chris@378
|
29 Q_OBJECT
|
Chris@378
|
30
|
Chris@378
|
31 public:
|
Chris@1319
|
32 CSVAudioFormatDialog(QWidget *parent,
|
Chris@1319
|
33 CSVFormat initialFormat,
|
Chris@1319
|
34 int maxDisplayCols = 5);
|
Chris@1319
|
35 ~CSVAudioFormatDialog();
|
Chris@378
|
36
|
Chris@1320
|
37 enum CSVSampleRange {
|
Chris@1320
|
38 RangeSigned1 = 0, // -1 .. 1
|
Chris@1320
|
39 RangeUnsigned255, // 0 .. 255
|
Chris@1320
|
40 RangeSigned32767, // -32768 .. 32767
|
Chris@1320
|
41 RangeOther // Other/unknown: Normalise on load
|
Chris@1320
|
42 };
|
Chris@1320
|
43
|
Chris@378
|
44 CSVFormat getFormat() const;
|
Chris@1320
|
45 CSVSampleRange getSampleRange() const;
|
Chris@378
|
46
|
Chris@378
|
47 protected slots:
|
Chris@378
|
48 void sampleRateChanged(QString);
|
Chris@1320
|
49 void sampleRangeChanged(int);
|
Chris@560
|
50 void columnPurposeChanged(int purpose);
|
Chris@959
|
51
|
Chris@959
|
52 void updateFormatFromDialog();
|
Chris@378
|
53
|
Chris@378
|
54 protected:
|
Chris@560
|
55 CSVFormat m_format;
|
Chris@1320
|
56 CSVSampleRange m_sampleRange;
|
Chris@581
|
57 int m_maxDisplayCols;
|
Chris@1318
|
58
|
Chris@378
|
59 QComboBox *m_sampleRateCombo;
|
Chris@1320
|
60 QComboBox *m_sampleRangeCombo;
|
Chris@378
|
61
|
Chris@560
|
62 QList<QComboBox *> m_columnPurposeCombos;
|
Chris@581
|
63 int m_fuzzyColumn;
|
Chris@378
|
64 };
|
Chris@378
|
65
|
Chris@378
|
66 #endif
|