KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ee_tool_utils.cpp File Reference
#include "ee_tool_utils.h"
#include <sch_text.h>
#include <sch_field.h>
#include <sch_pin.h>
#include <sch_reference_list.h>
#include <sch_symbol.h>
#include <sch_table.h>
#include <sch_tablecell.h>
#include <sch_textbox.h>
#include <wx/arrstr.h>

Go to the source code of this file.

Functions

wxString GetSchItemAsText (const SCH_ITEM &aItem)
 
wxString GetSelectedItemsAsText (const SELECTION &aSel)
 
std::set< int > GetUnplacedUnitsForSymbol (const SCH_SYMBOL &aSym)
 Get a list of unplaced (i.e.
 
std::optional< SCH_REFERENCEFindSymbolByRefAndUnit (const SCHEMATIC &aSchematic, const wxString &aRef, int aUnit)
 Find a symbol by reference and unit.
 

Function Documentation

◆ FindSymbolByRefAndUnit()

std::optional< SCH_REFERENCE > FindSymbolByRefAndUnit ( const SCHEMATIC aSheet,
const wxString &  aRef,
int  aUnit 
)

Find a symbol by reference and unit.

Returns
A SCH_REFERENCE to the found symbol, or std::nullopt if not found.

Definition at line 163 of file ee_tool_utils.cpp.

References SCH_SHEET_LIST::GetSymbols(), and SCHEMATIC::Hierarchy().

Referenced by SCH_EDIT_FRAME::SelectUnit().

◆ GetSchItemAsText()

◆ GetSelectedItemsAsText()

wxString GetSelectedItemsAsText ( const SELECTION aSel)

◆ GetUnplacedUnitsForSymbol()

std::set< int > GetUnplacedUnitsForSymbol ( const SCH_SYMBOL aSym)

Get a list of unplaced (i.e.

not in schamtic) unit numbers for a symbol.

Definition at line 131 of file ee_tool_utils.cpp.

References SCHEMATIC::CurrentSheet(), SCH_SYMBOL::GetRef(), SCH_SHEET_LIST::GetSymbols(), SCH_SYMBOL::GetUnitCount(), SCHEMATIC::Hierarchy(), and SCH_ITEM::Schematic().

Referenced by SCH_DRAWING_TOOLS::PlaceNextSymbolUnit(), and SYMBOL_UNIT_MENU::update().