107 |
QObject::connect(m_ui.AudioDeviceComboBox, |
QObject::connect(m_ui.AudioDeviceComboBox, |
108 |
SIGNAL(activated(int)), |
SIGNAL(activated(int)), |
109 |
SLOT(selectAudioDevice(int))); |
SLOT(selectAudioDevice(int))); |
110 |
QObject::connect(m_ui.OkPushButton, |
QObject::connect(m_ui.DialogButtonBox, |
111 |
SIGNAL(clicked()), |
SIGNAL(accepted()), |
112 |
SLOT(accept())); |
SLOT(accept())); |
113 |
QObject::connect(m_ui.CancelPushButton, |
QObject::connect(m_ui.DialogButtonBox, |
114 |
SIGNAL(clicked()), |
SIGNAL(rejected()), |
115 |
SLOT(reject())); |
SLOT(reject())); |
116 |
QObject::connect(m_ui.MidiDeviceToolButton, |
QObject::connect(m_ui.MidiDeviceToolButton, |
117 |
SIGNAL(clicked()), |
SIGNAL(clicked()), |
434 |
bool bReject = true; |
bool bReject = true; |
435 |
|
|
436 |
// Check if there's any pending changes... |
// Check if there's any pending changes... |
437 |
if (m_iDirtyCount > 0 && m_ui.OkPushButton->isEnabled()) { |
if (m_iDirtyCount > 0) { |
438 |
switch (QMessageBox::warning(this, |
switch (QMessageBox::warning(this, |
439 |
QSAMPLER_TITLE ": " + tr("Warning"), |
QSAMPLER_TITLE ": " + tr("Warning"), |
440 |
tr("Some channel settings have been changed.\n\n" |
tr("Some channel settings have been changed.\n\n" |
807 |
const QString& sPath = InstrumentFileComboBox->currentText(); |
const QString& sPath = InstrumentFileComboBox->currentText(); |
808 |
bValid = bValid && !sPath.isEmpty() && QFileInfo(sPath).exists(); |
bValid = bValid && !sPath.isEmpty() && QFileInfo(sPath).exists(); |
809 |
#endif |
#endif |
810 |
m_ui.OkPushButton->setEnabled(m_iDirtyCount > 0 && bValid); |
m_ui.DialogButtonBox->button( |
811 |
|
QDialogButtonBox::Ok)->setEnabled(m_iDirtyCount > 0 && bValid); |
812 |
} |
} |
813 |
|
|
814 |
|
|