KiCad PCB EDA Suite
project_local_settings.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 (C) 2020 CERN
5  * @author Jon Evans <jon@craftyjon.com>
6  *
7  * This program is free software: you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the
9  * Free Software Foundation, either version 3 of the License, or (at your
10  * option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef KICAD_PROJECT_LOCAL_SETTINGS_H
22 #define KICAD_PROJECT_LOCAL_SETTINGS_H
23 
26 #include <settings/json_settings.h>
28 
29 class PROJECT;
30 
44 {
45 public:
46  PROJECT_LOCAL_SETTINGS( const wxString& aFilename );
47 
49 
50  bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
51 
52  bool SaveToFile( const wxString& aDirectory = "", bool aForce = false ) override;
53 
54  void SetProject( PROJECT* aProject )
55  {
56  m_project = aProject;
57  }
58 
59 protected:
60 
61  wxString getFileExt() const override
62  {
64  }
65 
66  wxString getLegacyFileExt() const override
67  {
68  return wxT( "NO_SUCH_FILE_EXTENSION" );
69  }
70 
71 private:
72 
75 
76 public:
77 
84 
87 
90 
93 
96 
101  std::vector<wxString> m_HiddenNets;
102 
105 };
106 
107 #endif
LSET m_VisibleLayers
Board settings.
PROJECT holds project specific data.
Definition: project.h:61
wxString getLegacyFileExt() const override
bool MigrateFromLegacy(wxConfigBase *aLegacyConfig) override
Migrates from wxConfig to JSON-based configuration.
The project local settings are things that are attached to a particular project, but also might be pa...
bool SaveToFile(const wxString &aDirectory="", bool aForce=false) override
PCB_LAYER_ID m_ActiveLayer
The current (active) board layer for editing.
PROJECT_LOCAL_SETTINGS(const wxString &aFilename)
wxString getFileExt() const override
const std::string ProjectLocalSettingsFileExtension
PCB_LAYER_ID
A quick note on layer IDs:
LSET is a set of PCB_LAYER_IDs.
GAL_SET m_VisibleItems
The GAL layers (aka items) that are turned on for viewing (.
wxString m_ActiveLayerPreset
The name of a LAYER_PRESET that is currently activated (or blank if none)
PROJECT * m_project
A link to the owning project.
HIGH_CONTRAST_MODE
Determines how inactive layers should be displayed.
Helper for storing and iterating over GAL_LAYER_IDs.
Definition of file extensions used in Kicad.
This file contains data structures that are saved in the project file or project local settings file ...
HIGH_CONTRAST_MODE m_ContrastModeDisplay
The current contrast mode.
Board layer functions and definitions.
std::vector< wxString > m_HiddenNets
A list of netnames that have been manually hidden in the board editor.
SELECTION_FILTER_OPTIONS m_SelectionFilter
State of the selection filter widget.
void SetProject(PROJECT *aProject)