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, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2004-2005, 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 |
556 |
if (piChannelIDs == NULL) { |
if (piChannelIDs == NULL) { |
557 |
appendMessagesClient("lscp_list_channels"); |
appendMessagesClient("lscp_list_channels"); |
558 |
appendMessagesError(tr("Could not get current list of channels.\n\nSorry.")); |
appendMessagesError(tr("Could not get current list of channels.\n\nSorry.")); |
559 |
} |
} else { |
560 |
|
// Try to (re)create each channel. |
561 |
// Try to (re)create each channel. |
m_pWorkspace->setUpdatesEnabled(false); |
562 |
m_pWorkspace->setUpdatesEnabled(false); |
for (int iChannel = 0; piChannelIDs[iChannel] >= 0; iChannel++) { |
563 |
for (int iChannel = 0; piChannelIDs[iChannel] >= 0; iChannel++) { |
createChannelStrip(new qsamplerChannel(this, piChannelIDs[iChannel])); |
564 |
createChannelStrip(new qsamplerChannel(this, piChannelIDs[iChannel])); |
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
565 |
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
} |
566 |
} |
m_pWorkspace->setUpdatesEnabled(true); |
567 |
m_pWorkspace->setUpdatesEnabled(true); |
} |
568 |
|
|
569 |
// Save as default session directory. |
// Save as default session directory. |
570 |
if (m_pOptions) |
if (m_pOptions) |
959 |
int bOldMessagesLimit = m_pOptions->bMessagesLimit; |
int bOldMessagesLimit = m_pOptions->bMessagesLimit; |
960 |
int iOldMessagesLimitLines = m_pOptions->iMessagesLimitLines; |
int iOldMessagesLimitLines = m_pOptions->iMessagesLimitLines; |
961 |
bool bOldCompletePath = m_pOptions->bCompletePath; |
bool bOldCompletePath = m_pOptions->bCompletePath; |
962 |
|
bool bOldInstrumentNames = m_pOptions->bInstrumentNames; |
963 |
int iOldMaxRecentFiles = m_pOptions->iMaxRecentFiles; |
int iOldMaxRecentFiles = m_pOptions->iMaxRecentFiles; |
964 |
// Load the current setup settings. |
// Load the current setup settings. |
965 |
pOptionsForm->setup(m_pOptions); |
pOptionsForm->setup(m_pOptions); |
978 |
(!bOldCompletePath && m_pOptions->bCompletePath) || |
(!bOldCompletePath && m_pOptions->bCompletePath) || |
979 |
(iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles)) |
(iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles)) |
980 |
updateRecentFilesMenu(); |
updateRecentFilesMenu(); |
981 |
|
if (( bOldInstrumentNames && !m_pOptions->bInstrumentNames) || |
982 |
|
(!bOldInstrumentNames && m_pOptions->bInstrumentNames)) |
983 |
|
updateInstrumentNames(); |
984 |
if (( bOldDisplayEffect && !m_pOptions->bDisplayEffect) || |
if (( bOldDisplayEffect && !m_pOptions->bDisplayEffect) || |
985 |
(!bOldDisplayEffect && m_pOptions->bDisplayEffect)) |
(!bOldDisplayEffect && m_pOptions->bDisplayEffect)) |
986 |
updateDisplayEffect(); |
updateDisplayEffect(); |
1224 |
} |
} |
1225 |
|
|
1226 |
|
|
1227 |
|
// Force update of the channels instrument names mode. |
1228 |
|
void qsamplerMainForm::updateInstrumentNames (void) |
1229 |
|
{ |
1230 |
|
// Full channel list update... |
1231 |
|
QWidgetList wlist = m_pWorkspace->windowList(); |
1232 |
|
if (wlist.isEmpty()) |
1233 |
|
return; |
1234 |
|
|
1235 |
|
m_pWorkspace->setUpdatesEnabled(false); |
1236 |
|
for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { |
1237 |
|
qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel); |
1238 |
|
if (pChannelStrip) |
1239 |
|
pChannelStrip->updateInstrumentName(true); |
1240 |
|
} |
1241 |
|
m_pWorkspace->setUpdatesEnabled(true); |
1242 |
|
} |
1243 |
|
|
1244 |
|
|
1245 |
// Force update of the channels display font. |
// Force update of the channels display font. |
1246 |
void qsamplerMainForm::updateDisplayFont (void) |
void qsamplerMainForm::updateDisplayFont (void) |
1247 |
{ |
{ |