int QwtThermo::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) { switch (_id) { case 0: setValue((*reinterpret_cast< double(*)>(_a[1]))); break; default: ; } _id -= 1; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< bool*>(_v) = alarmEnabled(); break; case 1: *reinterpret_cast< double*>(_v) = alarmLevel(); break; case 2: *reinterpret_cast< ScalePos*>(_v) = scalePosition(); break; case 3: *reinterpret_cast< int*>(_v) = spacing(); break; case 4: *reinterpret_cast< int*>(_v) = borderWidth(); break; case 5: *reinterpret_cast< double*>(_v) = maxValue(); break; case 6: *reinterpret_cast< double*>(_v) = minValue(); break; case 7: *reinterpret_cast< int*>(_v) = pipeWidth(); break; case 8: *reinterpret_cast< double*>(_v) = value(); break; } _id -= 9; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setAlarmEnabled(*reinterpret_cast< bool*>(_v)); break; case 1: setAlarmLevel(*reinterpret_cast< double*>(_v)); break; case 2: setScalePosition(*reinterpret_cast< ScalePos*>(_v)); break; case 3: setSpacing(*reinterpret_cast< int*>(_v)); break; case 4: setBorderWidth(*reinterpret_cast< int*>(_v)); break; case 5: setMaxValue(*reinterpret_cast< double*>(_v)); break; case 6: setMinValue(*reinterpret_cast< double*>(_v)); break; case 7: setPipeWidth(*reinterpret_cast< int*>(_v)); break; case 8: setValue(*reinterpret_cast< double*>(_v)); break; } _id -= 9; } else if (_c == QMetaObject::ResetProperty) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 9; } #endif // QT_NO_PROPERTIES return _id; }
int QwtThermo::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QwtAbstractScale::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 1) qt_static_metacall(this, _c, _id, _a); _id -= 1; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 1) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 1; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< Qt::Orientation*>(_v) = orientation(); break; case 1: *reinterpret_cast< ScalePosition*>(_v) = scalePosition(); break; case 2: *reinterpret_cast< OriginMode*>(_v) = originMode(); break; case 3: *reinterpret_cast< bool*>(_v) = alarmEnabled(); break; case 4: *reinterpret_cast< double*>(_v) = alarmLevel(); break; case 5: *reinterpret_cast< double*>(_v) = origin(); break; case 6: *reinterpret_cast< int*>(_v) = spacing(); break; case 7: *reinterpret_cast< int*>(_v) = borderWidth(); break; case 8: *reinterpret_cast< int*>(_v) = pipeWidth(); break; case 9: *reinterpret_cast< double*>(_v) = value(); break; } _id -= 10; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setOrientation(*reinterpret_cast< Qt::Orientation*>(_v)); break; case 1: setScalePosition(*reinterpret_cast< ScalePosition*>(_v)); break; case 2: setOriginMode(*reinterpret_cast< OriginMode*>(_v)); break; case 3: setAlarmEnabled(*reinterpret_cast< bool*>(_v)); break; case 4: setAlarmLevel(*reinterpret_cast< double*>(_v)); break; case 5: setOrigin(*reinterpret_cast< double*>(_v)); break; case 6: setSpacing(*reinterpret_cast< int*>(_v)); break; case 7: setBorderWidth(*reinterpret_cast< int*>(_v)); break; case 8: setPipeWidth(*reinterpret_cast< int*>(_v)); break; case 9: setValue(*reinterpret_cast< double*>(_v)); break; } _id -= 10; } else if (_c == QMetaObject::ResetProperty) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 10; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 10; } else if (_c == QMetaObject::RegisterPropertyMetaType) { if (_id < 10) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 10; } #endif // QT_NO_PROPERTIES return _id; }
void LinearGauge::saveSettings( QSettings& pSettings ) { // Range pSettings.setValue("orientation", orientation()); pSettings.setValue("scalePosition", scalePosition()); pSettings.setValue("minValue", minValue()); pSettings.setValue("maxValue", maxValue()); // Ticks pSettings.setValue("scaleMaxMajor", scaleMaxMajor()); pSettings.setValue("scaleMaxMinor", scaleMaxMinor()); pSettings.setValue("labels", scaleDraw()->hasComponent( QwtAbstractScaleDraw::Labels )); pSettings.setValue("font", font().family()); pSettings.setValue("fontSize", font().pointSize()); // Pipe pSettings.setValue("value", value()); pSettings.setValue("pipeWidth", pipeWidth()); pSettings.setValue("pipeColor", fillBrush().color().rgb()); // Alarm pSettings.setValue("alarmEnabled", alarmEnabled()); pSettings.setValue("alarmLevel", alarmLevel()); pSettings.setValue("alarmBrush", alarmBrush().color().rgb()); // Color pSettings.setValue("textColor", textColor().rgb()); pSettings.setValue("backgroundColor", backgroundColor().rgb()); AbstractGauge::saveSettings( pSettings ); }