]> code.delx.au - virtualtones/blob - mainwin.h
README update
[virtualtones] / mainwin.h
1 // mainwin.h - Displays the MIDI keyboard and instrument selector
2 // Written by James Bunton <james@delx.net.au>
3 // Licensed under the GPL, see COPYING.txt for more details
4
5
6
7 #ifndef MAINWIN_H
8 #define MAINWIN_H
9
10 #include <QApplication>
11 #include <QMessageBox>
12 #include <QComboBox>
13 #include <QLabel>
14 #include <QPushButton>
15 #include <QLayout>
16 #include <QFileDialog>
17
18 #include <cstdlib>
19
20 #include "instrument.h"
21 #include "stringinstrument.h"
22 #include "pianoinstrument.h"
23 #include "midiengine.h"
24
25
26
27
28 class MainWin : public QWidget
29 {
30 Q_OBJECT
31
32 public:
33 MainWin();
34 ~MainWin();
35
36 public slots:
37 void interfaceSelectionSlot(int);
38 void setupRecord();
39 void finishRecord();
40
41 private:
42 // Functions
43 void instrumentLayouts();
44 void fillSounds();
45
46 // Widgets
47 Instrument *instrument;
48 QComboBox *soundSelection;
49 QComboBox *interfaceSelection;
50 QComboBox *octaveSelection;
51 QLabel *soundSelectionLabel;
52 QLabel *interfaceSelectionLabel;
53 QLabel *octaveSelectionLabel;
54 QLabel *aboutLabel;
55 QPushButton *helpBtn;
56 QPushButton *quitBtn;
57 QPushButton *recordBtn;
58 QPushButton *stopBtn;
59
60 // Layouts
61 QVBoxLayout *soundSelectionLayout;
62 QVBoxLayout *interfaceSelectionLayout;
63 QVBoxLayout *octaveSelectionLayout;
64 QVBoxLayout *midiBtnLayout;
65 QVBoxLayout *buttonsLayout;
66 QHBoxLayout *optionsLayout;
67 QVBoxLayout *vLayout;
68
69 MidiReal *midi;
70 MidiFile *midiFile;
71 };
72
73
74
75 #endif