949 |
bool bOldServerStart = m_pOptions->bServerStart; |
bool bOldServerStart = m_pOptions->bServerStart; |
950 |
QString sOldServerCmdLine = m_pOptions->sServerCmdLine; |
QString sOldServerCmdLine = m_pOptions->sServerCmdLine; |
951 |
QString sOldDisplayFont = m_pOptions->sDisplayFont; |
QString sOldDisplayFont = m_pOptions->sDisplayFont; |
952 |
|
bool bOldDisplayEffect = m_pOptions->bDisplayEffect; |
953 |
int iOldMaxVolume = m_pOptions->iMaxVolume; |
int iOldMaxVolume = m_pOptions->iMaxVolume; |
954 |
QString sOldMessagesFont = m_pOptions->sMessagesFont; |
QString sOldMessagesFont = m_pOptions->sMessagesFont; |
955 |
bool bOldStdoutCapture = m_pOptions->bStdoutCapture; |
bool bOldStdoutCapture = m_pOptions->bStdoutCapture; |
974 |
(!bOldCompletePath && m_pOptions->bCompletePath) || |
(!bOldCompletePath && m_pOptions->bCompletePath) || |
975 |
(iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles)) |
(iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles)) |
976 |
updateRecentFilesMenu(); |
updateRecentFilesMenu(); |
977 |
|
if (( bOldDisplayEffect && !m_pOptions->bDisplayEffect) || |
978 |
|
(!bOldDisplayEffect && m_pOptions->bDisplayEffect)) |
979 |
|
updateDisplayEffect(); |
980 |
if (sOldDisplayFont != m_pOptions->sDisplayFont) |
if (sOldDisplayFont != m_pOptions->sDisplayFont) |
981 |
updateDisplayFont(); |
updateDisplayFont(); |
982 |
if (iOldMaxVolume != m_pOptions->iMaxVolume) |
if (iOldMaxVolume != m_pOptions->iMaxVolume) |
1244 |
} |
} |
1245 |
|
|
1246 |
|
|
1247 |
|
// Update channel strips background effect. |
1248 |
|
void qsamplerMainForm::updateDisplayEffect (void) |
1249 |
|
{ |
1250 |
|
QPixmap pm; |
1251 |
|
if (m_pOptions->bDisplayEffect) |
1252 |
|
pm = QPixmap::fromMimeSource("displaybg1.png"); |
1253 |
|
|
1254 |
|
// Full channel list update... |
1255 |
|
QWidgetList wlist = m_pWorkspace->windowList(); |
1256 |
|
if (wlist.isEmpty()) |
1257 |
|
return; |
1258 |
|
|
1259 |
|
m_pWorkspace->setUpdatesEnabled(false); |
1260 |
|
for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) { |
1261 |
|
qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel); |
1262 |
|
if (pChannelStrip) |
1263 |
|
pChannelStrip->setDisplayBackground(pm); |
1264 |
|
} |
1265 |
|
m_pWorkspace->setUpdatesEnabled(true); |
1266 |
|
} |
1267 |
|
|
1268 |
|
|
1269 |
// Force update of the channels maximum volume setting. |
// Force update of the channels maximum volume setting. |
1270 |
void qsamplerMainForm::updateMaxVolume (void) |
void qsamplerMainForm::updateMaxVolume (void) |
1271 |
{ |
{ |
1400 |
// Add a new channel itema... |
// Add a new channel itema... |
1401 |
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; |
1402 |
pChannelStrip = new qsamplerChannelStrip(m_pWorkspace, 0, wflags); |
pChannelStrip = new qsamplerChannelStrip(m_pWorkspace, 0, wflags); |
1403 |
pChannelStrip->setMaxVolume(m_pOptions->iMaxVolume); |
// Set some initial aesthetic options... |
1404 |
|
if (m_pOptions) { |
1405 |
|
// Background display effect... |
1406 |
|
pChannelStrip->setDisplayEffect(m_pOptions->bDisplayEffect); |
1407 |
|
// We'll need a display font. |
1408 |
|
QFont font; |
1409 |
|
if (font.fromString(m_pOptions->sDisplayFont)) |
1410 |
|
pChannelStrip->setDisplayFont(font); |
1411 |
|
// Maximum allowed volume setting. |
1412 |
|
pChannelStrip->setMaxVolume(m_pOptions->iMaxVolume); |
1413 |
|
} |
1414 |
|
// Actual channel setup. |
1415 |
pChannelStrip->setup(this, iChannelID); |
pChannelStrip->setup(this, iChannelID); |
|
// We'll need a display font. |
|
|
QFont font; |
|
|
if (m_pOptions && font.fromString(m_pOptions->sDisplayFont)) |
|
|
pChannelStrip->setDisplayFont(font); |
|
|
// Track channel setup changes. |
|
1416 |
QObject::connect(pChannelStrip, SIGNAL(channelChanged(qsamplerChannelStrip *)), this, SLOT(channelStripChanged(qsamplerChannelStrip *))); |
QObject::connect(pChannelStrip, SIGNAL(channelChanged(qsamplerChannelStrip *)), this, SLOT(channelStripChanged(qsamplerChannelStrip *))); |
1417 |
// Before we show it up, may be we'll |
// Before we show it up, may be we'll |
1418 |
// better ask for some initial values? |
// better ask for some initial values? |