32 |
|
|
33 |
namespace QSampler { |
namespace QSampler { |
34 |
|
|
35 |
|
//------------------------------------------------------------------------- |
36 |
|
// QSampler::InstrumentListForm -- Instrument map list form interface. |
37 |
|
// |
38 |
|
|
39 |
class InstrumentListForm : public QMainWindow |
class InstrumentListForm : public QMainWindow |
40 |
{ |
{ |
41 |
Q_OBJECT |
Q_OBJECT |
42 |
|
|
43 |
public: |
public: |
|
MidiInstrumentsModel model; |
|
|
MidiInstrumentsDelegate delegate; |
|
44 |
|
|
45 |
InstrumentListForm(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); |
InstrumentListForm(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); |
46 |
~InstrumentListForm(); |
~InstrumentListForm(); |
47 |
|
|
48 |
public slots: |
public slots: |
49 |
void refreshInstruments(); |
|
50 |
void activateMap(int); |
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: |
protected: |
63 |
void showEvent(QShowEvent *); |
|
64 |
void hideEvent(QHideEvent *); |
void showEvent(QShowEvent *); |
65 |
void closeEvent(QCloseEvent *); |
void hideEvent(QHideEvent *); |
66 |
|
void closeEvent(QCloseEvent *); |
|
protected slots: |
|
|
void editInstrument(); |
|
|
void editInstrument(const QModelIndex& index); |
|
|
void newInstrument(); |
|
|
void deleteInstrument(); |
|
67 |
|
|
68 |
private: |
private: |
|
Ui::qsamplerInstrumentListForm ui; |
|
69 |
|
|
70 |
QComboBox* m_pMapComboBox; |
Ui::qsamplerInstrumentListForm m_ui; |
71 |
|
|
72 |
|
MidiInstrumentsModel m_model; |
73 |
|
MidiInstrumentsDelegate m_delegate; |
74 |
|
|
75 |
|
QComboBox* m_pMapComboBox; |
76 |
}; |
}; |
77 |
|
|
78 |
} // namespace QSampler |
} // namespace QSampler |