Exemplo n.º 1
0
void ScrollZoomer::setVScrollBarMode( Qt::ScrollBarPolicy mode )
{
    if ( vScrollBarMode() != mode )
    {
        d_vScrollData->mode = mode;
        updateScrollBars();
    }
}
Exemplo n.º 2
0
int Q3ScrollView::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = Q3Frame::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 23)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 23;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< ResizePolicy*>(_v) = resizePolicy(); break;
        case 1: *reinterpret_cast< ScrollBarMode*>(_v) = vScrollBarMode(); break;
        case 2: *reinterpret_cast< ScrollBarMode*>(_v) = hScrollBarMode(); break;
        case 3: *reinterpret_cast< int*>(_v) = visibleWidth(); break;
        case 4: *reinterpret_cast< int*>(_v) = visibleHeight(); break;
        case 5: *reinterpret_cast< int*>(_v) = contentsWidth(); break;
        case 6: *reinterpret_cast< int*>(_v) = contentsHeight(); break;
        case 7: *reinterpret_cast< int*>(_v) = contentsX(); break;
        case 8: *reinterpret_cast< int*>(_v) = contentsY(); break;
        case 9: *reinterpret_cast< bool*>(_v) = dragAutoScroll(); break;
        }
        _id -= 10;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setResizePolicy(*reinterpret_cast< ResizePolicy*>(_v)); break;
        case 1: setVScrollBarMode(*reinterpret_cast< ScrollBarMode*>(_v)); break;
        case 2: setHScrollBarMode(*reinterpret_cast< ScrollBarMode*>(_v)); break;
        case 9: setDragAutoScroll(*reinterpret_cast< bool*>(_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;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}