1 |
// qsamplerInstrumentListForm.h |
2 |
// |
3 |
/**************************************************************************** |
4 |
Copyright (C) 2003-2009, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
Copyright (C) 2007, Christian Schoenebeck |
6 |
|
7 |
This program is free software; you can redistribute it and/or |
8 |
modify it under the terms of the GNU General Public License |
9 |
as published by the Free Software Foundation; either version 2 |
10 |
of the License, or (at your option) any later version. |
11 |
|
12 |
This program is distributed in the hope that it will be useful, |
13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
GNU General Public License for more details. |
16 |
|
17 |
You should have received a copy of the GNU General Public License |
18 |
along with this program; if not, write to the Free Software |
19 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
20 |
|
21 |
*****************************************************************************/ |
22 |
|
23 |
#ifndef __qsamplerInstrumentListForm_h |
24 |
#define __qsamplerInstrumentListForm_h |
25 |
|
26 |
#include "ui_qsamplerInstrumentListForm.h" |
27 |
|
28 |
#include "qsamplerInstrumentList.h" |
29 |
|
30 |
class QComboBox; |
31 |
|
32 |
|
33 |
namespace QSampler { |
34 |
|
35 |
//------------------------------------------------------------------------- |
36 |
// QSampler::InstrumentListForm -- Instrument map list form interface. |
37 |
// |
38 |
|
39 |
class InstrumentListForm : public QMainWindow |
40 |
{ |
41 |
Q_OBJECT |
42 |
|
43 |
public: |
44 |
|
45 |
InstrumentListForm(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); |
46 |
~InstrumentListForm(); |
47 |
|
48 |
public slots: |
49 |
|
50 |
void editInstrument(); |
51 |
void editInstrument(const QModelIndex& index); |
52 |
void newInstrument(); |
53 |
void deleteInstrument(); |
54 |
void refreshInstruments(); |
55 |
void activateMap(int); |
56 |
|
57 |
void stabilizeForm(); |
58 |
|
59 |
// Handle custom context menu here... |
60 |
void contextMenu(const QPoint& pos); |
61 |
|
62 |
protected: |
63 |
|
64 |
void showEvent(QShowEvent *); |
65 |
void hideEvent(QHideEvent *); |
66 |
void closeEvent(QCloseEvent *); |
67 |
|
68 |
private: |
69 |
|
70 |
Ui::qsamplerInstrumentListForm m_ui; |
71 |
|
72 |
MidiInstrumentsModel m_model; |
73 |
MidiInstrumentsDelegate m_delegate; |
74 |
|
75 |
QComboBox* m_pMapComboBox; |
76 |
}; |
77 |
|
78 |
} // namespace QSampler |
79 |
|
80 |
#endif // __qsamplerInstrumentListForm_h |
81 |
|
82 |
|
83 |
// end of qsamplerInstrumentListForm.h |