221 |
} |
} |
222 |
|
|
223 |
|
|
224 |
void InstrumentListModel::removeInstrument ( const Instrument *pInstrument ) |
void InstrumentListModel::removeInstrument ( Instrument *pInstrument ) |
225 |
{ |
{ |
226 |
const int iMap = pInstrument->map(); |
const int iMap = pInstrument->map(); |
227 |
const int iBank = pInstrument->bank(); |
const int iBank = pInstrument->bank(); |
241 |
} |
} |
242 |
|
|
243 |
|
|
244 |
|
void InstrumentListModel::updateInstrument ( Instrument *pInstrument ) |
245 |
|
{ |
246 |
|
pInstrument->getInstrument(); |
247 |
|
} |
248 |
|
|
249 |
|
|
250 |
// Reposition the instrument in the model (called when map/bank/prg changed) |
// Reposition the instrument in the model (called when map/bank/prg changed) |
251 |
void InstrumentListModel::updateInstrument ( const Instrument *pInstrument ) |
void InstrumentListModel::resortInstrument ( Instrument *pInstrument ) |
252 |
{ |
{ |
253 |
const int iMap = pInstrument->map(); |
const int iMap = pInstrument->map(); |
254 |
const int iBank = pInstrument->bank(); |
const int iBank = pInstrument->bank(); |
391 |
} |
} |
392 |
|
|
393 |
|
|
394 |
void InstrumentListView::removeInstrument ( const Instrument *pInstrument ) |
void InstrumentListView::removeInstrument ( Instrument *pInstrument ) |
395 |
{ |
{ |
396 |
m_pListModel->beginReset(); |
m_pListModel->beginReset(); |
397 |
m_pListModel->removeInstrument(pInstrument); |
m_pListModel->removeInstrument(pInstrument); |
399 |
} |
} |
400 |
|
|
401 |
|
|
402 |
// Reposition the instrument in the model (called when map/bank/prg changed) |
void InstrumentListView::updateInstrument ( Instrument *pInstrument ) |
|
void InstrumentListView::updateInstrument ( const Instrument *pInstrument ) |
|
403 |
{ |
{ |
404 |
m_pListModel->beginReset(); |
m_pListModel->beginReset(); |
405 |
m_pListModel->updateInstrument(pInstrument); |
m_pListModel->updateInstrument(pInstrument); |
406 |
m_pListModel->endReset(); |
m_pListModel->endReset(); |
407 |
} |
} |
408 |
|
|
409 |
|
|
410 |
|
// Reposition the instrument in the model (called when map/bank/prg changed) |
411 |
|
void InstrumentListView::resortInstrument ( Instrument *pInstrument ) |
412 |
|
{ |
413 |
|
m_pListModel->beginReset(); |
414 |
|
m_pListModel->resortInstrument(pInstrument); |
415 |
|
m_pListModel->endReset(); |
416 |
|
} |
417 |
|
|
418 |
|
|
419 |
// Refreshener. |
// Refreshener. |
420 |
void InstrumentListView::refresh (void) |
void InstrumentListView::refresh (void) |