/[svn]/qsampler/trunk/src/qsamplerDeviceForm.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerDeviceForm.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1558 by capela, Thu Dec 6 09:35:33 2007 UTC revision 2388 by capela, Sat Dec 29 19:12:58 2012 UTC
# Line 1  Line 1 
1  // qsamplerDeviceForm.cpp  // qsamplerDeviceForm.cpp
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2012, rncbc aka Rui Nuno Capela. All rights reserved.
5     Copyright (C) 2007, 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
8     modify it under the terms of the GNU General Public License     modify it under the terms of the GNU General Public License
# Line 60  DeviceForm::DeviceForm ( QWidget *pParen Line 60  DeviceForm::DeviceForm ( QWidget *pParen
60    
61          m_ui.DeviceParamTable->setModel(&m_deviceParamModel);          m_ui.DeviceParamTable->setModel(&m_deviceParamModel);
62          m_ui.DeviceParamTable->setItemDelegate(&m_deviceParamDelegate);          m_ui.DeviceParamTable->setItemDelegate(&m_deviceParamDelegate);
63    #if QT_VERSION >= 0x050000
64            m_ui.DeviceParamTable->horizontalHeader()->setSectionResizeMode(2, QHeaderView::Stretch);
65    #else
66          m_ui.DeviceParamTable->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch);          m_ui.DeviceParamTable->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch);
67    #endif
68          m_ui.DeviceParamTable->verticalHeader()->hide();          m_ui.DeviceParamTable->verticalHeader()->hide();
69    
70          m_ui.DevicePortParamTable->setModel(&m_devicePortParamModel);          m_ui.DevicePortParamTable->setModel(&m_devicePortParamModel);
71          m_ui.DevicePortParamTable->setItemDelegate(&m_devicePortParamDelegate);          m_ui.DevicePortParamTable->setItemDelegate(&m_devicePortParamDelegate);
72    #if QT_VERSION >= 0x050000
73            m_ui.DevicePortParamTable->horizontalHeader()->setSectionResizeMode(2, QHeaderView::Stretch);
74    #else
75          m_ui.DevicePortParamTable->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch);          m_ui.DevicePortParamTable->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch);
76    #endif
77          m_ui.DevicePortParamTable->verticalHeader()->hide();          m_ui.DevicePortParamTable->verticalHeader()->hide();
78    
79          // Initial contents.          // Initial contents.
# Line 279  void DeviceForm::deleteDevice (void) Line 287  void DeviceForm::deleteDevice (void)
287                          "%1\n\n"                          "%1\n\n"
288                          "Are you sure?")                          "Are you sure?")
289                          .arg(device.deviceName()),                          .arg(device.deviceName()),
290                          tr("OK"), tr("Cancel")) > 0)                          QMessageBox::Ok | QMessageBox::Cancel)
291                            == QMessageBox::Cancel)
292                          return;                          return;
293          }          }
294    
# Line 452  void DeviceForm::selectDevice () Line 461  void DeviceForm::selectDevice ()
461                  QPixmap pixmap;                  QPixmap pixmap;
462                  switch (device.deviceType()) {                  switch (device.deviceType()) {
463                  case Device::Audio:                  case Device::Audio:
464                          pixmap = QPixmap(":/icons/audio2.png");                          pixmap = QPixmap(":/images/audio2.png");
465                          break;                          break;
466                  case Device::Midi:                  case Device::Midi:
467                          pixmap = QPixmap(":/icons/midi2.png");                          pixmap = QPixmap(":/images/midi2.png");
468                          break;                          break;
469                  case Device::None:                  case Device::None:
470                          break;                          break;
# Line 613  void DeviceForm::deviceListViewContextMe Line 622  void DeviceForm::deviceListViewContextMe
622          bool bClient = (pMainForm->client() != NULL);          bool bClient = (pMainForm->client() != NULL);
623          bool bEnabled = (pItem != NULL);          bool bEnabled = (pItem != NULL);
624          pAction = menu.addAction(          pAction = menu.addAction(
625                  QIcon(":/qsampler/pixmaps/deviceCreate.png"),                  QIcon(":/images/deviceCreate.png"),
626                  tr("&Create device"), this, SLOT(createDevice()));                  tr("&Create device"), this, SLOT(createDevice()));
627          pAction->setEnabled(bEnabled || (bClient && m_bNewDevice));          pAction->setEnabled(bEnabled || (bClient && m_bNewDevice));
628          pAction = menu.addAction(          pAction = menu.addAction(
629                  QIcon(":/qsampler/pixmaps/deviceDelete.png"),                  QIcon(":/images/deviceDelete.png"),
630                  tr("&Delete device"), this, SLOT(deleteDevice()));                  tr("&Delete device"), this, SLOT(deleteDevice()));
631          pAction->setEnabled(bEnabled && !m_bNewDevice);          pAction->setEnabled(bEnabled && !m_bNewDevice);
632          menu.addSeparator();          menu.addSeparator();
633          pAction = menu.addAction(          pAction = menu.addAction(
634                  QIcon(":/qsampler/pixmaps/formRefresh.png"),                  QIcon(":/images/formRefresh.png"),
635                  tr("&Refresh"), this, SLOT(refreshDevices()));                  tr("&Refresh"), this, SLOT(refreshDevices()));
636          pAction->setEnabled(bClient);          pAction->setEnabled(bClient);
637    

Legend:
Removed from v.1558  
changed lines
  Added in v.2388

  ViewVC Help
Powered by ViewVC