bool QLCDNumber::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: display((const QString&)static_QUType_QString.get(_o+1)); break;
    case 1: display((int)static_QUType_int.get(_o+1)); break;
    case 2: display((double)static_QUType_double.get(_o+1)); break;
    case 3: setHexMode(); break;
    case 4: setDecMode(); break;
    case 5: setOctMode(); break;
    case 6: setBinMode(); break;
    case 7: setSmallDecimalPoint((bool)static_QUType_bool.get(_o+1)); break;
    default:
	return QFrame::qt_invoke( _id, _o );
    }
    return TRUE;
}
Ejemplo n.º 2
0
int QLCDNumber::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QFrame::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: overflow(); break;
        case 1: display((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 2: display((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 3: display((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 4: setHexMode(); break;
        case 5: setDecMode(); break;
        case 6: setOctMode(); break;
        case 7: setBinMode(); break;
        case 8: setSmallDecimalPoint((*reinterpret_cast< bool(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 9;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< bool*>(_v) = smallDecimalPoint(); break;
        case 1: *reinterpret_cast< int*>(_v) = numDigits(); break;
        case 2: *reinterpret_cast< int*>(_v) = digitCount(); break;
        case 3: *reinterpret_cast< Mode*>(_v) = mode(); break;
        case 4: *reinterpret_cast< SegmentStyle*>(_v) = segmentStyle(); break;
        case 5: *reinterpret_cast< double*>(_v) = value(); break;
        case 6: *reinterpret_cast< int*>(_v) = intValue(); break;
        }
        _id -= 7;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setSmallDecimalPoint(*reinterpret_cast< bool*>(_v)); break;
        case 1: setNumDigits(*reinterpret_cast< int*>(_v)); break;
        case 2: setDigitCount(*reinterpret_cast< int*>(_v)); break;
        case 3: setMode(*reinterpret_cast< Mode*>(_v)); break;
        case 4: setSegmentStyle(*reinterpret_cast< SegmentStyle*>(_v)); break;
        case 5: display(*reinterpret_cast< double*>(_v)); break;
        case 6: display(*reinterpret_cast< int*>(_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;
}