52 Prj().GetProjectPath());
59 std::shared_ptr<NET_SETTINGS>& netSettings =
project.NetSettings();
68 for(
const wxString& hidden : localSettings.
m_HiddenNets )
71 hiddenNets.insert( net->GetNetCode() );
77 hiddenNets.insert( net->GetNetCode() );
80 std::map<int, KIGFX::COLOR4D>& netColors = renderSettings->
GetNetColorMap();
83 for(
const auto& [ netname,
color ] : netSettings->m_NetColorAssignments )
85 if(
color != COLOR4D::UNSPECIFIED )
88 netColors[ net->GetNetCode() ] =
color;
93 netclassColors.clear();
95 for(
const auto& [
name, netclass ] : netSettings->m_NetClasses )
96 netclassColors[
name ] = netclass->GetPcbColor();
124 fn.MakeRelativeTo(
Prj().GetProjectPath() );
141 if( !fn.IsDirWritable() )
156 std::shared_ptr<NET_SETTINGS>& netSettings =
project.NetSettings();
161 netSettings->m_NetColorAssignments.clear();
166 netSettings->m_NetColorAssignments[ net->GetNetname() ] =
color;
169 std::map<wxString, KIGFX::COLOR4D>& netclassColors = renderSettings->
GetNetclassColorMap();
172 for(
const auto& [
name, netclass ] : netSettings->m_NetClasses )
174 if( netclassColors.count(
name ) )
175 netclass->SetPcbColor( netclassColors.at(
name ) );
202 if( !fn.IsDirWritable() )
236 localSettings.
m_HiddenNets.emplace_back( net->GetNetname() );
void SetUserLayerPresets(std::vector< LAYER_PRESET > &aPresetList)
std::vector< LAYER_PRESET > GetUserLayerPresets() const
Update the current layer presets from those saved in the project file.
void SetUserViewports(std::vector< VIEWPORT > &aPresetList)
wxString GetActiveLayerPreset() const
std::vector< VIEWPORT > GetUserViewports() const
Update the current viewports from those saved in the project file.
static wxString m_DrawingSheetFileName
the name of the drawing sheet file, or empty to use the default drawing sheet
Container for design settings for a BOARD object.
bool m_UseConnectedTrackWidth
const NETINFO_LIST & GetNetInfo() const
static DS_DATA_MODEL & GetTheInstance()
static function: returns the instance of DS_DATA_MODEL used in the application
static const wxString ResolvePath(const wxString &aPath, const wxString &aProjectPath)
Resolve a path which might be project-relative or contain env variable references.
void LoadWindowState(const wxString &aFileName)
void ShowInfoBarError(const wxString &aErrorMsg, bool aShowCloseButton=false, WX_INFOBAR::MESSAGE_TYPE aType=WX_INFOBAR::MESSAGE_TYPE::GENERIC)
Show the WX_INFOBAR displayed on the top of the canvas with a message and an error icon on the left o...
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
PCB specific render settings.
std::set< int > & GetHiddenNets()
std::map< int, KIGFX::COLOR4D > & GetNetColorMap()
std::map< wxString, KIGFX::COLOR4D > & GetNetclassColorMap()
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
Handle the data for a net.
Container for NETINFO_ITEM elements, which are the nets.
NETINFO_ITEM * GetNetItem(int aNetCode) const
void SetCheckboxesFromFilter(SELECTION_FILTER_OPTIONS &aOptions)
APPEARANCE_CONTROLS * m_appearancePanel
PANEL_SELECTION_FILTER * m_selectionFilterPanel
const PCB_DISPLAY_OPTIONS & GetDisplayOptions() const
Display options control the way tracks, vias, outlines and other things are shown (for instance solid...
virtual PCB_LAYER_ID GetActiveLayer() const
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Returns the BOARD_DESIGN_SETTINGS for the open project.
void SetDisplayOptions(const PCB_DISPLAY_OPTIONS &aOptions, bool aRefresh=true)
Updates the current display options from the given options struct.
double m_TrackOpacity
Opacity override for all tracks.
double m_ZoneOpacity
Opacity override for filled zone areas.
double m_ImageOpacity
Opacity override for user images.
double m_PadOpacity
Opacity override for SMD pads and PTHs.
double m_ViaOpacity
Opacity override for all types of via.
HIGH_CONTRAST_MODE m_ContrastModeDisplay
How inactive layers are displayed.
NET_COLOR_MODE m_NetColorMode
How to use color overrides on specific nets and netclasses.
ZONE_DISPLAY_MODE m_ZoneDisplayMode
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void RecordDRCExclusions()
Scan existing markers and record data from any that are Excluded.
void SaveProjectLocalSettings() override
Save changes to the project local settings.
bool LoadProjectSettings()
Load the current project's file configuration settings which are pertinent to this PCB_EDIT_FRAME ins...
wxString GetCurrentFileName() const override
Get the full filename + path of the currently opened file in the frame.
void saveProjectSettings() override
Saves any design-related project settings associated with this frame.
The backing store for a PROJECT, in JSON format.
The project local settings are things that are attached to a particular project, but also might be pa...
SELECTION_FILTER_OPTIONS m_SelectionFilter
State of the selection filter widget.
double m_PadOpacity
Opacity override for SMD pads and PTH.
double m_ViaOpacity
Opacity override for all types of via.
wxString m_ActiveLayerPreset
The name of a LAYER_PRESET that is currently activated (or blank if none)
double m_TrackOpacity
Opacity override for all tracks.
double m_ZoneOpacity
Opacity override for filled zones.
bool m_AutoTrackWidth
The current setting for whether to automatically adjust track widths to match.
ZONE_DISPLAY_MODE m_ZoneDisplayMode
How zones are drawn.
PCB_LAYER_ID m_ActiveLayer
The current (active) board layer for editing.
HIGH_CONTRAST_MODE m_ContrastModeDisplay
The current contrast mode.
NET_COLOR_MODE m_NetColorMode
The current net color mode.
std::vector< wxString > m_HiddenNets
A list of netnames that have been manually hidden in the board editor.
std::set< wxString > m_HiddenNetclasses
double m_ImageOpacity
Opacity override for user images.
virtual const wxString GetProjectFullName() const
Return the full path and name of the project.
virtual PROJECT_LOCAL_SETTINGS & GetLocalSettings() const
virtual PROJECT_FILE & GetProjectFile() const
virtual bool IsNullProject() const
Check if this project is a null project (i.e.
bool SaveProject(const wxString &aFullPath=wxEmptyString, PROJECT *aProject=nullptr)
Saves a loaded project.
SETTINGS_MANAGER * GetSettingsManager()
This file contains data structures that are saved in the project file or project local settings file ...