211 |
// We got options? |
// We got options? |
212 |
m_pOptions = pOptions; |
m_pOptions = pOptions; |
213 |
|
|
214 |
|
// What style do we create these forms? |
215 |
|
WFlags wflags = Qt::WType_TopLevel; |
216 |
|
if (m_pOptions->bKeepOnTop) |
217 |
|
wflags |= Qt::WStyle_Tool; |
218 |
// Some child forms are to be created right now. |
// Some child forms are to be created right now. |
219 |
m_pMessages = new qsamplerMessages(this); |
m_pMessages = new qsamplerMessages(this); |
220 |
m_pDeviceForm = new qsamplerDeviceForm(this); |
m_pDeviceForm = new qsamplerDeviceForm(this, 0, wflags); |
221 |
// Set message defaults... |
// Set message defaults... |
222 |
updateMessagesFont(); |
updateMessagesFont(); |
223 |
updateMessagesLimit(); |
updateMessagesLimit(); |
275 |
// Some windows default fonts is here on demand too. |
// Some windows default fonts is here on demand too. |
276 |
if (bQueryClose && m_pMessages) |
if (bQueryClose && m_pMessages) |
277 |
m_pOptions->sMessagesFont = m_pMessages->messagesFont().toString(); |
m_pOptions->sMessagesFont = m_pMessages->messagesFont().toString(); |
|
// Other windows just need asking if it can close gracefully... |
|
|
if (bQueryClose && m_pDeviceForm) |
|
|
bQueryClose = m_pDeviceForm->queryClose(); |
|
278 |
// Try to save current positioning. |
// Try to save current positioning. |
279 |
if (bQueryClose) { |
if (bQueryClose) { |
280 |
// Save decorations state. |
// Save decorations state. |
705 |
} |
} |
706 |
|
|
707 |
|
|
708 |
|
// Session change receiver slot. |
709 |
|
void qsamplerMainForm::sessionDirty (void) |
710 |
|
{ |
711 |
|
// Just mark the dirty form. |
712 |
|
m_iDirtyCount++; |
713 |
|
// and update the form status... |
714 |
|
stabilizeForm(); |
715 |
|
} |
716 |
|
|
717 |
|
|
718 |
//------------------------------------------------------------------------- |
//------------------------------------------------------------------------- |
719 |
// qsamplerMainForm -- File Action slots. |
// qsamplerMainForm -- File Action slots. |
720 |
|
|
1046 |
bool bOldDisplayEffect = m_pOptions->bDisplayEffect; |
bool bOldDisplayEffect = m_pOptions->bDisplayEffect; |
1047 |
int iOldMaxVolume = m_pOptions->iMaxVolume; |
int iOldMaxVolume = m_pOptions->iMaxVolume; |
1048 |
QString sOldMessagesFont = m_pOptions->sMessagesFont; |
QString sOldMessagesFont = m_pOptions->sMessagesFont; |
1049 |
|
bool bOldKeepOnTop = m_pOptions->bKeepOnTop; |
1050 |
bool bOldStdoutCapture = m_pOptions->bStdoutCapture; |
bool bOldStdoutCapture = m_pOptions->bStdoutCapture; |
1051 |
int bOldMessagesLimit = m_pOptions->bMessagesLimit; |
int bOldMessagesLimit = m_pOptions->bMessagesLimit; |
1052 |
int iOldMessagesLimitLines = m_pOptions->iMessagesLimitLines; |
int iOldMessagesLimitLines = m_pOptions->iMessagesLimitLines; |
1059 |
if (pOptionsForm->exec()) { |
if (pOptionsForm->exec()) { |
1060 |
// Warn if something will be only effective on next run. |
// Warn if something will be only effective on next run. |
1061 |
if (( bOldStdoutCapture && !m_pOptions->bStdoutCapture) || |
if (( bOldStdoutCapture && !m_pOptions->bStdoutCapture) || |
1062 |
(!bOldStdoutCapture && m_pOptions->bStdoutCapture)) { |
(!bOldStdoutCapture && m_pOptions->bStdoutCapture) || |
1063 |
|
( bOldKeepOnTop && !m_pOptions->bKeepOnTop) || |
1064 |
|
(!bOldKeepOnTop && m_pOptions->bKeepOnTop)) { |
1065 |
QMessageBox::information(this, tr("Information"), |
QMessageBox::information(this, tr("Information"), |
1066 |
tr("Some settings may be only effective\n" |
tr("Some settings may be only effective\n" |
1067 |
"next time you start this program."), tr("OK")); |
"next time you start this program."), tr("OK")); |