/[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 1466 by capela, Thu Nov 1 19:25:10 2007 UTC revision 1474 by schoenebeck, Mon Nov 5 20:47:38 2007 UTC
# Line 23  Line 23 
23  #include "qsamplerDeviceForm.h"  #include "qsamplerDeviceForm.h"
24    
25  #include "qsamplerAbout.h"  #include "qsamplerAbout.h"
26    #include "qsamplerMainForm.h"
27    
28  namespace QSampler {  namespace QSampler {
29    
# Line 57  DeviceForm::DeviceForm(QWidget* parent, Line 58  DeviceForm::DeviceForm(QWidget* parent,
58          adjustSize();          adjustSize();
59    
60          QObject::connect(ui.DeviceListView,          QObject::connect(ui.DeviceListView,
61                  SIGNAL(selectionChanged()),                  SIGNAL(itemSelectionChanged()),
62                  SLOT(selectDevice()));                  SLOT(selectDevice()));
63          QObject::connect(ui.DeviceListView,          QObject::connect(ui.DeviceListView,
64                  SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&,int)),                  SIGNAL(customContextMenuRequested(const QPoint&)),
65                  SLOT(contextMenu(QListViewItem*,const QPoint&,int)));                  SLOT(deviceListViewContextMenu(const QPoint&)));
66          QObject::connect(ui.RefreshDevicesPushButton,          QObject::connect(ui.RefreshDevicesPushButton,
67                  SIGNAL(clicked()),                  SIGNAL(clicked()),
68                  SLOT(refreshDevices()));                  SLOT(refreshDevices()));
69          QObject::connect(ui.DriverNameComboBox,          QObject::connect(ui.DriverNameComboBox,
70                  SIGNAL(activated(const QString&)),                  SIGNAL(activated(const QString&)),
71                  SLOT(selectDriver(const QString&)));                  SLOT(selectDriver(const QString&)));
72          QObject::connect(ui.DevicePortComboBox,          QObject::connect(ui.DevicePortComboBox,
73                  SIGNAL(activated(int)),                  SIGNAL(activated(int)),
74                  SLOT(selectDevicePort(int)));                  SLOT(selectDevicePort(int)));
# Line 134  void DeviceForm::setDeviceTypeMode ( Line 135  void DeviceForm::setDeviceTypeMode (
135  // Device driver name setup formal initializer.  // Device driver name setup formal initializer.
136  void DeviceForm::setDriverName ( const QString& sDriverName )  void DeviceForm::setDriverName ( const QString& sDriverName )
137  {  {
138          if (ui.DriverNameComboBox->findText(sDriverName) == 0) {          if (ui.DriverNameComboBox->findText(sDriverName) < 0) {
139                  ui.DriverNameComboBox->insertItem(sDriverName);                  ui.DriverNameComboBox->insertItem(sDriverName);
140          }          }
141          ui.DriverNameComboBox->setCurrentText(sDriverName);          ui.DriverNameComboBox->setCurrentText(sDriverName);
# Line 553  void DeviceForm::changeDevicePortParam ( Line 554  void DeviceForm::changeDevicePortParam (
554    
555    
556  // Device list view context menu handler.  // Device list view context menu handler.
557  void DeviceForm::contextMenu ( QTreeWidgetItem* pItem, const QPoint& pos, int )  void DeviceForm::deviceListViewContextMenu ( const QPoint& pos )
558  {  {
559          MainForm *pMainForm = MainForm::getInstance();          MainForm *pMainForm = MainForm::getInstance();
560          if (pMainForm == NULL)          if (pMainForm == NULL)
561                  return;                  return;
562    
563            QTreeWidgetItem* pItem = ui.DeviceListView->itemAt(pos);
564            if (pItem == NULL)
565                    return;
566    
567          int iItemID;          int iItemID;
568    
569          // Build the device context menu...          // Build the device context menu...

Legend:
Removed from v.1466  
changed lines
  Added in v.1474

  ViewVC Help
Powered by ViewVC