void VCButton::setFunctionID(quint32 fid) { bool running = false; if (m_functionID == fid) return; Function* current = m_doc->function(m_functionID); 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(functionParent()); } }
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; }