21#ifndef KICAD_BOARD_PROJECT_SETTINGS_H
22#define KICAD_BOARD_PROJECT_SETTINGS_H
29#include <nlohmann/json.hpp>
77 return ( footprints ||
text || tracks || vias || pads || graphics || zones
78 || keepouts || dimensions || otherItems );
86 return ( footprints &&
text && tracks && vias && pads && graphics && zones
87 && keepouts && dimensions && otherItems );
145 layers(
LSET::AllLayersMask() ),
146 renderLayers(
GAL_SET::DefaultVisible() ),
155 layers( aVisibleLayers ),
156 renderLayers(
GAL_SET::DefaultVisible() ),
157 flipBoard( aFlipBoard ),
166 layers( aVisibleLayers ),
167 renderLayers( aVisibleObjects ),
168 flipBoard( aFlipBoard ),
169 activeLayer( aActiveLayer )
191 PARAM_LAYER_PRESET(
const std::string& aPath, std::vector<LAYER_PRESET>* aPresetList );
193 static void MigrateToV9Layers( nlohmann::json& aJson );
196 nlohmann::json presetsToJson();
198 void jsonToPresets(
const nlohmann::json& aJson );
206 VIEWPORT(
const wxString& aName = wxEmptyString ) :
223 PARAM_VIEWPORT(
const std::string& aPath, std::vector<VIEWPORT>* aViewportList );
226 nlohmann::json viewportsToJson();
228 void jsonToViewports(
const nlohmann::json& aJson );
242 matrix(
std::
move( aViewMatrix ) )
253 PARAM_VIEWPORT3D(
const std::string& aPath, std::vector<VIEWPORT3D>* aViewportList );
256 nlohmann::json viewportsToJson();
258 void jsonToViewports(
const nlohmann::json & aJson );
273 m_layerA( a ), m_layerB( b )
305 m_pair(
std::
move( aPair ) ), m_enabled( aEnabled), m_name(
std::
move( aName ) )
311 const std::optional<wxString>&
GetName()
const {
return m_name; }
313 void SetName(
const wxString& aNewName ) { m_name = aNewName; }
317 void SetEnabled(
bool aNewEnabled ) { m_enabled = aNewEnabled; }
321 bool m_enabled =
true;
329 PARAM_LAYER_PAIRS(
const std::string& aPath, std::vector<LAYER_PAIR_INFO>& m_layerPairInfos );
332 nlohmann::json layerPairsToJson();
334 void jsonToLayerPairs(
const nlohmann::json& aJson );
364 filter_by_net_name =
true;
365 filter_by_netclass =
true;
366 group_by_netclass =
false;
367 group_by_constraint =
false;
368 show_zero_pad_nets =
false;
369 show_unconnected_nets =
false;
371 sort_order_asc =
true;
HIGH_CONTRAST_MODE
Determine how inactive layers should be displayed.
@ NORMAL
Inactive layers are shown normally (no high-contrast mode)
@ HIDDEN
Inactive layers are hidden.
@ DIMMED
Inactive layers are dimmed (old high-contrast mode)
@ RATSNEST
Net/netclass colors are shown on ratsnest lines only.
@ ALL
Net/netclass colors are shown on all net copper.
@ OFF
Net (and netclass) colors are not shown.
@ VISIBLE
Ratsnest lines are drawn to items on visible layers only.
Helper for storing and iterating over GAL_LAYER_IDs.
All information about a layer pair as stored in the layer pair store.
const LAYER_PAIR & GetLayerPair() const
void SetName(const wxString &aNewName)
const std::optional< wxString > & GetName() const
std::optional< wxString > m_name
void SetEnabled(bool aNewEnabled)
LAYER_PAIR_INFO(LAYER_PAIR aPair, bool aEnabled, std::optional< wxString > aName)
PCB_LAYER_ID GetLayerA() const
void SetLayerB(PCB_LAYER_ID aLayer)
PCB_LAYER_ID GetLayerB() const
LAYER_PAIR(PCB_LAYER_ID a, PCB_LAYER_ID b)
void SetLayerA(PCB_LAYER_ID aLayer)
bool HasSameLayers(const LAYER_PAIR &aOther) const
LSET is a set of PCB_LAYER_IDs.
Like a normal param, but with custom getter and setter functions.
std::vector< LAYER_PAIR_INFO > & m_layerPairInfos
std::vector< LAYER_PRESET > * m_presets
std::vector< VIEWPORT3D > * m_viewports
std::vector< VIEWPORT > * m_viewports
PCB_LAYER_ID
A quick note on layer IDs:
wxString mfg
Manufacturer name column.
wxString MPN
Manufacturer part number column.
wxString id
Internal ID column.
wxString dist
Distributor name column.
wxString distPN
Distributor part number column.
A saved set of layers that are visible.
GAL_SET renderLayers
Render layers (e.g. object types) that are visible.
wxString name
A name for this layer set.
LAYER_PRESET(const wxString &aName=wxS(""))
bool flipBoard
True if the flip board is enabled.
LSET layers
Board layers that are visible.
bool readOnly
True if this is a read-only (built-in) preset.
bool LayersMatch(const LAYER_PRESET &aOther)
PCB_LAYER_ID activeLayer
Optional layer to set active when this preset is loaded.
LAYER_PRESET(const wxString &aName, const LSET &aVisibleLayers, bool aFlipBoard)
LAYER_PRESET(const wxString &aName, const LSET &aVisibleLayers, const GAL_SET &aVisibleObjects, PCB_LAYER_ID aActiveLayer, bool aFlipBoard)
Persisted state for the net inspector panel.
std::vector< int > col_order
std::vector< bool > col_hidden
std::vector< wxString > expanded_rows
std::vector< int > col_widths
std::vector< wxString > custom_group_rules
bool show_unconnected_nets
PANEL_NET_INSPECTOR_SETTINGS()
This file contains data structures that are saved in the project file or project local settings file ...
bool otherItems
Anything not fitting one of the above categories.
bool vias
Vias (all types>
bool keepouts
Keepout zones.
bool graphics
Graphic lines, shapes, polygons.
bool footprints
Allow selecting entire footprints.
bool text
Text (free or attached to a footprint)
PCB_SELECTION_FILTER_OPTIONS()
bool lockedItems
Allow selecting locked items.
bool tracks
Copper tracks.
bool dimensions
Dimension items.
VIEWPORT3D(const wxString &aName=wxEmptyString)
VIEWPORT3D(const wxString &aName, glm::mat4 aViewMatrix)
VIEWPORT(const wxString &aName, const BOX2D &aRect)
VIEWPORT(const wxString &aName=wxEmptyString)