1 |
// qsamplerDeviceForm.cpp |
// qsamplerDeviceForm.cpp |
2 |
// |
// |
3 |
/**************************************************************************** |
/**************************************************************************** |
4 |
Copyright (C) 2004-2009, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2004-2010, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
Copyright (C) 2007, 2008 Christian Schoenebeck |
Copyright (C) 2007, 2008 Christian Schoenebeck |
6 |
|
|
7 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
453 |
QPixmap pixmap; |
QPixmap pixmap; |
454 |
switch (device.deviceType()) { |
switch (device.deviceType()) { |
455 |
case Device::Audio: |
case Device::Audio: |
456 |
pixmap = QPixmap(":/icons/audio2.png"); |
pixmap = QPixmap(":/images/audio2.png"); |
457 |
break; |
break; |
458 |
case Device::Midi: |
case Device::Midi: |
459 |
pixmap = QPixmap(":/icons/midi2.png"); |
pixmap = QPixmap(":/images/midi2.png"); |
460 |
break; |
break; |
461 |
case Device::None: |
case Device::None: |
462 |
break; |
break; |
614 |
bool bClient = (pMainForm->client() != NULL); |
bool bClient = (pMainForm->client() != NULL); |
615 |
bool bEnabled = (pItem != NULL); |
bool bEnabled = (pItem != NULL); |
616 |
pAction = menu.addAction( |
pAction = menu.addAction( |
617 |
QIcon(":/icons/deviceCreate.png"), |
QIcon(":/images/deviceCreate.png"), |
618 |
tr("&Create device"), this, SLOT(createDevice())); |
tr("&Create device"), this, SLOT(createDevice())); |
619 |
pAction->setEnabled(bEnabled || (bClient && m_bNewDevice)); |
pAction->setEnabled(bEnabled || (bClient && m_bNewDevice)); |
620 |
pAction = menu.addAction( |
pAction = menu.addAction( |
621 |
QIcon(":/icons/deviceDelete.png"), |
QIcon(":/images/deviceDelete.png"), |
622 |
tr("&Delete device"), this, SLOT(deleteDevice())); |
tr("&Delete device"), this, SLOT(deleteDevice())); |
623 |
pAction->setEnabled(bEnabled && !m_bNewDevice); |
pAction->setEnabled(bEnabled && !m_bNewDevice); |
624 |
menu.addSeparator(); |
menu.addSeparator(); |
625 |
pAction = menu.addAction( |
pAction = menu.addAction( |
626 |
QIcon(":/icons/formRefresh.png"), |
QIcon(":/images/formRefresh.png"), |
627 |
tr("&Refresh"), this, SLOT(refreshDevices())); |
tr("&Refresh"), this, SLOT(refreshDevices())); |
628 |
pAction->setEnabled(bClient); |
pAction->setEnabled(bClient); |
629 |
|
|