1 |
// qsamplerInstrumentListForm.cpp |
// qsamplerInstrumentListForm.cpp |
2 |
// |
// |
3 |
/**************************************************************************** |
/**************************************************************************** |
4 |
Copyright (C) 2003-2015, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2003-2019, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
Copyright (C) 2007, Christian Schoenebeck |
Copyright (C) 2007, Christian Schoenebeck |
6 |
|
|
7 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
143 |
void InstrumentListForm::refreshInstruments (void) |
void InstrumentListForm::refreshInstruments (void) |
144 |
{ |
{ |
145 |
MainForm* pMainForm = MainForm::getInstance(); |
MainForm* pMainForm = MainForm::getInstance(); |
146 |
if (pMainForm == NULL) |
if (pMainForm == nullptr) |
147 |
return; |
return; |
148 |
|
|
149 |
Options *pOptions = pMainForm->options(); |
Options *pOptions = pMainForm->options(); |
150 |
if (pOptions == NULL) |
if (pOptions == nullptr) |
151 |
return; |
return; |
152 |
|
|
153 |
// Get/save current map selection... |
// Get/save current map selection... |
174 |
void InstrumentListForm::activateMap ( int iMap ) |
void InstrumentListForm::activateMap ( int iMap ) |
175 |
{ |
{ |
176 |
MainForm* pMainForm = MainForm::getInstance(); |
MainForm* pMainForm = MainForm::getInstance(); |
177 |
if (pMainForm == NULL) |
if (pMainForm == nullptr) |
178 |
return; |
return; |
179 |
|
|
180 |
Options *pOptions = pMainForm->options(); |
Options *pOptions = pMainForm->options(); |
181 |
if (pOptions == NULL) |
if (pOptions == nullptr) |
182 |
return; |
return; |
183 |
|
|
184 |
int iMidiMap = iMap - 1; |
int iMidiMap = iMap - 1; |
227 |
|
|
228 |
Instrument *pInstrument |
Instrument *pInstrument |
229 |
= static_cast<Instrument *> (index.internalPointer()); |
= static_cast<Instrument *> (index.internalPointer()); |
230 |
if (pInstrument == NULL) |
if (pInstrument == nullptr) |
231 |
return; |
return; |
232 |
|
|
233 |
// Save current key values... |
// Save current key values... |
271 |
|
|
272 |
Instrument *pInstrument |
Instrument *pInstrument |
273 |
= static_cast<Instrument *> (index.internalPointer()); |
= static_cast<Instrument *> (index.internalPointer()); |
274 |
if (pInstrument == NULL) |
if (pInstrument == nullptr) |
275 |
return; |
return; |
276 |
|
|
277 |
MainForm *pMainForm = MainForm::getInstance(); |
MainForm *pMainForm = MainForm::getInstance(); |
278 |
if (pMainForm == NULL) |
if (pMainForm == nullptr) |
279 |
return; |
return; |
280 |
|
|
281 |
// Prompt user if this is for real... |
// Prompt user if this is for real... |