KiCad PCB EDA Suite
eeschema_config.cpp File Reference

Go to the source code of this file.

Classes

class  PARAM_CFG_SEVERITIES
 

Macros

#define FieldNameTemplatesKey   wxT( "FieldNameTemplates" )
 

Functions

int GetSeverity (int aErrorCode)
 
void SetSeverity (int aErrorCode, int aSeverity)
 
int GetDefaultBusThickness ()
 Default line thickness used to draw/plot busses. More...
 
void SetDefaultBusThickness (int aThickness)
 
int GetDefaultWireThickness ()
 Default line thickness used to draw/plot wires. More...
 
void SetDefaultWireThickness (int aThickness)
 
int GetDefaultTextSize ()
 Default size for text in general. More...
 
void SetDefaultTextSize (int aTextSize)
 
int GetDefaultLineThickness ()
 Default line thickness used to draw/plot items having a default thickness line value (i.e. More...
 
void SetDefaultLineThickness (int aThickness)
 
double GetTextOffsetRatio ()
 Amount to offset text above/below wires & busses. More...
 
void SetTextOffsetRatio (double aOffsetRatio)
 
bool GetSelectionTextAsBox ()
 Draw selected text items as box. More...
 
void SetSelectionTextAsBox (bool aBool)
 
bool GetSelectionDrawChildItems ()
 Draw selected child items or not. More...
 
void SetSelectionDrawChildItems (bool aBool)
 
bool GetSelectionFillShapes ()
 Draw selected shapes as filled or not. More...
 
void SetSelectionFillShapes (bool aBool)
 
int GetSelectionThickness ()
 Selection highlight thickness. More...
 
void SetSelectionThickness (int aThickness)
 
COLOR4D GetLayerColor (SCH_LAYER_ID aLayer)
 Helper for all the old plotting/printing code while it still exists. More...
 
COLOR4D GetInvisibleItemColor ()
 

Variables

static int s_defaultBusThickness = Mils2iu( DEFAULTBUSTHICKNESS )
 
static int s_defaultWireThickness = Mils2iu( DEFAULTDRAWLINETHICKNESS )
 
static int s_defaultTextSize = Mils2iu( DEFAULT_SIZE_TEXT )
 
static int s_drawDefaultLineThickness = -1
 
static double s_textOffsetRatio = 0.08
 
static bool s_selectTextAsBox = false
 
static bool s_selectDrawChildren = true
 
static bool s_selectFillShapes = false
 
static int s_selectThickness = Mils2iu( DEFAULTSELECTIONTHICKNESS )
 
PARAM_CFG_SEVERITIES kiface
 

Macro Definition Documentation

◆ FieldNameTemplatesKey

#define FieldNameTemplatesKey   wxT( "FieldNameTemplates" )

Definition at line 67 of file eeschema_config.cpp.

Function Documentation

◆ GetDefaultBusThickness()

int GetDefaultBusThickness ( )

Default line thickness used to draw/plot busses.

Definition at line 230 of file eeschema_config.cpp.

231 {
232  return s_defaultBusThickness;
233 }
static int s_defaultBusThickness

References s_defaultBusThickness.

Referenced by SCH_LINE::GetDefaultWidth(), SCH_BUS_BUS_ENTRY::GetPenSize(), and PANEL_SETUP_FORMATTING::TransferDataToWindow().

◆ GetDefaultLineThickness()

int GetDefaultLineThickness ( )

Default line thickness used to draw/plot items having a default thickness line value (i.e.

= 0 ).

Definition at line 266 of file eeschema_config.cpp.

267 {
269 }
static int s_drawDefaultLineThickness

References s_drawDefaultLineThickness.

Referenced by SCH_GLOBALLABEL::CreateGraphicShape(), DIALOG_PLOT_SCHEMATIC::createPDFFile(), KIGFX::SCH_PAINTER::draw(), formatStroke(), SCH_FIELD::GetBoundingBox(), SCH_TEXT::GetBoundingBox(), SCH_LABEL::GetBoundingBox(), SCH_GLOBALLABEL::GetBoundingBox(), SCH_HIERLABEL::GetBoundingBox(), SCH_LINE::GetDefaultWidth(), SCH_JUNCTION::GetEffectiveSymbolSize(), LIB_CIRCLE::GetPenSize(), LIB_RECTANGLE::GetPenSize(), SCH_NO_CONNECT::GetPenSize(), LIB_TEXT::GetPenSize(), LIB_ARC::GetPenSize(), LIB_POLYLINE::GetPenSize(), LIB_BEZIER::GetPenSize(), SCH_SHEET_PIN::GetPenSize(), LIB_FIELD::GetPenSize(), SCH_FIELD::GetPenSize(), SCH_TEXT::GetPenSize(), LIB_PIN::GetPenSize(), SCH_TEXT::GetSchematicTextOffset(), SCH_GLOBALLABEL::GetSchematicTextOffset(), SCH_HIERLABEL::GetSchematicTextOffset(), SCH_NO_CONNECT::GetSize(), KIGFX::SCH_PAINTER::getTextThickness(), SCH_NO_CONNECT::HitTest(), DIALOG_PLOT_SCHEMATIC::initDlg(), SCH_SCREEN::IsTerminalPoint(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPS(), DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG(), LIB_PIN::PlotPinTexts(), SCH_NO_CONNECT::Print(), SCH_FIELD::Print(), SCH_TEXT::Print(), SCH_GLOBALLABEL::Print(), SCH_HIERLABEL::Print(), SCH_PRINTOUT::PrintPage(), SCH_EDIT_FRAME::PrintPage(), LIB_PIN::PrintPinTexts(), LIB_EDIT_FRAME::SaveSettings(), SCH_SHEET::SCH_SHEET(), LIB_EDIT_FRAME::SVG_PlotComponent(), PANEL_LIBEDIT_SETTINGS::TransferDataToWindow(), and SCH_SHEET::UsesDefaultStroke().

◆ GetDefaultTextSize()

◆ GetDefaultWireThickness()

int GetDefaultWireThickness ( )

Default line thickness used to draw/plot wires.

Definition at line 242 of file eeschema_config.cpp.

243 {
244  return s_defaultWireThickness;
245 }
static int s_defaultWireThickness

References s_defaultWireThickness.

Referenced by SCH_LINE::GetDefaultWidth(), SCH_BUS_WIRE_ENTRY::GetPenSize(), and PANEL_SETUP_FORMATTING::TransferDataToWindow().

◆ GetInvisibleItemColor()

COLOR4D GetInvisibleItemColor ( )

Definition at line 346 of file eeschema_config.cpp.

347 {
348  return COLOR4D( DARKGRAY );
349 }
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:40

References DARKGRAY.

Referenced by LIB_FIELD::print(), LIB_PIN::PrintPinElectricalTypeName(), LIB_PIN::PrintPinSymbol(), and LIB_PIN::PrintPinTexts().

◆ GetLayerColor()

◆ GetSelectionDrawChildItems()

bool GetSelectionDrawChildItems ( )

Draw selected child items or not.

Definition at line 302 of file eeschema_config.cpp.

303 {
304  return s_selectDrawChildren;
305 }
static bool s_selectDrawChildren

References s_selectDrawChildren.

Referenced by KIGFX::SCH_PAINTER::draw(), SCH_EDIT_FRAME::SaveSettings(), and PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataToWindow().

◆ GetSelectionFillShapes()

bool GetSelectionFillShapes ( )

Draw selected shapes as filled or not.

Definition at line 314 of file eeschema_config.cpp.

315 {
316  return s_selectFillShapes;
317 }
static bool s_selectFillShapes

References s_selectFillShapes.

Referenced by KIGFX::SCH_PAINTER::fillIfSelection(), SCH_EDIT_FRAME::SaveSettings(), and PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataToWindow().

◆ GetSelectionTextAsBox()

bool GetSelectionTextAsBox ( )

Draw selected text items as box.

Definition at line 290 of file eeschema_config.cpp.

291 {
292  return s_selectTextAsBox;
293 }
static bool s_selectTextAsBox

References s_selectTextAsBox.

Referenced by KIGFX::SCH_PAINTER::draw(), SCH_EDIT_FRAME::SaveSettings(), and PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataToWindow().

◆ GetSelectionThickness()

int GetSelectionThickness ( )

Selection highlight thickness.

Definition at line 326 of file eeschema_config.cpp.

327 {
328  return s_selectThickness;
329 }
static int s_selectThickness

References s_selectThickness.

Referenced by KIGFX::SCH_PAINTER::getShadowWidth(), SCH_EDIT_FRAME::SaveSettings(), and PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataToWindow().

◆ GetSeverity()

int GetSeverity ( int  aErrorCode)

Definition at line 219 of file eeschema_config.cpp.

220 {
221  return g_ErcSettings->m_Severities[ aErrorCode ];
222 }
ERC_SETTINGS * g_ErcSettings
This also wants to live in the eventual SCHEMATIC object.
std::map< int, int > m_Severities
Definition: erc_settings.h:75

References g_ErcSettings, and ERC_SETTINGS::m_Severities.

Referenced by SHEETLIST_ERC_ITEMS_PROVIDER::GetCount(), DIALOG_ERC::OnERCItemRClick(), and SHEETLIST_ERC_ITEMS_PROVIDER::SetSeverities().

◆ GetTextOffsetRatio()

double GetTextOffsetRatio ( )

Amount to offset text above/below wires & busses.

Expressed as a ratio of the text size.

Definition at line 278 of file eeschema_config.cpp.

279 {
280  return s_textOffsetRatio;
281 }
static double s_textOffsetRatio

References s_textOffsetRatio.

Referenced by SCH_TEXT::GetSchematicTextOffset(), SCH_GLOBALLABEL::GetSchematicTextOffset(), SCH_HIERLABEL::GetSchematicTextOffset(), and PANEL_SETUP_FORMATTING::TransferDataToWindow().

◆ SetDefaultBusThickness()

void SetDefaultBusThickness ( int  aThickness)

Definition at line 236 of file eeschema_config.cpp.

237 {
238  s_defaultBusThickness = std::max( 1, aThickness );
239 }
static int s_defaultBusThickness

References s_defaultBusThickness.

Referenced by PANEL_SETUP_FORMATTING::TransferDataFromWindow().

◆ SetDefaultLineThickness()

void SetDefaultLineThickness ( int  aThickness)

Definition at line 272 of file eeschema_config.cpp.

273 {
274  s_drawDefaultLineThickness = std::max( 1, aThickness );
275 }
static int s_drawDefaultLineThickness

References s_drawDefaultLineThickness.

Referenced by DIALOG_PLOT_SCHEMATIC::getPlotOptions(), LIB_EDIT_FRAME::LoadSettings(), and PANEL_LIBEDIT_SETTINGS::TransferDataFromWindow().

◆ SetDefaultTextSize()

void SetDefaultTextSize ( int  aTextSize)

◆ SetDefaultWireThickness()

void SetDefaultWireThickness ( int  aThickness)

Definition at line 248 of file eeschema_config.cpp.

249 {
250  s_defaultWireThickness = std::max( 1, aThickness );
251 }
static int s_defaultWireThickness

References s_defaultWireThickness.

Referenced by PANEL_SETUP_FORMATTING::TransferDataFromWindow().

◆ SetSelectionDrawChildItems()

void SetSelectionDrawChildItems ( bool  aBool)

Definition at line 308 of file eeschema_config.cpp.

309 {
310  s_selectDrawChildren = aBool;
311 }
static bool s_selectDrawChildren

References s_selectDrawChildren.

Referenced by SCH_EDIT_FRAME::LoadSettings(), and PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow().

◆ SetSelectionFillShapes()

void SetSelectionFillShapes ( bool  aBool)

Definition at line 320 of file eeschema_config.cpp.

321 {
322  s_selectFillShapes = aBool;
323 }
static bool s_selectFillShapes

References s_selectFillShapes.

Referenced by SCH_EDIT_FRAME::LoadSettings(), and PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow().

◆ SetSelectionTextAsBox()

void SetSelectionTextAsBox ( bool  aBool)

Definition at line 296 of file eeschema_config.cpp.

297 {
298  s_selectTextAsBox = aBool;
299 }
static bool s_selectTextAsBox

References s_selectTextAsBox.

Referenced by SCH_EDIT_FRAME::LoadSettings(), and PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow().

◆ SetSelectionThickness()

void SetSelectionThickness ( int  aThickness)

Definition at line 332 of file eeschema_config.cpp.

333 {
334  s_selectThickness = aThickness;
335 }
static int s_selectThickness

References s_selectThickness.

Referenced by SCH_EDIT_FRAME::LoadSettings(), and PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow().

◆ SetSeverity()

void SetSeverity ( int  aErrorCode,
int  aSeverity 
)

Definition at line 224 of file eeschema_config.cpp.

225 {
226  g_ErcSettings->m_Severities[ aErrorCode ] = aSeverity;
227 }
ERC_SETTINGS * g_ErcSettings
This also wants to live in the eventual SCHEMATIC object.
std::map< int, int > m_Severities
Definition: erc_settings.h:75

References g_ErcSettings, and ERC_SETTINGS::m_Severities.

Referenced by DIALOG_ERC::OnERCItemRClick().

◆ SetTextOffsetRatio()

void SetTextOffsetRatio ( double  aOffsetRatio)

Definition at line 284 of file eeschema_config.cpp.

285 {
286  s_textOffsetRatio = aOffsetRatio;
287 }
static double s_textOffsetRatio

References s_textOffsetRatio.

Referenced by PANEL_SETUP_FORMATTING::TransferDataFromWindow().

Variable Documentation

◆ kiface

◆ s_defaultBusThickness

int s_defaultBusThickness = Mils2iu( DEFAULTBUSTHICKNESS )
static

◆ s_defaultTextSize

int s_defaultTextSize = Mils2iu( DEFAULT_SIZE_TEXT )
static

◆ s_defaultWireThickness

int s_defaultWireThickness = Mils2iu( DEFAULTDRAWLINETHICKNESS )
static

◆ s_drawDefaultLineThickness

int s_drawDefaultLineThickness = -1
static

◆ s_selectDrawChildren

bool s_selectDrawChildren = true
static

Definition at line 63 of file eeschema_config.cpp.

Referenced by GetSelectionDrawChildItems(), and SetSelectionDrawChildItems().

◆ s_selectFillShapes

bool s_selectFillShapes = false
static

Definition at line 64 of file eeschema_config.cpp.

Referenced by GetSelectionFillShapes(), and SetSelectionFillShapes().

◆ s_selectTextAsBox

bool s_selectTextAsBox = false
static

Definition at line 62 of file eeschema_config.cpp.

Referenced by GetSelectionTextAsBox(), and SetSelectionTextAsBox().

◆ s_selectThickness

int s_selectThickness = Mils2iu( DEFAULTSELECTIONTHICKNESS )
static

Definition at line 65 of file eeschema_config.cpp.

Referenced by GetSelectionThickness(), and SetSelectionThickness().

◆ s_textOffsetRatio

double s_textOffsetRatio = 0.08
static