int QwtWheel::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QwtAbstractSlider::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: setTotalAngle((*reinterpret_cast< double(*)>(_a[1]))); break; case 1: setViewAngle((*reinterpret_cast< double(*)>(_a[1]))); break; default: ; } _id -= 2; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< double*>(_v) = totalAngle(); break; case 1: *reinterpret_cast< double*>(_v) = viewAngle(); break; case 2: *reinterpret_cast< int*>(_v) = tickCnt(); break; case 3: *reinterpret_cast< int*>(_v) = wheelWidth(); break; case 4: *reinterpret_cast< int*>(_v) = borderWidth(); break; case 5: *reinterpret_cast< int*>(_v) = wheelBorderWidth(); break; case 6: *reinterpret_cast< double*>(_v) = mass(); break; } _id -= 7; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setTotalAngle(*reinterpret_cast< double*>(_v)); break; case 1: setViewAngle(*reinterpret_cast< double*>(_v)); break; case 2: setTickCnt(*reinterpret_cast< int*>(_v)); break; case 3: setWheelWidth(*reinterpret_cast< int*>(_v)); break; case 4: setBorderWidth(*reinterpret_cast< int*>(_v)); break; case 5: setWheelBorderWidth(*reinterpret_cast< int*>(_v)); break; case 6: setMass(*reinterpret_cast< double*>(_v)); break; } _id -= 7; } else if (_c == QMetaObject::ResetProperty) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 7; } #endif // QT_NO_PROPERTIES return _id; }
void ViewCameraGL::cameraEvent(ViewEvent * ev){ if (ev->type() == ViewEvent::eCameraSet) { ViewCameraSetEvent * e = (ViewCameraSetEvent *)ev; switch(e->arg5){ case 0: setPosition(e->arg1); break; case 1: setPosition(e->arg1,e->arg3,e->arg4); break; case 2: lookAt(e->arg1,e->arg2); break; case 3: lookAt(getPosition(),e->arg2); break; } } else if (ev->type() == ViewEvent::eCameraGet){ ViewCameraGetEvent * e = (ViewCameraGetEvent *)ev; *e->result = getPosition(); *e->arg1 = getDirection(); *e->arg2 = getUp(); } else if (ev->type() == ViewEvent::eSetViewAngle){ ViewSetViewAngleEvent * e = (ViewSetViewAngleEvent *)ev; setViewAngle(e->arg1); } else if (ev->type() == ViewEvent::eGetViewAngle){ ViewGetViewAngleEvent * e = (ViewGetViewAngleEvent *)ev; *e->result = getDefaultViewAngle(); } }
void ViewCameraGL::setResizePolicy(int value) { __resizePolicy = (eCameraResizePolicy)value; setViewAngle(__default_view_angle); }