KiCad PCB EDA Suite
LAYER_PRESET Struct Reference

A saved set of layers that are visible. More...

#include <board_project_settings.h>

Public Member Functions

 LAYER_PRESET (const wxString &aName=wxEmptyString)
 
 LAYER_PRESET (const wxString &aName, const LSET &aVisibleLayers)
 
 LAYER_PRESET (const wxString &aName, const LSET &aVisibleLayers, const GAL_SET &aVisibleObjects, PCB_LAYER_ID aActiveLayer)
 
bool LayersMatch (const LAYER_PRESET &aOther)
 

Public Attributes

wxString name
 A name for this layer set. More...
 
LSET layers
 Board layers that are visible. More...
 
GAL_SET renderLayers
 Render layers (e.g. object types) that are visible. More...
 
PCB_LAYER_ID activeLayer
 Optional layer to set active when this preset is loaded. More...
 
bool readOnly
 True if this is a read-only (built-in) preset. More...
 

Detailed Description

A saved set of layers that are visible.

Definition at line 121 of file board_project_settings.h.

Constructor & Destructor Documentation

◆ LAYER_PRESET() [1/3]

LAYER_PRESET::LAYER_PRESET ( const wxString &  aName = wxEmptyString)
inline

Definition at line 129 of file board_project_settings.h.

129  :
130  name( aName ),
132  {
135  readOnly = false;
136  }
GAL_SET renderLayers
Render layers (e.g. object types) that are visible.
PCB_LAYER_ID activeLayer
Optional layer to set active when this preset is loaded.
wxString name
A name for this layer set.
bool readOnly
True if this is a read-only (built-in) preset.
static GAL_SET DefaultVisible()
Definition: lset.cpp:926
static LSET AllLayersMask()
Definition: lset.cpp:787
LSET layers
Board layers that are visible.

References LSET::AllLayersMask(), GAL_SET::DefaultVisible(), layers, readOnly, and renderLayers.

◆ LAYER_PRESET() [2/3]

LAYER_PRESET::LAYER_PRESET ( const wxString &  aName,
const LSET aVisibleLayers 
)
inline

Definition at line 138 of file board_project_settings.h.

138  :
139  name( aName ),
140  layers( aVisibleLayers ),
142  {
144  readOnly = false;
145  }
GAL_SET renderLayers
Render layers (e.g. object types) that are visible.
PCB_LAYER_ID activeLayer
Optional layer to set active when this preset is loaded.
wxString name
A name for this layer set.
bool readOnly
True if this is a read-only (built-in) preset.
static GAL_SET DefaultVisible()
Definition: lset.cpp:926
LSET layers
Board layers that are visible.

References GAL_SET::DefaultVisible(), readOnly, and renderLayers.

◆ LAYER_PRESET() [3/3]

LAYER_PRESET::LAYER_PRESET ( const wxString &  aName,
const LSET aVisibleLayers,
const GAL_SET aVisibleObjects,
PCB_LAYER_ID  aActiveLayer 
)
inline

Definition at line 147 of file board_project_settings.h.

148  :
149  name( aName ),
150  layers( aVisibleLayers ),
151  renderLayers( aVisibleObjects ),
152  activeLayer( aActiveLayer )
153  {
154  readOnly = false;
155  }
GAL_SET renderLayers
Render layers (e.g. object types) that are visible.
PCB_LAYER_ID activeLayer
Optional layer to set active when this preset is loaded.
wxString name
A name for this layer set.
bool readOnly
True if this is a read-only (built-in) preset.
LSET layers
Board layers that are visible.

References readOnly.

Member Function Documentation

◆ LayersMatch()

bool LAYER_PRESET::LayersMatch ( const LAYER_PRESET aOther)
inline

Definition at line 157 of file board_project_settings.h.

158  {
159  return aOther.layers == layers && aOther.renderLayers == renderLayers;
160  }
GAL_SET renderLayers
Render layers (e.g. object types) that are visible.
LSET layers
Board layers that are visible.

References layers, and renderLayers.

Member Data Documentation

◆ activeLayer

PCB_LAYER_ID LAYER_PRESET::activeLayer

Optional layer to set active when this preset is loaded.

Definition at line 126 of file board_project_settings.h.

Referenced by APPEARANCE_CONTROLS::doApplyLayerPreset(), and PARAM_LAYER_PRESET::jsonToPresets().

◆ layers

◆ name

◆ readOnly

bool LAYER_PRESET::readOnly

True if this is a read-only (built-in) preset.

Definition at line 127 of file board_project_settings.h.

Referenced by APPEARANCE_CONTROLS::ApplyLayerPreset(), LAYER_PRESET(), and APPEARANCE_CONTROLS::onLayerPresetChanged().

◆ renderLayers

GAL_SET LAYER_PRESET::renderLayers

Render layers (e.g. object types) that are visible.

Definition at line 125 of file board_project_settings.h.

Referenced by APPEARANCE_CONTROLS::doApplyLayerPreset(), PARAM_LAYER_PRESET::jsonToPresets(), LAYER_PRESET(), and LayersMatch().


The documentation for this struct was generated from the following file: