bool QDial::qt_invoke( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: setValue((int)static_QUType_int.get(_o+1)); break; case 1: addLine(); break; case 2: subtractLine(); break; case 3: addPage(); break; case 4: subtractPage(); break; case 5: setNotchesVisible((bool)static_QUType_bool.get(_o+1)); break; case 6: setWrapping((bool)static_QUType_bool.get(_o+1)); break; case 7: setTracking((bool)static_QUType_bool.get(_o+1)); break; default: return QWidget::qt_invoke( _id, _o ); } return TRUE; }
int QDial::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QAbstractSlider::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) = wrapping(); break; case 1: *reinterpret_cast< int*>(_v) = notchSize(); break; case 2: *reinterpret_cast< qreal*>(_v) = notchTarget(); break; case 3: *reinterpret_cast< bool*>(_v) = notchesVisible(); break; } _id -= 4; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setWrapping(*reinterpret_cast< bool*>(_v)); break; case 2: setNotchTarget(*reinterpret_cast< qreal*>(_v)); break; case 3: setNotchesVisible(*reinterpret_cast< bool*>(_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; }
SamDial::SamDial( QWidget* parent ) : QDial( parent ) { setNotchesVisible( true ); }
bool QDial::qt_property( int id, int f, QVariant* v) { switch ( id - staticMetaObject()->propertyOffset() ) { case 0: switch( f ) { case 0: setTracking(v->asBool()); break; case 1: *v = QVariant( this->tracking(), 0 ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 1: switch( f ) { case 0: setWrapping(v->asBool()); break; case 1: *v = QVariant( this->wrapping(), 0 ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 2: switch( f ) { case 1: *v = QVariant( this->notchSize() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 3: switch( f ) { case 0: setNotchTarget(v->asDouble()); break; case 1: *v = QVariant( this->notchTarget() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 4: switch( f ) { case 0: setNotchesVisible(v->asBool()); break; case 1: *v = QVariant( this->notchesVisible(), 0 ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 5: switch( f ) { case 0: setMinValue(v->asInt()); break; case 1: *v = QVariant( this->minValue() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 6: switch( f ) { case 0: setMaxValue(v->asInt()); break; case 1: *v = QVariant( this->maxValue() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 7: switch( f ) { case 0: setLineStep(v->asInt()); break; case 1: *v = QVariant( this->lineStep() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 8: switch( f ) { case 0: setPageStep(v->asInt()); break; case 1: *v = QVariant( this->pageStep() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; case 9: switch( f ) { case 0: setValue(v->asInt()); break; case 1: *v = QVariant( this->value() ); break; case 3: case 4: case 5: break; default: return FALSE; } break; default: return QWidget::qt_property( id, f, v ); } return TRUE; }