--- qsampler/trunk/src/qsamplerInstrumentListForm.h 2007/11/01 19:25:10 1466 +++ qsampler/trunk/src/qsamplerInstrumentListForm.h 2010/03/13 20:14:38 2067 @@ -1,7 +1,7 @@ // qsamplerInstrumentListForm.h // /**************************************************************************** - Copyright (C) 2003-2007, rncbc aka Rui Nuno Capela. All rights reserved. + Copyright (C) 2003-2010, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, Christian Schoenebeck This program is free software; you can redistribute it and/or @@ -25,32 +25,51 @@ #include "ui_qsamplerInstrumentListForm.h" -#include "qsamplerInstrumentList.h" - -#include +class QComboBox; namespace QSampler { -class InstrumentListForm : public QMainWindow { -Q_OBJECT +class InstrumentListView; + +//------------------------------------------------------------------------- +// QSampler::InstrumentListForm -- Instrument map list form interface. +// + +class InstrumentListForm : public QMainWindow +{ + Q_OBJECT + public: - MidiInstrumentsModel model; - InstrumentListForm(QWidget* parent = 0, Qt::WindowFlags flags = 0); - ~InstrumentListForm(); + InstrumentListForm(QWidget *pParent = NULL, Qt::WindowFlags wflags = 0); + ~InstrumentListForm(); public slots: - void refreshInstruments(); - void activateMap(int); + + void newInstrument(); + void editInstrument(); + void editInstrument(const QModelIndex& index); + void deleteInstrument(); + void refreshInstruments(); + void activateMap(int); + + void stabilizeForm(); protected: - QComboBox* m_pMapComboBox; - void showEvent(QShowEvent* pShowEvent); - void hideEvent(QHideEvent* pHideEvent); + void showEvent(QShowEvent *); + void hideEvent(QHideEvent *); + void closeEvent(QCloseEvent *); + + void contextMenuEvent(QContextMenuEvent *); private: - Ui::qsamplerInstrumentListForm ui; + + Ui::qsamplerInstrumentListForm m_ui; + + QComboBox *m_pMapComboBox; + + InstrumentListView *m_pInstrumentListView; }; } // namespace QSampler