843 |
bool bOldServerStart = m_pOptions->bServerStart; |
bool bOldServerStart = m_pOptions->bServerStart; |
844 |
QString sOldServerCmdLine = m_pOptions->sServerCmdLine; |
QString sOldServerCmdLine = m_pOptions->sServerCmdLine; |
845 |
QString sOldDisplayFont = m_pOptions->sDisplayFont; |
QString sOldDisplayFont = m_pOptions->sDisplayFont; |
846 |
|
int iOldMaxVolume = m_pOptions->iMaxVolume; |
847 |
QString sOldMessagesFont = m_pOptions->sMessagesFont; |
QString sOldMessagesFont = m_pOptions->sMessagesFont; |
848 |
bool bOldStdoutCapture = m_pOptions->bStdoutCapture; |
bool bOldStdoutCapture = m_pOptions->bStdoutCapture; |
849 |
int bOldMessagesLimit = m_pOptions->bMessagesLimit; |
int bOldMessagesLimit = m_pOptions->bMessagesLimit; |
869 |
updateRecentFilesMenu(); |
updateRecentFilesMenu(); |
870 |
if (sOldDisplayFont != m_pOptions->sDisplayFont) |
if (sOldDisplayFont != m_pOptions->sDisplayFont) |
871 |
updateDisplayFont(); |
updateDisplayFont(); |
872 |
|
if (iOldMaxVolume != m_pOptions->iMaxVolume) |
873 |
|
updateMaxVolume(); |
874 |
if (sOldMessagesFont != m_pOptions->sMessagesFont) |
if (sOldMessagesFont != m_pOptions->sMessagesFont) |
875 |
updateMessagesFont(); |
updateMessagesFont(); |
876 |
if (( bOldMessagesLimit && !m_pOptions->bMessagesLimit) || |
if (( bOldMessagesLimit && !m_pOptions->bMessagesLimit) || |
1127 |
} |
} |
1128 |
|
|
1129 |
|
|
1130 |
|
// Force update of the channels maximum volume setting. |
1131 |
|
void qsamplerMainForm::updateMaxVolume (void) |
1132 |
|
{ |
1133 |
|
if (m_pOptions == NULL) |
1134 |
|
return; |
1135 |
|
|
1136 |
|
// Full channel list update... |
1137 |
|
QWidgetList wlist = m_pWorkspace->windowList(); |
1138 |
|
if (wlist.isEmpty()) |
1139 |
|
return; |
1140 |
|
|
1141 |
|
m_pWorkspace->setUpdatesEnabled(false); |
1142 |
|
for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { |
1143 |
|
qsamplerChannelStrip *pChannel = (qsamplerChannelStrip *) wlist.at(iChannel); |
1144 |
|
pChannel->setMaxVolume(m_pOptions->iMaxVolume); |
1145 |
|
} |
1146 |
|
m_pWorkspace->setUpdatesEnabled(true); |
1147 |
|
} |
1148 |
|
|
1149 |
|
|
1150 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
1151 |
// qsamplerMainForm -- Messages window form handlers. |
// qsamplerMainForm -- Messages window form handlers. |
1152 |
|
|
1260 |
// Add a new channel itema... |
// Add a new channel itema... |
1261 |
WFlags wflags = Qt::WStyle_Customize | Qt::WStyle_Tool | Qt::WStyle_Title | Qt::WStyle_NoBorder; |
WFlags wflags = Qt::WStyle_Customize | Qt::WStyle_Tool | Qt::WStyle_Title | Qt::WStyle_NoBorder; |
1262 |
pChannel = new qsamplerChannelStrip(m_pWorkspace, 0, wflags); |
pChannel = new qsamplerChannelStrip(m_pWorkspace, 0, wflags); |
1263 |
|
pChannel->setMaxVolume(m_pOptions->iMaxVolume); |
1264 |
pChannel->setup(this, iChannelID); |
pChannel->setup(this, iChannelID); |
1265 |
// We'll need a display font. |
// We'll need a display font. |
1266 |
QFont font; |
QFont font; |
1462 |
// And try to stop server. |
// And try to stop server. |
1463 |
if (m_pServer) { |
if (m_pServer) { |
1464 |
appendMessages(tr("Server is stopping...")); |
appendMessages(tr("Server is stopping...")); |
1465 |
if (m_pServer->isRunning()) { |
if (m_pServer->isRunning()) |
1466 |
m_pServer->tryTerminate(); |
m_pServer->tryTerminate(); |
|
return; |
|
|
} |
|
1467 |
} |
} |
1468 |
|
|
1469 |
|
// Give it some time to terminate gracefully and stabilize... |
1470 |
|
QTime t; |
1471 |
|
t.start(); |
1472 |
|
while (t.elapsed() < QSAMPLER_TIMER_MSECS) |
1473 |
|
QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput); |
1474 |
|
|
1475 |
// Do final processing anyway. |
// Do final processing anyway. |
1476 |
processServerExit(); |
processServerExit(); |
1477 |
} |
} |