Ejemplo n.º 1
0
void Settings::setShowGrid(bool showGrid)
{
    if (showGrid_ == showGrid)
        return;

    showGrid_ = showGrid;
    settings_.setValue(showGridKey, showGrid_);
    emit showGridChanged(showGrid);
}
Ejemplo n.º 2
0
int Tiled::Internal::Preferences::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: showGridChanged((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 1: snapToGridChanged((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 2: useOpenGLChanged((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 3: setShowGrid((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 4: setSnapToGrid((*reinterpret_cast< bool(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 5;
    }
    return _id;
}