1 /*-
2  * Copyright (c) 2017-2019 Hans Petter Selasky. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23  * SUCH DAMAGE.
24  */
25 
26 #ifndef _MIDIPP_INSTRUMENT_H_
27 #define	_MIDIPP_INSTRUMENT_H_
28 
29 #include "midipp.h"
30 
31 class MppInstrumentTab : public QObject
32 {
33 	Q_OBJECT;
34 
35 public:
36 	MppInstrumentTab(MppMainWindow * = 0);
37 	~MppInstrumentTab();
38 
39 	MppMainWindow *mw;
40 
41 	MppGridLayout *gl;
42 
43 	MppGroupBox *gb_instr_select;
44 	MppGroupBox *gb_instr_table;
45 
46 	MppDevSel *spn_instr_curr_dev;
47 	MppChanSel *spn_instr_curr_chan;
48 	QSpinBox *spn_instr_curr_bank;
49 	QSpinBox *spn_instr_curr_prog;
50 	QSpinBox *spn_instr_bank[16];
51 	QSpinBox *spn_instr_prog[16];
52 
53 	MppCheckBox *cbx_instr_mute[16];
54 
55 	QPushButton *but_instr_rem;
56 	QPushButton *but_instr_program;
57 	QPushButton *but_instr_program_all;
58 	QPushButton *but_instr_reset;
59 	QPushButton *but_instr_mute_all;
60 	QPushButton *but_instr_unmute_all;
61 
62 public slots:
63 	void handle_instr_changed(int);
64 	void handle_instr_reset();
65 	void handle_instr_program();
66 	void handle_instr_program_all();
67 	void handle_instr_channel_changed(int);
68 	void handle_instr_rem();
69 	void handle_instr_mute_all();
70 	void handle_instr_unmute_all();
71 };
72 
73 #endif		/* _MIDIPP_INSTRUMENT_H_ */
74