47 #include <wx/treebook.h> 56 book->AddPage(
new wxPanel( book ),
_(
"PCB Editor" ) );
77 Prj().GetProjectPath());
90 GetCanvas()->GetView()->GetPainter()->GetSettings() );
95 for(
const wxString& hidden : localSettings.
m_HiddenNets )
98 hiddenNets.insert( net->GetNetCode() );
106 if( pair.second == COLOR4D::UNSPECIFIED )
110 netColors[ net->GetNetCode() ] = pair.second;
114 netclassColors.clear();
117 netclassColors[pair.first] = pair.second->GetPcbColor();
144 fn.MakeRelativeTo(
Prj().GetProjectPath() );
161 if( !fn.IsDirWritable() )
197 GetCanvas()->GetView()->GetPainter()->GetSettings() );
206 localSettings.
m_HiddenNets.emplace_back( net->GetNetname() );
213 for(
const std::pair<const int, KIGFX::COLOR4D>& pair : rs->
GetNetColorMap() )
222 for(
const std::pair<const wxString, NETCLASSPTR>& pair : netSettings.
m_NetClasses )
224 if( netclassColors.count( pair.first ) )
225 pair.second->SetPcbColor( netclassColors.at( pair.first ) );
242 if( !
Prj().IsNullProject() && fn.Exists() )
std::set< int > & GetHiddenNets()
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Returns the BOARD_DESIGN_SETTINGS for the open project.
SETTINGS_MANAGER * GetSettingsManager() const
bool SaveProject(const wxString &aFullPath=wxEmptyString, PROJECT *aProject=nullptr)
Saves a loaded project.
double m_TrackOpacity
Opacity override for all tracks.
std::map< wxString, KIGFX::COLOR4D > m_PcbNetColors
A map of fully-qualified net names to colors used in the board context.
APPEARANCE_CONTROLS * m_appearancePanel
double m_TrackOpacity
Opacity override for all tracks.
ZONE_DISPLAY_MODE m_ZoneDisplayMode
How zones are drawn.
virtual PROJECT_FILE & GetProjectFile() const
std::map< wxString, KIGFX::COLOR4D > & GetNetclassColorMap()
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
double m_ViaOpacity
Opacity override for all types of via.
The project local settings are things that are attached to a particular project, but also might be pa...
double m_ViaOpacity
Opacity override for all types of via.
bool LoadProjectSettings()
Load the current project's file configuration settings which are pertinent to this PCB_EDIT_FRAME ins...
const NETINFO_LIST & GetNetInfo() const
void AddHotKeys(TOOL_MANAGER *aToolMgr)
NET_COLOR_MODE m_NetColorMode
The current net color mode.
PCB_LAYER_ID m_ActiveLayer
The current (active) board layer for editing.
void RecordDRCExclusions()
Scan existing markers and record data from any that are Excluded.
const PCB_DISPLAY_OPTIONS & GetDisplayOptions() const
Display options control the way tracks, vias, outlines and other things are shown (for instance solid...
void LoadWindowState(const wxString &aFileName)
The backing store for a PROJECT, in JSON format.
bool m_UseConnectedTrackWidth
virtual PROJECT_LOCAL_SETTINGS & GetLocalSettings() const
Board plot function definition file.
double m_PadOpacity
Opacity override for SMD pads and PTH.
wxTreebook * GetTreebook()
virtual PCB_LAYER_ID GetActiveLayer() const
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...
PCB specific render settings.
static const wxString ResolvePath(const wxString &aPath, const wxString &aProjectPath)
Resolve a path which might be project-relative or contain env variable references.
RATSNEST_MODE m_RatsnestMode
Ratsnest draw mode (all layers vs only visible layers)
void SetDisplayOptions(const PCB_DISPLAY_OPTIONS &aOptions, bool aRefresh=true)
Updates the current display options from the given options struct.
Container for display options like enable/disable some optional drawings.
static DS_DATA_MODEL & GetTheInstance()
static function: returns the instance of DS_DATA_MODEL used in the application
void SetCheckboxesFromFilter(SELECTION_FILTER_OPTIONS &aOptions)
wxString m_ActiveLayerPreset
The name of a LAYER_PRESET that is currently activated (or blank if none)
Container for NETINFO_ITEM elements, which are the nets.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
void SaveProjectSettings() override
Save changes to the project settings to the project (.pro) file.
RATSNEST_MODE m_RatsnestMode
The current ratsnest draw mode.
NET_SETTINGS stores various net-related settings in a project context.
HIGH_CONTRAST_MODE m_ContrastModeDisplay
How inactive layers are displayed.
bool m_AutoTrackWidth
The current setting for whether to automatically adjust track widths to match.
This file contains data structures that are saved in the project file or project local settings file ...
virtual const wxString GetProjectFullName() const
Return the full path and name of the project.
double m_ZoneOpacity
Opacity override for filled zones.
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.
double m_ZoneOpacity
Opacity override for filled zone areas.
Handle the data for a net.
double m_PadOpacity
Opacity override for SMD pads and PTHs.
HIGH_CONTRAST_MODE m_ContrastModeDisplay
The current contrast mode.
void InstallPreferences(PAGED_DIALOG *aParent, PANEL_HOTKEYS_EDITOR *aHotkeysPanel) override
Allow Pcbnew to install its preferences panel into the preferences dialog.
PANEL_SELECTION_FILTER * m_selectionFilterPanel
static wxString m_DrawingSheetFileName
the name of the drawing sheet file, or empty to use the default drawing sheet
ZONE_DISPLAY_MODE m_ZoneDisplayMode
wxString GetActiveLayerPreset() const
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.
std::map< int, KIGFX::COLOR4D > & GetNetColorMap()
NETINFO_ITEM * GetNetItem(int aNetCode) const
wxString GetCurrentFileName() const override
Get the full filename + path of the currently opened file in the frame.
NET_COLOR_MODE m_NetColorMode
How to use color overrides on specific nets and netclasses.
Container for design settings for a BOARD object.