2 |
// |
// |
3 |
// ui.h extension file, included from the uic-generated form implementation. |
// ui.h extension file, included from the uic-generated form implementation. |
4 |
/**************************************************************************** |
/**************************************************************************** |
5 |
Copyright (C) 2005, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2004-2006, rncbc aka Rui Nuno Capela. All rights reserved. |
6 |
|
|
7 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
8 |
modify it under the terms of the GNU General Public License |
modify it under the terms of the GNU General Public License |
14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
GNU General Public License for more details. |
GNU General Public License for more details. |
16 |
|
|
17 |
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License along |
18 |
along with this program; if not, write to the Free Software |
with this program; if not, write to the Free Software Foundation, Inc., |
19 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
20 |
|
|
21 |
*****************************************************************************/ |
*****************************************************************************/ |
22 |
|
|
23 |
|
#include "qsamplerAbout.h" |
24 |
|
#include "qsamplerMainForm.h" |
25 |
|
|
26 |
#include <qmessagebox.h> |
#include <qmessagebox.h> |
27 |
#include <qfiledialog.h> |
#include <qfiledialog.h> |
28 |
#include <qfileinfo.h> |
#include <qfileinfo.h> |
30 |
#include <qptrlist.h> |
#include <qptrlist.h> |
31 |
#include <qpopupmenu.h> |
#include <qpopupmenu.h> |
32 |
|
|
|
#include "qsamplerMainForm.h" |
|
|
|
|
|
#include "config.h" |
|
|
|
|
33 |
|
|
34 |
// Kind of constructor. |
// Kind of constructor. |
35 |
void qsamplerDeviceForm::init (void) |
void qsamplerDeviceForm::init (void) |
239 |
// Prompt user if this is for real... |
// Prompt user if this is for real... |
240 |
qsamplerOptions *pOptions = m_pMainForm->options(); |
qsamplerOptions *pOptions = m_pMainForm->options(); |
241 |
if (pOptions && pOptions->bConfirmRemove) { |
if (pOptions && pOptions->bConfirmRemove) { |
242 |
if (QMessageBox::warning(this, tr("Warning"), |
if (QMessageBox::warning(this, |
243 |
|
QSAMPLER_TITLE ": " + tr("Warning"), |
244 |
tr("Delete device:\n\n" |
tr("Delete device:\n\n" |
245 |
"%1\n\n" |
"%1\n\n" |
246 |
"Are you sure?") |
"Are you sure?") |
360 |
DeviceParamTable->setNumRows(0); |
DeviceParamTable->setNumRows(0); |
361 |
DevicePortComboBox->clear(); |
DevicePortComboBox->clear(); |
362 |
DevicePortParamTable->setNumRows(0); |
DevicePortParamTable->setNumRows(0); |
363 |
|
DevicePortTextLabel->setEnabled(false); |
364 |
DevicePortComboBox->setEnabled(false); |
DevicePortComboBox->setEnabled(false); |
365 |
DevicePortParamTable->setEnabled(false); |
DevicePortParamTable->setEnabled(false); |
366 |
stabilizeForm(); |
stabilizeForm(); |
391 |
// Fill the device parameter table... |
// Fill the device parameter table... |
392 |
DeviceParamTable->refresh(device.params(), m_bNewDevice); |
DeviceParamTable->refresh(device.params(), m_bNewDevice); |
393 |
// And now the device port/channel parameter table... |
// And now the device port/channel parameter table... |
394 |
|
switch (device.deviceType()) { |
395 |
|
case qsamplerDevice::Audio: |
396 |
|
DevicePortTextLabel->setText(tr("Ch&annel:")); |
397 |
|
break; |
398 |
|
case qsamplerDevice::Midi: |
399 |
|
DevicePortTextLabel->setText(tr("P&ort:")); |
400 |
|
break; |
401 |
|
case qsamplerDevice::None: |
402 |
|
break; |
403 |
|
} |
404 |
DevicePortComboBox->clear(); |
DevicePortComboBox->clear(); |
405 |
DevicePortParamTable->setNumRows(0); |
DevicePortParamTable->setNumRows(0); |
406 |
if (m_bNewDevice) { |
if (m_bNewDevice) { |
407 |
|
DevicePortTextLabel->setEnabled(false); |
408 |
DevicePortComboBox->setEnabled(false); |
DevicePortComboBox->setEnabled(false); |
409 |
DevicePortParamTable->setEnabled(false); |
DevicePortParamTable->setEnabled(false); |
410 |
} else { |
} else { |
427 |
+ ' ' + pPort->portName()); |
+ ' ' + pPort->portName()); |
428 |
} |
} |
429 |
bool bEnabled = (ports.count() > 0); |
bool bEnabled = (ports.count() > 0); |
430 |
|
DevicePortTextLabel->setEnabled(bEnabled); |
431 |
DevicePortComboBox->setEnabled(bEnabled); |
DevicePortComboBox->setEnabled(bEnabled); |
432 |
DevicePortParamTable->setEnabled(bEnabled); |
DevicePortParamTable->setEnabled(bEnabled); |
433 |
} |
} |