示例#1
0
int CodesObject::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = TSqlObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    
#ifndef QT_NO_PROPERTIES
     if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< int*>(_v) = getid(); break;
        case 1: *reinterpret_cast< QString*>(_v) = gettitle(); break;
        case 2: *reinterpret_cast< QString*>(_v) = getcode(); break;
        case 3: *reinterpret_cast< QString*>(_v) = getcode_url(); break;
        case 4: *reinterpret_cast< int*>(_v) = getstatus(); break;
        case 5: *reinterpret_cast< QDateTime*>(_v) = getcreated_at(); break;
        case 6: *reinterpret_cast< QDateTime*>(_v) = getupdated_at(); break;
        case 7: *reinterpret_cast< int*>(_v) = geteditable(); break;
        case 8: *reinterpret_cast< int*>(_v) = getuser_id(); break;
        case 9: *reinterpret_cast< QString*>(_v) = getshow_from(); break;
        }
        _id -= 10;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setid(*reinterpret_cast< int*>(_v)); break;
        case 1: settitle(*reinterpret_cast< QString*>(_v)); break;
        case 2: setcode(*reinterpret_cast< QString*>(_v)); break;
        case 3: setcode_url(*reinterpret_cast< QString*>(_v)); break;
        case 4: setstatus(*reinterpret_cast< int*>(_v)); break;
        case 5: setcreated_at(*reinterpret_cast< QDateTime*>(_v)); break;
        case 6: setupdated_at(*reinterpret_cast< QDateTime*>(_v)); break;
        case 7: seteditable(*reinterpret_cast< int*>(_v)); break;
        case 8: setuser_id(*reinterpret_cast< int*>(_v)); break;
        case 9: setshow_from(*reinterpret_cast< QString*>(_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;
}
int PostObject::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = TSqlObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    
#ifndef QT_NO_PROPERTIES
     if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< int*>(_v) = getid(); break;
        case 1: *reinterpret_cast< int*>(_v) = getblog_id(); break;
        case 2: *reinterpret_cast< QString*>(_v) = gettitle(); break;
        case 3: *reinterpret_cast< QString*>(_v) = getcontent(); break;
        case 4: *reinterpret_cast< QDateTime*>(_v) = getcreated_at(); break;
        case 5: *reinterpret_cast< QDateTime*>(_v) = getupdated_at(); break;
        case 6: *reinterpret_cast< int*>(_v) = getlock_revision(); break;
        }
        _id -= 7;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setid(*reinterpret_cast< int*>(_v)); break;
        case 1: setblog_id(*reinterpret_cast< int*>(_v)); break;
        case 2: settitle(*reinterpret_cast< QString*>(_v)); break;
        case 3: setcontent(*reinterpret_cast< QString*>(_v)); break;
        case 4: setcreated_at(*reinterpret_cast< QDateTime*>(_v)); break;
        case 5: setupdated_at(*reinterpret_cast< QDateTime*>(_v)); break;
        case 6: setlock_revision(*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;
}