コード例 #1
0
ファイル: Settings.cpp プロジェクト: zmeyc/mapmaker
void Settings::setShowGrid(bool showGrid)
{
    if (showGrid_ == showGrid)
        return;

    showGrid_ = showGrid;
    settings_.setValue(showGridKey, showGrid_);
    emit showGridChanged(showGrid);
}
コード例 #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;
}