/[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 1464 by capela, Thu Nov 1 17:14:21 2007 UTC revision 1473 by capela, Mon Nov 5 19:07:26 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 55  DeviceForm::DeviceForm(QWidget* parent, Line 56  DeviceForm::DeviceForm(QWidget* parent,
56          refreshDevices();          refreshDevices();
57          // Try to restore normal window positioning.          // Try to restore normal window positioning.
58          adjustSize();          adjustSize();
59    
60            QObject::connect(ui.DeviceListView,
61                    SIGNAL(itemSelectionChanged()),
62                    SLOT(selectDevice()));
63            QObject::connect(ui.DeviceListView,
64                    SIGNAL(customContextMenuRequested(const QPoint&)),
65                    SLOT(deviceListViewContextMenu(const QPoint&)));
66            QObject::connect(ui.RefreshDevicesPushButton,
67                    SIGNAL(clicked()),
68                    SLOT(refreshDevices()));
69            QObject::connect(ui.DriverNameComboBox,
70                    SIGNAL(activated(const QString&)),
71                    SLOT(selectDriver(const QString&)));
72            QObject::connect(ui.DevicePortComboBox,
73                    SIGNAL(activated(int)),
74                    SLOT(selectDevicePort(int)));
75            QObject::connect(ui.CreateDevicePushButton,
76                    SIGNAL(clicked()),
77                    SLOT(createDevice()));
78            QObject::connect(ui.DeleteDevicePushButton,
79                    SIGNAL(clicked()),
80                    SLOT(deleteDevice()));
81            QObject::connect(ui.ClosePushButton,
82                    SIGNAL(clicked()),
83                    SLOT(close()));
84  }  }
85    
86  DeviceForm::~DeviceForm() {  DeviceForm::~DeviceForm() {
# Line 528  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.1464  
changed lines
  Added in v.1473

  ViewVC Help
Powered by ViewVC