20 |
|
|
21 |
*****************************************************************************/ |
*****************************************************************************/ |
22 |
|
|
23 |
|
#include "qsamplerAbout.h" |
24 |
|
#include "qsamplerDeviceForm.h" |
25 |
|
|
26 |
#include <qvalidator.h> |
#include <qvalidator.h> |
27 |
#include <qmessagebox.h> |
#include <qmessagebox.h> |
28 |
#include <qfiledialog.h> |
#include <qfiledialog.h> |
29 |
#include <qfileinfo.h> |
#include <qfileinfo.h> |
30 |
#include <qlistbox.h> |
#include <qlistbox.h> |
31 |
|
|
|
#include "qsamplerDeviceForm.h" |
|
|
|
|
|
#include "config.h" |
|
|
|
|
32 |
|
|
33 |
// Kind of constructor. |
// Kind of constructor. |
34 |
void qsamplerChannelForm::init (void) |
void qsamplerChannelForm::init (void) |
71 |
|
|
72 |
// It can be a brand new channel, remember? |
// It can be a brand new channel, remember? |
73 |
bool bNew = (m_pChannel->channelID() < 0); |
bool bNew = (m_pChannel->channelID() < 0); |
74 |
setCaption(m_pChannel->channelName()); |
setCaption(QSAMPLER_TITLE ": " + m_pChannel->channelName()); |
75 |
|
|
76 |
// Check if we're up and connected. |
// Check if we're up and connected. |
77 |
if (m_pChannel->client() == NULL) |
if (m_pChannel->client() == NULL) |
262 |
|
|
263 |
// Check if there's any pending changes... |
// Check if there's any pending changes... |
264 |
if (m_iDirtyCount > 0 && OkPushButton->isEnabled()) { |
if (m_iDirtyCount > 0 && OkPushButton->isEnabled()) { |
265 |
switch (QMessageBox::warning(this, tr("Warning"), |
switch (QMessageBox::warning(this, |
266 |
|
QSAMPLER_TITLE ": " + tr("Warning"), |
267 |
tr("Some channel settings have been changed.\n\n" |
tr("Some channel settings have been changed.\n\n" |
268 |
"Do you want to apply the changes?"), |
"Do you want to apply the changes?"), |
269 |
tr("Apply"), tr("Discard"), tr("Cancel"))) { |
tr("Apply"), tr("Discard"), tr("Cancel"))) { |
292 |
// FIXME: the instrument file filters should be restricted, |
// FIXME: the instrument file filters should be restricted, |
293 |
// depending on the current engine. |
// depending on the current engine. |
294 |
QString sInstrumentFile = QFileDialog::getOpenFileName( |
QString sInstrumentFile = QFileDialog::getOpenFileName( |
295 |
pOptions->sInstrumentDir, // Start here. |
pOptions->sInstrumentDir, // Start here. |
296 |
tr("Instrument files") + " (*.gig *.dls)", // Filter (GIG and DLS files) |
tr("Instrument files") + " (*.gig *.dls)", // Filter (GIG and DLS files) |
297 |
this, 0, // Parent and name (none) |
this, 0, // Parent and name (none) |
298 |
tr("Instrument files") // Caption. |
QSAMPLER_TITLE ": " + tr("Instrument files") // Caption. |
299 |
); |
); |
300 |
|
|
301 |
if (sInstrumentFile.isEmpty()) |
if (sInstrumentFile.isEmpty()) |