void Settings::setSnapToGrid(bool snapToGrid) { if (snapToGrid_ == snapToGrid) return; snapToGrid_ = snapToGrid; settings_.setValue(snapToGridKey, snapToGrid_); emit snapToGridChanged(snapToGrid); }
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; }