Debian Codegraph @

src/spectrogramcontrols.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2015, Mike Walters <[email protected]>
3 *
4 * This file is part of inspectrum.
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #pragma once
21
22 #include <QDockWidget>
23 #include <QFormLayout>
24 #include <QLineEdit>
25 #include <QPushButton>
26 #include <QSlider>
27 #include <QSpinBox>
28 #include <QCheckBox>
29 #include <QLabel>
30
31 class SpectrogramControls : public QDockWidget
32 {
33 Q_OBJECT
34
35 public:
36 SpectrogramControls(const QString & title, QWidget * parent);
37 void setDefaults();
38
39 signals:
40 void fftOrZoomChanged(int fftSize, int zoomLevel);
41 void openFile(QString fileName);
42
43 public slots:
44 void timeSelectionChanged(float time);
45 void zoomIn();
46 void zoomOut();
47 void enableAnnotations(bool enabled);
48
49 private slots:
50 void fftSizeChanged(int value);
51 void zoomLevelChanged(int value);
52 void powerMinChanged(int value);
53 void powerMaxChanged(int value);
54 void fileOpenButtonClicked();
55 void cursorsStateChanged(int state);
56
57 private:
58 QWidget *widget;
59 QFormLayout *layout;
60 void clearCursorLabels();
61 void fftOrZoomChanged(void);
62
63 public:
64 QPushButton *fileOpenButton;
65 QLineEdit *sampleRate;
66 QSlider *fftSizeSlider;
67 QSlider *zoomLevelSlider;
68 QSlider *powerMaxSlider;
69 QSlider *powerMinSlider;
70 QCheckBox *cursorsCheckBox;
71 QSpinBox *cursorSymbolsSpinBox;
72 QLabel *rateLabel;
73 QLabel *periodLabel;
74 QLabel *symbolRateLabel;
75 QLabel *symbolPeriodLabel;
76 QCheckBox *scalesCheckBox;
77 QCheckBox *annosCheckBox;
78 QCheckBox *commentsCheckBox;
79 };