ConfigureMIDIOut::ConfigureMIDIOut(QWidget* parent, MIDIOut* plugin) : QDialog(parent) { Q_ASSERT(plugin != NULL); m_plugin = plugin; /* Setup UI controls */ setupUi(this); m_list->header()->setResizeMode(QHeaderView::ResizeToContents); connect(m_refreshButton, SIGNAL(clicked()), this, SLOT(slotRefreshClicked())); connect(m_editButton, SIGNAL(clicked()), this, SLOT(slotEditClicked())); connect(m_list, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(slotEditClicked())); /* Listen to device additions/removals */ connect(plugin, SIGNAL(deviceRemoved(MIDIDevice*)), this, SLOT(slotDeviceRemoved(MIDIDevice*))); connect(plugin, SIGNAL(deviceAdded(MIDIDevice*)), this, SLOT(slotDeviceAdded(MIDIDevice*))); refreshList(); }
ConfigureUSBDMXOut::ConfigureUSBDMXOut(QWidget* parent, USBDMXOut* plugin) : QDialog(parent) { Q_ASSERT(plugin != NULL); m_plugin = plugin; setupUi(this); connect(m_refreshButton, SIGNAL(clicked()), this, SLOT(slotRefreshClicked())); refreshList(); }
int ConfigureMIDIInput::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDialog::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotDeviceAdded((*reinterpret_cast< MIDIDevice*(*)>(_a[1]))); break; case 1: slotDeviceRemoved((*reinterpret_cast< MIDIDevice*(*)>(_a[1]))); break; case 2: slotRefreshClicked(); break; case 3: slotEditClicked(); break; default: ; } _id -= 4; } return _id; }
ConfigureFTDIDMXOut::ConfigureFTDIDMXOut(QWidget* parent, FTDIDMXOut* plugin) : QDialog(parent) { Q_ASSERT(plugin != NULL); m_plugin = plugin; m_timer = NULL; m_testMod = 1; m_output = KOutputInvalid; setupUi(this); for (unsigned int i = 0; i < sizeof(known_devices) / sizeof(FTDIDevice); i++) { QVariant v; v.setValue(known_devices[i]); m_device->addItem(QString(known_devices[i].name), v); } m_current_pid = known_devices[0].pid; m_current_vid = known_devices[0].vid; // Hide the pid/vid setters for Windows #ifdef WIN32 label->setVisible(false); m_device->setVisible(false); label_2->setVisible(false); m_vid->setVisible(false); label_3->setVisible(false); m_pid->setVisible(false); gridLayout->removeItem(horizontalLayout); #endif connect(m_testButton, SIGNAL(toggled(bool)), this, SLOT(slotTestToggled(bool))); connect(m_refreshButton, SIGNAL(clicked()), this, SLOT(slotRefreshClicked())); connect(m_device, SIGNAL(currentIndexChanged(int)), this, SLOT(slotDeviceChanged(int))); m_plugin->setVIDPID(m_current_vid, m_current_pid); refreshList(); }
ConfigureHID::ConfigureHID(QWidget* parent, HID* plugin) : QDialog(parent) { Q_ASSERT(plugin != NULL); m_plugin = plugin; /* Setup UI controls */ setupUi(this); connect(m_refreshButton, SIGNAL(clicked()), this, SLOT(slotRefreshClicked())); /* Listen to device additions/removals */ connect(plugin, SIGNAL(deviceRemoved(HIDDevice*)), this, SLOT(slotDeviceRemoved(HIDDevice*))); connect(plugin, SIGNAL(deviceAdded(HIDDevice*)), this, SLOT(slotDeviceAdded(HIDDevice*))); refreshList(); }
ConfigureDMX4LinuxOut::ConfigureDMX4LinuxOut(QWidget* parent, DMX4LinuxOut* plugin) : QDialog(parent) { Q_ASSERT(plugin != NULL); m_plugin = plugin; m_timer = NULL; m_testMod = 1; m_testUniverse = -1; setupUi(this); connect(m_testButton, SIGNAL(toggled(bool)), this, SLOT(slotTestToggled(bool))); connect(m_refreshButton, SIGNAL(clicked()), this, SLOT(slotRefreshClicked())); connect(m_okButton, SIGNAL(clicked()), this, SLOT(accept())); connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject())); refreshList(); }