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 |
|
|
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() { |
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... |