2 |
// |
// |
3 |
// ui.h extension file, included from the uic-generated form implementation. |
// ui.h extension file, included from the uic-generated form implementation. |
4 |
/**************************************************************************** |
/**************************************************************************** |
5 |
Copyright (C) 2004-2005, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2004-2006, rncbc aka Rui Nuno Capela. All rights reserved. |
6 |
|
|
7 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
8 |
modify it under the terms of the GNU General Public License |
modify it under the terms of the GNU General Public License |
14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
GNU General Public License for more details. |
GNU General Public License for more details. |
16 |
|
|
17 |
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License along |
18 |
along with this program; if not, write to the Free Software |
with this program; if not, write to the Free Software Foundation, Inc., |
19 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
20 |
|
|
21 |
*****************************************************************************/ |
*****************************************************************************/ |
22 |
|
|
203 |
} |
} |
204 |
|
|
205 |
|
|
206 |
|
// Channel mute slot. |
207 |
|
bool qsamplerChannelStrip::channelMute ( bool bMute ) |
208 |
|
{ |
209 |
|
if (m_pChannel == NULL) |
210 |
|
return false; |
211 |
|
|
212 |
|
// Invoke the channel mute method. |
213 |
|
bool bResult = m_pChannel->setChannelMute(bMute); |
214 |
|
// Notify that this channel has changed. |
215 |
|
if (bResult) |
216 |
|
emit channelChanged(this); |
217 |
|
|
218 |
|
return bResult; |
219 |
|
} |
220 |
|
|
221 |
|
|
222 |
|
// Channel solo slot. |
223 |
|
bool qsamplerChannelStrip::channelSolo ( bool bSolo ) |
224 |
|
{ |
225 |
|
if (m_pChannel == NULL) |
226 |
|
return false; |
227 |
|
|
228 |
|
// Invoke the channel solo method. |
229 |
|
bool bResult = m_pChannel->setChannelSolo(bSolo); |
230 |
|
// Notify that this channel has changed. |
231 |
|
if (bResult) |
232 |
|
emit channelChanged(this); |
233 |
|
|
234 |
|
return bResult; |
235 |
|
} |
236 |
|
|
237 |
|
|
238 |
// Channel reset slot. |
// Channel reset slot. |
239 |
bool qsamplerChannelStrip::channelReset (void) |
bool qsamplerChannelStrip::channelReset (void) |
240 |
{ |
{ |
358 |
InstrumentStatusTextLabel->setText(QString::number(iInstrumentStatus) + '%'); |
InstrumentStatusTextLabel->setText(QString::number(iInstrumentStatus) + '%'); |
359 |
m_iErrorCount = 0; |
m_iErrorCount = 0; |
360 |
|
|
361 |
|
#ifdef CONFIG_MUTE_SOLO |
362 |
|
// Mute/Solo button state coloring... |
363 |
|
const QColor& rgbNormal = ChannelSetupPushButton->paletteBackgroundColor(); |
364 |
|
bool bMute = m_pChannel->channelMute(); |
365 |
|
ChannelMutePushButton->setPaletteBackgroundColor(bMute ? Qt::red : rgbNormal); |
366 |
|
ChannelMutePushButton->setDown(bMute); |
367 |
|
bool bSolo = m_pChannel->channelSolo(); |
368 |
|
ChannelSoloPushButton->setPaletteBackgroundColor(bSolo ? Qt::yellow : rgbNormal); |
369 |
|
ChannelSoloPushButton->setDown(bSolo); |
370 |
|
#else |
371 |
|
ChannelMutePushButton->setEnabled(false); |
372 |
|
ChannelSoloPushButton->setEnabled(false); |
373 |
|
#endif |
374 |
|
|
375 |
// And update the both GUI volume elements; |
// And update the both GUI volume elements; |
376 |
// return success if, and only if, intrument is fully loaded... |
// return success if, and only if, intrument is fully loaded... |
377 |
return updateChannelVolume() && (iInstrumentStatus == 100); |
return updateChannelVolume() && (iInstrumentStatus == 100); |