57 |
adjustSize(); |
adjustSize(); |
58 |
|
|
59 |
QObject::connect(ui.DeviceListView, |
QObject::connect(ui.DeviceListView, |
60 |
SIGNAL(selectionChanged()), |
SIGNAL(itemSelectionChanged()), |
61 |
SLOT(selectDevice())); |
SLOT(selectDevice())); |
62 |
QObject::connect(ui.DeviceListView, |
QObject::connect(ui.DeviceListView, |
63 |
SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&,int)), |
SIGNAL(customContextMenuRequested(const QPoint&)), |
64 |
SLOT(contextMenu(QListViewItem*,const QPoint&,int))); |
SLOT(deviceListViewContextMenu(const QPoint&))); |
65 |
QObject::connect(ui.RefreshDevicesPushButton, |
QObject::connect(ui.RefreshDevicesPushButton, |
66 |
SIGNAL(clicked()), |
SIGNAL(clicked()), |
67 |
SLOT(refreshDevices())); |
SLOT(refreshDevices())); |
68 |
QObject::connect(ui.DriverNameComboBox, |
QObject::connect(ui.DriverNameComboBox, |
69 |
SIGNAL(activated(const QString&)), |
SIGNAL(activated(const QString&)), |
70 |
SLOT(selectDriver(const QString&))); |
SLOT(selectDriver(const QString&))); |
71 |
QObject::connect(ui.DevicePortComboBox, |
QObject::connect(ui.DevicePortComboBox, |
72 |
SIGNAL(activated(int)), |
SIGNAL(activated(int)), |
73 |
SLOT(selectDevicePort(int))); |
SLOT(selectDevicePort(int))); |
553 |
|
|
554 |
|
|
555 |
// Device list view context menu handler. |
// Device list view context menu handler. |
556 |
void DeviceForm::contextMenu ( QTreeWidgetItem* pItem, const QPoint& pos, int ) |
void DeviceForm::deviceListViewContextMenu ( const QPoint& pos ) |
557 |
{ |
{ |
558 |
MainForm *pMainForm = MainForm::getInstance(); |
MainForm *pMainForm = MainForm::getInstance(); |
559 |
if (pMainForm == NULL) |
if (pMainForm == NULL) |
560 |
return; |
return; |
561 |
|
|
562 |
|
QTreeWidgetItem* pItem = ui.DeviceListView->itemAt(pos); |
563 |
|
if (pItem == NULL) |
564 |
|
return; |
565 |
|
|
566 |
int iItemID; |
int iItemID; |
567 |
|
|
568 |
// Build the device context menu... |
// Build the device context menu... |