int QLCPhysical_Test::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: bulbType(); break; case 1: bulbLumens(); break; case 2: bulbColourTemp(); break; case 3: weight(); break; case 4: width(); break; case 5: height(); break; case 6: depth(); break; case 7: lensName(); break; case 8: lensDegreesMin(); break; case 9: lensDegreesMax(); break; case 10: focusType(); break; case 11: focusPanMax(); break; case 12: focusTiltMax(); break; case 13: powerConsumption(); break; case 14: dmxConnector(); break; case 15: copy(); break; case 16: load(); break; case 17: loadWrongRoot(); break; case 18: save(); break; default: ; } _id -= 19; } return _id; }
int QLCPhysical::powerConsumption() const { if (m_powerConsumption != 0) { return m_powerConsumption; } else { /* If power consumption value is missing, return bulb watts * plus a guesstimate 100W, since there's usually other * electronics consuming power as well. */ int bulbWatts = bulbType().remove(QRegExp("[A-Z]")).toInt(); if (bulbWatts > 0) return bulbWatts + 100; else return 0; } }