KiCad PCB EDA Suite
Loading...
Searching...
No Matches
snap_settings_params.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 3
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef SETTINGS_SNAP_SETTINGS_PARAMS_H
21#define SETTINGS_SNAP_SETTINGS_PARAMS_H
22
23#include <vector>
24
25#include <settings/parameters.h>
27
34inline void AddSnapInferenceParams( std::vector<PARAM_BASE*>& aParams, SNAP_INFERENCE_SETTINGS& aSettings )
35{
36 const SNAP_INFERENCE_SETTINGS defaults;
37
38 aParams.emplace_back( new PARAM<bool>( "editing.snap_object_geometry", &aSettings.objectGeometry,
39 defaults.objectGeometry ) );
40
41 aParams.emplace_back( new PARAM<bool>( "editing.snap_construction_extensions",
42 &aSettings.constructionExtensions, defaults.constructionExtensions ) );
43
44 aParams.emplace_back( new PARAM<bool>( "editing.snap_tangent_normal", &aSettings.tangentNormal,
45 defaults.tangentNormal ) );
46
47 aParams.emplace_back( new PARAM<bool>( "editing.snap_alignment_distribution",
48 &aSettings.alignmentDistribution, defaults.alignmentDistribution ) );
49}
50
51#endif
void AddSnapInferenceParams(std::vector< PARAM_BASE * > &aParams, SNAP_INFERENCE_SETTINGS &aSettings)
Register the snap inference parameters.