KiCad PCB EDA Suite
ui_common.cpp File Reference
#include <wx/wx.h>
#include <wx/dataview.h>
#include <wx/stc/stc.h>
#include <widgets/ui_common.h>
#include <algorithm>
#include <dialog_shim.h>
#include <pgm_base.h>

Go to the source code of this file.

Functions

SEVERITY SeverityFromString (const wxString &aSeverity)
 
wxString SeverityToString (const SEVERITY &aSeverity)
 

Function Documentation

◆ SeverityFromString()

SEVERITY SeverityFromString ( const wxString &  aSeverity)

Definition at line 36 of file ui_common.cpp.

37 {
38  if( aSeverity == wxT( "warning" ) )
39  return RPT_SEVERITY_WARNING;
40  else if( aSeverity == wxT( "ignore" ) )
41  return RPT_SEVERITY_IGNORE;
42  else
43  return RPT_SEVERITY_ERROR;
44 }

References RPT_SEVERITY_ERROR, RPT_SEVERITY_IGNORE, and RPT_SEVERITY_WARNING.

Referenced by BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS(), and ERC_SETTINGS::ERC_SETTINGS().

◆ SeverityToString()

wxString SeverityToString ( const SEVERITY aSeverity)

Definition at line 47 of file ui_common.cpp.

48 {
49  if( aSeverity == RPT_SEVERITY_IGNORE )
50  return wxT( "ignore" );
51  else if( aSeverity == RPT_SEVERITY_WARNING )
52  return wxT( "warning" );
53  else
54  return wxT( "error" );
55 }

References RPT_SEVERITY_IGNORE, and RPT_SEVERITY_WARNING.

Referenced by BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS(), and ERC_SETTINGS::ERC_SETTINGS().