/** load component properties * copyLoad is true, if the load function is used as a copy function * Returns true if successful */ bool BooleanLed::load(KSimData & file, bool copyLoad) { setOnColor(file.readColorEntry("Color",&BooleanLed::defaultColor)); QColor def = QColor(); setOffColor(file.readColorEntry("Off Color",&def)); return ComponentStyle::load(file, copyLoad); }
int QLed::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 5) qt_static_metacall(this, _c, _id, _a); _id -= 5; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< bool*>(_v) = value(); break; case 1: *reinterpret_cast< ledColor*>(_v) = onColor(); break; case 2: *reinterpret_cast< ledColor*>(_v) = offColor(); break; case 3: *reinterpret_cast< ledShape*>(_v) = shape(); break; } _id -= 4; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setValue(*reinterpret_cast< bool*>(_v)); break; case 1: setOnColor(*reinterpret_cast< ledColor*>(_v)); break; case 2: setOffColor(*reinterpret_cast< ledColor*>(_v)); break; case 3: setShape(*reinterpret_cast< ledShape*>(_v)); break; } _id -= 4; } else if (_c == QMetaObject::ResetProperty) { _id -= 4; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 4; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 4; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 4; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 4; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 4; } #endif // QT_NO_PROPERTIES return _id; }