void VCCueList::setChaserID(quint32 fid) { bool running = false; if (m_chaserID == fid) return; Function *current = m_doc->function(m_chaserID); Function *function = m_doc->function(fid); if (current != NULL) { /* Get rid of old function connections */ disconnect(current, SIGNAL(running(quint32)), this, SLOT(slotFunctionRunning(quint32))); disconnect(current, SIGNAL(stopped(quint32)), this, SLOT(slotFunctionStopped(quint32))); disconnect(current, SIGNAL(currentStepChanged(int)), this, SLOT(slotCurrentStepChanged(int))); if(current->isRunning()) { running = true; current->stop(functionParent()); } }
void VCCueList::setChaser(quint32 id) { Function *old = m_doc->function(m_chaserID); if (old != NULL) { /* Get rid of old function connections */ disconnect(old, SIGNAL(running(quint32)), this, SLOT(slotFunctionRunning(quint32))); disconnect(old, SIGNAL(stopped(quint32)), this, SLOT(slotFunctionStopped(quint32))); disconnect(old, SIGNAL(currentStepChanged(int)), this, SLOT(slotCurrentStepChanged(int))); }
void VCButton::setFunction(quint32 fid) { bool running = false; Function* current = m_doc->function(m_function); if (current != NULL) { /* Get rid of old function connections */ disconnect(current, SIGNAL(running(quint32)), this, SLOT(slotFunctionRunning(quint32))); disconnect(current, SIGNAL(stopped(quint32)), this, SLOT(slotFunctionStopped(quint32))); disconnect(current, SIGNAL(flashing(quint32,bool)), this, SLOT(slotFunctionFlashing(quint32,bool))); if(current->isRunning()) { running = true; current->stop(); } }
int VCButton::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = VCWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: functionStarting(); break; case 1: slotChooseIcon(); break; case 2: slotResetIcon(); break; case 3: slotKeyPressed((*reinterpret_cast< const QKeySequence(*)>(_a[1]))); break; case 4: slotKeyReleased((*reinterpret_cast< const QKeySequence(*)>(_a[1]))); break; case 5: slotInputValueChanged((*reinterpret_cast< quint32(*)>(_a[1])),(*reinterpret_cast< quint32(*)>(_a[2])),(*reinterpret_cast< uchar(*)>(_a[3]))); break; case 6: slotFunctionRemoved((*reinterpret_cast< quint32(*)>(_a[1]))); break; case 7: slotFunctionRunning((*reinterpret_cast< quint32(*)>(_a[1]))); break; case 8: slotFunctionStopped((*reinterpret_cast< quint32(*)>(_a[1]))); break; case 9: slotFunctionFlashing((*reinterpret_cast< quint32(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break; case 10: slotBlinkReady(); break; default: ; } _id -= 11; } return _id; }