mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 11:01:41 +00:00
Eeschema folder housekeeping.
This commit is contained in:
parent
69c6412b43
commit
f45915ba93
eeschema
connection_graph.cppconnection_graph.hcross-probing.cppdefault_values.hdesign_block_utils.cppeeschema_config.cppeeschema_helpers.cppeeschema_helpers.heeschema_jobs_handler.cppeeschema_jobs_handler.heeschema_settings.cppfields_grid_table.cppgenerate_alias_info.cppjunction_helpers.hlib_symbol.cpplib_symbol.hlibarch.cppmenubar.cppnet_navigator.cpppicksymbol.cpppin_layout_cache.cpppin_layout_cache.hpin_numbers.cpppin_type.cpppin_type.hproject_rescue.cppproject_sch.hsch_base_frame.cppsch_bus_entry.cppsch_commit.cppsch_connection.cppsch_connection.hsch_draw_panel.cppsch_draw_panel.hsch_edit_frame.cppsch_edit_frame.hsch_field.cppsch_field.hsch_item.cppsch_item.hsch_label.cppsch_label.hsch_line.hsch_marker.cppsch_marker.hsch_no_connect.cppsch_painter.cppsch_painter.hsch_pin.cppsch_pin.hsch_plotter.cppsch_plotter.hsch_reference_list.cppsch_reference_list.hsch_rtree.hsch_rule_area.hsch_screen.cppsch_screen.hsch_shape.hsch_sheet.cppsch_sheet.hsch_sheet_path.cppsch_sheet_path.hsch_symbol.cppsch_symbol.hsch_table.hsch_tablecell.cppsch_tablecell.hsch_text.cppsch_text.hschematic.cppschematic.hschematic_settings.cppsheet.cppsymb_transforms_utils.cppsymbol.hsymbol_async_loader.hsymbol_checker.cppsymbol_lib_table.cppsymbol_library.cppsymbol_library_manager.cppsymbol_library_manager.hsymbol_tree_model_adapter.hsymbol_tree_synchronizing_adapter.cppsymbol_tree_synchronizing_adapter.hsymbol_viewer_frame.cpptoolbars_sch_editor.cpptoolbars_symbol_viewer.cpp
@ -820,7 +820,7 @@ void CONNECTION_GRAPH::Recalculate( const SCH_SHEET_LIST& aSheetList, bool aUnco
|
||||
symbol->SetUnit( originalUnit );
|
||||
}
|
||||
|
||||
// Restore the danlging states of items in the current SCH_SCREEN to match the current
|
||||
// Restore the dangling states of items in the current SCH_SCREEN to match the current
|
||||
// SCH_SHEET_PATH.
|
||||
m_schematic->CurrentSheet().LastScreen()->TestDanglingEnds( &m_schematic->CurrentSheet(),
|
||||
aChangedItemHandler );
|
||||
@ -877,9 +877,11 @@ std::set<std::pair<SCH_SHEET_PATH, SCH_ITEM*>> CONNECTION_GRAPH::ExtractAffected
|
||||
|
||||
if( !item_sg )
|
||||
{
|
||||
wxLogTrace( ConnTrace, wxT( "Item %s not found in connection graph" ), aItem->GetTypeDesc() );
|
||||
wxLogTrace( ConnTrace, wxT( "Item %s not found in connection graph" ),
|
||||
aItem->GetTypeDesc() );
|
||||
return;
|
||||
}
|
||||
|
||||
if( !item_sg->ResolveDrivers( true ) )
|
||||
{
|
||||
wxLogTrace( ConnTrace, wxT( "Item %s in subgraph %ld (%p) has no driver" ),
|
||||
@ -902,7 +904,6 @@ std::set<std::pair<SCH_SHEET_PATH, SCH_ITEM*>> CONNECTION_GRAPH::ExtractAffected
|
||||
sg_to_scan.size() );
|
||||
|
||||
for( CONNECTION_SUBGRAPH* sg : sg_to_scan )
|
||||
|
||||
{
|
||||
traverse_subgraph( sg );
|
||||
|
||||
@ -1046,15 +1047,15 @@ void CONNECTION_GRAPH::removeSubgraphs( std::set<CONNECTION_SUBGRAPH*>& aSubgrap
|
||||
}
|
||||
|
||||
auto remove_sg = [sg]( auto it ) -> bool
|
||||
{
|
||||
for( const CONNECTION_SUBGRAPH* test_sg : it->second )
|
||||
{
|
||||
if( sg == test_sg )
|
||||
return true;
|
||||
}
|
||||
{
|
||||
for( const CONNECTION_SUBGRAPH* test_sg : it->second )
|
||||
{
|
||||
if( sg == test_sg )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
return false;
|
||||
};
|
||||
|
||||
for( auto it = m_global_label_cache.begin(); it != m_global_label_cache.end(); )
|
||||
{
|
||||
@ -1081,7 +1082,9 @@ void CONNECTION_GRAPH::removeSubgraphs( std::set<CONNECTION_SUBGRAPH*>& aSubgrap
|
||||
it = m_net_code_to_subgraphs_map.erase( it );
|
||||
}
|
||||
else
|
||||
{
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
for( auto it = m_net_name_to_subgraphs_map.begin();
|
||||
@ -1446,6 +1449,7 @@ void CONNECTION_GRAPH::buildItemSubGraphs()
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CONNECTION_GRAPH::resolveAllDrivers()
|
||||
{
|
||||
// Resolve drivers for subgraphs and propagate connectivity info
|
||||
@ -1642,6 +1646,7 @@ void CONNECTION_GRAPH::generateBusAliasMembers()
|
||||
std::back_inserter( m_driver_subgraphs ) );
|
||||
}
|
||||
|
||||
|
||||
void CONNECTION_GRAPH::generateGlobalPowerPinSubGraphs()
|
||||
{
|
||||
// Generate subgraphs for global power pins. These will be merged with other subgraphs
|
||||
@ -1656,7 +1661,8 @@ void CONNECTION_GRAPH::generateGlobalPowerPinSubGraphs()
|
||||
SCH_SHEET_PATH sheet = it.first;
|
||||
SCH_PIN* pin = it.second;
|
||||
|
||||
if( !pin->ConnectedItems( sheet ).empty() && !pin->GetLibPin()->GetParentSymbol()->IsPower() )
|
||||
if( !pin->ConnectedItems( sheet ).empty()
|
||||
&& !pin->GetLibPin()->GetParentSymbol()->IsPower() )
|
||||
{
|
||||
// ERC will warn about this: user has wired up an invisible pin
|
||||
continue;
|
||||
@ -1845,7 +1851,8 @@ void CONNECTION_GRAPH::processSubGraphs()
|
||||
wxS( "%ld (%s) weakly driven by unique sheet pin %s, "
|
||||
"promoting" ),
|
||||
subgraph->m_code, name,
|
||||
subgraph->m_driver->GetItemDescription( &unitsProvider, true ) );
|
||||
subgraph->m_driver->GetItemDescription( &unitsProvider,
|
||||
true ) );
|
||||
|
||||
subgraph->m_strong_driver = true;
|
||||
}
|
||||
@ -2026,7 +2033,8 @@ void CONNECTION_GRAPH::processSubGraphs()
|
||||
subgraph->m_bus_neighbors[member].insert( candidate );
|
||||
candidate->m_bus_parents[member].insert( subgraph );
|
||||
}
|
||||
else if( !connection->IsBus() || connection->Type() == candidate->m_driver_connection->Type() )
|
||||
else if( !connection->IsBus()
|
||||
|| connection->Type() == candidate->m_driver_connection->Type() )
|
||||
{
|
||||
wxLogTrace( ConnTrace, wxS( "%lu (%s) absorbs neighbor %lu (%s)" ),
|
||||
subgraph->m_code, connection->Name(),
|
||||
@ -2076,7 +2084,8 @@ void CONNECTION_GRAPH::processSubGraphs()
|
||||
// on some portion of the items.
|
||||
|
||||
|
||||
void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* aChangedItemHandler, bool aUnconditional )
|
||||
void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* aChangedItemHandler,
|
||||
bool aUnconditional )
|
||||
{
|
||||
// Recache all bus aliases for later use
|
||||
wxCHECK_RET( m_schematic, wxT( "Connection graph cannot be built without schematic pointer" ) );
|
||||
@ -2095,7 +2104,6 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||
if( wxLog::IsAllowedTraceMask( DanglingProfileMask ) )
|
||||
sub_graph.Show();
|
||||
|
||||
|
||||
/**
|
||||
* TODO(JE): Net codes are non-deterministic. Fortunately, they are also not really used for
|
||||
* anything. We should consider removing them entirely and just using net names everywhere.
|
||||
@ -2144,6 +2152,7 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||
for( int ii = a; ii < b; ++ii )
|
||||
m_driver_subgraphs[ii]->UpdateItemConnections();
|
||||
});
|
||||
|
||||
tp.wait_for_tasks();
|
||||
|
||||
// Next time through the subgraphs, we do some post-processing to handle things like
|
||||
@ -3018,7 +3027,8 @@ std::vector<const CONNECTION_SUBGRAPH*> CONNECTION_GRAPH::GetBusesNeedingMigrati
|
||||
|
||||
for( unsigned i = 1; i < labels.size(); ++i )
|
||||
{
|
||||
if( static_cast<SCH_TEXT*>( labels.at( i ) )->GetShownText( sheet, false ) != first )
|
||||
if( static_cast<SCH_TEXT*>( labels.at( i ) )->GetShownText( sheet,
|
||||
false ) != first )
|
||||
{
|
||||
different = true;
|
||||
break;
|
||||
@ -3660,7 +3670,8 @@ bool CONNECTION_GRAPH::ercCheckNoConnects( const CONNECTION_SUBGRAPH* aSubgraph
|
||||
SCH_PIN* test_pin = static_cast<SCH_PIN*>( item );
|
||||
|
||||
// Stacked pins do not count as other connections but non-stacked pins do
|
||||
if( !has_other_connections && !pins.empty() && !test_pin->GetParentSymbol()->IsPower() )
|
||||
if( !has_other_connections && !pins.empty()
|
||||
&& !test_pin->GetParentSymbol()->IsPower() )
|
||||
{
|
||||
for( SCH_PIN* other_pin : pins )
|
||||
{
|
||||
@ -3692,8 +3703,8 @@ bool CONNECTION_GRAPH::ercCheckNoConnects( const CONNECTION_SUBGRAPH* aSubgraph
|
||||
for( SCH_PIN* test_pin : pins )
|
||||
{
|
||||
// Prefer the pin is part of a real component rather than some stray power symbol
|
||||
// Or else we may fail walking connected components to a power symbol pin since we reject
|
||||
// starting at a power symbol
|
||||
// Or else we may fail walking connected components to a power symbol pin since we
|
||||
// reject starting at a power symbol
|
||||
if( test_pin->GetType() == ELECTRICAL_PINTYPE::PT_POWER_IN
|
||||
&& !test_pin->IsGlobalPower() )
|
||||
{
|
||||
@ -3788,7 +3799,8 @@ bool CONNECTION_GRAPH::ercCheckDanglingWireEndpoints( const CONNECTION_SUBGRAPH*
|
||||
|
||||
auto report_error = [&]( VECTOR2I& location )
|
||||
{
|
||||
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_UNCONNECTED_WIRE_ENDPOINT );
|
||||
std::shared_ptr<ERC_ITEM> ercItem =
|
||||
ERC_ITEM::Create( ERCE_UNCONNECTED_WIRE_ENDPOINT );
|
||||
|
||||
ercItem->SetItems( line );
|
||||
ercItem->SetSheetSpecificPath( sheet );
|
||||
@ -3812,7 +3824,8 @@ bool CONNECTION_GRAPH::ercCheckDanglingWireEndpoints( const CONNECTION_SUBGRAPH*
|
||||
|
||||
auto report_error = [&]( VECTOR2I& location )
|
||||
{
|
||||
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_UNCONNECTED_WIRE_ENDPOINT );
|
||||
std::shared_ptr<ERC_ITEM> ercItem =
|
||||
ERC_ITEM::Create( ERCE_UNCONNECTED_WIRE_ENDPOINT );
|
||||
|
||||
ercItem->SetItems( entry );
|
||||
ercItem->SetSheetSpecificPath( sheet );
|
||||
@ -4229,4 +4242,4 @@ int CONNECTION_GRAPH::ercCheckHierSheets()
|
||||
}
|
||||
|
||||
return errors;
|
||||
}
|
||||
}
|
||||
|
@ -538,7 +538,8 @@ private:
|
||||
* and re-created. Otherwise, we will preserve existing net classes that do not
|
||||
* conflict with the new net classes.
|
||||
*/
|
||||
void buildConnectionGraph( std::function<void( SCH_ITEM* )>* aChangedItemHandler, bool aUnconditional );
|
||||
void buildConnectionGraph( std::function<void( SCH_ITEM* )>* aChangedItemHandler,
|
||||
bool aUnconditional );
|
||||
|
||||
/**
|
||||
* Generate individual item subgraphs on a per-sheet basis.
|
||||
@ -741,7 +742,7 @@ private:
|
||||
int ercCheckHierSheets();
|
||||
|
||||
/**
|
||||
* Check that a global label is instantiated more that once across the schematic heirarchy
|
||||
* Check that a global label is instantiated more that once across the schematic hierarchy
|
||||
*/
|
||||
int ercCheckSingleGlobalLabel();
|
||||
|
||||
|
@ -851,13 +851,15 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
|
||||
// Try to select specified items.
|
||||
|
||||
// $SELECT: 1,<spec1>,<spec2>,<spec3>
|
||||
// Select and focus on <spec1> item, select other specified items that are on the same sheet.
|
||||
// Select and focus on <spec1> item, select other specified items that are on the
|
||||
// same sheet.
|
||||
|
||||
std::string prefix = "$SELECT: ";
|
||||
|
||||
std::string paramStr = payload.substr( prefix.size() );
|
||||
|
||||
if( paramStr.size() < 2 ) // Empty/broken command: we need at least 2 chars for sync string.
|
||||
// Empty/broken command: we need at least 2 chars for sync string.
|
||||
if( paramStr.size() < 2 )
|
||||
break;
|
||||
|
||||
std::string syncStr = paramStr.substr( 2 );
|
||||
@ -945,7 +947,8 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
|
||||
|
||||
case MAIL_IMPORT_FILE:
|
||||
{
|
||||
// Extract file format type and path (plugin type, path and properties keys, values separated with \n)
|
||||
// Extract file format type and path (plugin type, path and properties keys, values
|
||||
// separated with \n)
|
||||
std::stringstream ss( payload );
|
||||
char delim = '\n';
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#define DEFAULT_VALUES_H
|
||||
|
||||
|
||||
///< The size of the rectangle indicating an unconnected wire or label
|
||||
/// The size of the rectangle indicating an unconnected wire or label
|
||||
#define DANGLING_SYMBOL_SIZE 12
|
||||
|
||||
///< The size of the rectangle indicating a connected, unselected wire end
|
||||
|
@ -391,7 +391,9 @@ void SCH_EDIT_FRAME::SaveSelectionAsDesignBlock( const wxString& aLibraryName )
|
||||
SaveSheetAsDesignBlock( aLibraryName, curPath );
|
||||
}
|
||||
else
|
||||
{
|
||||
DisplayErrorMessage( this, _( "Design blocks with nested sheets are not supported." ) );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@ -422,9 +424,11 @@ void SCH_EDIT_FRAME::SaveSelectionAsDesignBlock( const wxString& aLibraryName )
|
||||
|
||||
// Save a temporary copy of the schematic file, as the plugin is just going to move it
|
||||
wxString tempFile = wxFileName::CreateTempFileName( "design_block" );
|
||||
|
||||
if( !saveSchematicFile( tempSheet, tempFile ) )
|
||||
{
|
||||
DisplayErrorMessage( this, _( "Error saving temporary schematic file to create design block." ) );
|
||||
DisplayErrorMessage( this,
|
||||
_( "Error saving temporary schematic file to create design block." ) );
|
||||
wxRemoveFile( tempFile );
|
||||
return;
|
||||
}
|
||||
@ -449,6 +453,7 @@ void SCH_EDIT_FRAME::SaveSelectionAsDesignBlock( const wxString& aLibraryName )
|
||||
|
||||
// Clean up the temporaries
|
||||
wxRemoveFile( tempFile );
|
||||
|
||||
// This will also delete the screen
|
||||
delete tempSheet;
|
||||
|
||||
@ -582,7 +587,9 @@ bool SCH_EDIT_FRAME::EditDesignBlockProperties( const LIB_ID& aLibId )
|
||||
Prj().DesignBlockLibs()->DesignBlockDelete( libname, originalName );
|
||||
}
|
||||
else
|
||||
{
|
||||
Prj().DesignBlockLibs()->DesignBlockSave( libname, designBlock );
|
||||
}
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
@ -612,7 +619,8 @@ DESIGN_BLOCK* SchGetDesignBlock( const LIB_ID& aLibId, DESIGN_BLOCK_LIB_TABLE* a
|
||||
{
|
||||
if( aShowErrorMsg )
|
||||
{
|
||||
wxString msg = wxString::Format( _( "Error loading design block %s from library '%s'." ),
|
||||
wxString msg = wxString::Format( _( "Error loading design block %s from "
|
||||
"library '%s'." ),
|
||||
aLibId.GetLibItemName().wx_str(),
|
||||
aLibId.GetLibNickname().wx_str() );
|
||||
DisplayErrorMessage( aParent, msg, ioe.What() );
|
||||
|
@ -160,7 +160,8 @@ void SCH_EDIT_FRAME::ShowSchematicSetupDialog( const wxString& aInitialPage )
|
||||
|
||||
std::vector<std::shared_ptr<BUS_ALIAS>> newAliases;
|
||||
|
||||
for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr; screen = screens.GetNext() )
|
||||
for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr;
|
||||
screen = screens.GetNext() )
|
||||
{
|
||||
for( const std::shared_ptr<BUS_ALIAS>& alias : screen->GetBusAliases() )
|
||||
newAliases.push_back( alias );
|
||||
@ -321,7 +322,9 @@ void SCH_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
||||
cfg->m_AuiPanels.float_net_nav_panel = netNavigatorPane.IsFloating();
|
||||
|
||||
if( netNavigatorPane.IsDocked() )
|
||||
{
|
||||
cfg->m_AuiPanels.net_nav_panel_docked_size = m_netNavigator->GetSize();
|
||||
}
|
||||
else
|
||||
{
|
||||
cfg->m_AuiPanels.net_nav_panel_float_pos = netNavigatorPane.floating_pos;
|
||||
|
@ -82,22 +82,23 @@ PROJECT* EESCHEMA_HELPERS::GetDefaultProject( bool aSetActive )
|
||||
}
|
||||
|
||||
|
||||
SCHEMATIC* EESCHEMA_HELPERS::LoadSchematic( const wxString& aFileName,
|
||||
bool aSetActive,
|
||||
bool aForceDefaultProject,
|
||||
PROJECT* aProject )
|
||||
SCHEMATIC* EESCHEMA_HELPERS::LoadSchematic( const wxString& aFileName, bool aSetActive,
|
||||
bool aForceDefaultProject, PROJECT* aProject )
|
||||
{
|
||||
if( aFileName.EndsWith( FILEEXT::KiCadSchematicFileExtension ) )
|
||||
return LoadSchematic( aFileName, SCH_IO_MGR::SCH_KICAD, aSetActive, aForceDefaultProject, aProject );
|
||||
return LoadSchematic( aFileName, SCH_IO_MGR::SCH_KICAD, aSetActive, aForceDefaultProject,
|
||||
aProject );
|
||||
else if( aFileName.EndsWith( FILEEXT::LegacySchematicFileExtension ) )
|
||||
return LoadSchematic( aFileName, SCH_IO_MGR::SCH_LEGACY, aSetActive, aForceDefaultProject, aProject );
|
||||
return LoadSchematic( aFileName, SCH_IO_MGR::SCH_LEGACY, aSetActive, aForceDefaultProject,
|
||||
aProject );
|
||||
|
||||
// as fall back for any other kind use the legacy format
|
||||
return LoadSchematic( aFileName, SCH_IO_MGR::SCH_LEGACY, aSetActive, aForceDefaultProject, aProject );
|
||||
}
|
||||
|
||||
|
||||
SCHEMATIC* EESCHEMA_HELPERS::LoadSchematic( const wxString& aFileName, SCH_IO_MGR::SCH_FILE_T aFormat,
|
||||
SCHEMATIC* EESCHEMA_HELPERS::LoadSchematic( const wxString& aFileName,
|
||||
SCH_IO_MGR::SCH_FILE_T aFormat,
|
||||
bool aSetActive,
|
||||
bool aForceDefaultProject,
|
||||
PROJECT* aProject )
|
||||
@ -150,7 +151,6 @@ SCHEMATIC* EESCHEMA_HELPERS::LoadSchematic( const wxString& aFileName, SCH_IO_MG
|
||||
const_cast<KIID&>( rootSheet->m_Uuid ) = rootScreen->GetUuid();
|
||||
schematic->Root().SetScreen( rootScreen );
|
||||
|
||||
|
||||
schematic->RootScreen()->SetFileName( wxEmptyString );
|
||||
|
||||
// Don't leave root page number empty
|
||||
|
@ -35,7 +35,7 @@ class PROJECT;
|
||||
/**
|
||||
* Helper functions to do things like load schematics behind the scenes for special functions
|
||||
*
|
||||
* Similar to the pcbnew scripting helpers, this is just to have one spot
|
||||
* Similar to the Pcbnew scripting helpers, this is just to have one spot
|
||||
* for these types of "hacky" solutions
|
||||
*/
|
||||
class EESCHEMA_HELPERS
|
||||
@ -44,10 +44,13 @@ public:
|
||||
static SETTINGS_MANAGER* GetSettingsManager();
|
||||
static void SetSchEditFrame( SCH_EDIT_FRAME* aSchEditFrame );
|
||||
static PROJECT* GetDefaultProject( bool aSetActive );
|
||||
static SCHEMATIC* LoadSchematic( const wxString& aFileName, bool aSetActive, bool aForceDefaultProject,
|
||||
static SCHEMATIC* LoadSchematic( const wxString& aFileName, bool aSetActive,
|
||||
bool aForceDefaultProject,
|
||||
PROJECT* aProject = nullptr );
|
||||
static SCHEMATIC* LoadSchematic( const wxString& aFileName,
|
||||
SCH_IO_MGR::SCH_FILE_T aFormat,
|
||||
bool aSetActive, bool aForceDefaultProject,
|
||||
PROJECT* aProject = nullptr );
|
||||
static SCHEMATIC* LoadSchematic( const wxString& aFileName, SCH_IO_MGR::SCH_FILE_T aFormat,
|
||||
bool aSetActive, bool aForceDefaultProject, PROJECT* aProject = nullptr );
|
||||
|
||||
private:
|
||||
static SCH_EDIT_FRAME* s_SchEditFrame;
|
||||
|
@ -268,6 +268,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportPlot( JOB* aJob )
|
||||
std::unique_ptr<SCH_PLOTTER> schPlotter = std::make_unique<SCH_PLOTTER>( sch );
|
||||
|
||||
PLOT_FORMAT format = PLOT_FORMAT::PDF;
|
||||
|
||||
switch( aPlotJob->m_plotFormat )
|
||||
{
|
||||
case SCH_PLOT_FORMAT::DXF: format = PLOT_FORMAT::DXF; break;
|
||||
@ -278,6 +279,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportPlot( JOB* aJob )
|
||||
}
|
||||
|
||||
HPGL_PAGE_SIZE hpglPageSize = HPGL_PAGE_SIZE::DEFAULT;
|
||||
|
||||
switch( aPlotJob->m_HPGLPaperSizeSelect )
|
||||
{
|
||||
case JOB_HPGL_PAGE_SIZE::DEFAULT: hpglPageSize = HPGL_PAGE_SIZE::DEFAULT; break;
|
||||
@ -295,6 +297,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportPlot( JOB* aJob )
|
||||
}
|
||||
|
||||
HPGL_PLOT_ORIGIN_AND_UNITS hpglOrigin = HPGL_PLOT_ORIGIN_AND_UNITS::USER_FIT_PAGE;
|
||||
|
||||
switch( aPlotJob->m_HPGLPlotOrigin )
|
||||
{
|
||||
case JOB_HPGL_PLOT_ORIGIN_AND_UNITS::PLOTTER_BOT_LEFT:
|
||||
@ -321,6 +324,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportPlot( JOB* aJob )
|
||||
}
|
||||
|
||||
wxString outPath = aPlotJob->GetFullOutputPath( &sch->Prj() );
|
||||
|
||||
if( !PATHS::EnsurePathExists( outPath,
|
||||
!aPlotJob->GetOutputPathIsDirectory() ) )
|
||||
{
|
||||
@ -336,6 +340,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportPlot( JOB* aJob )
|
||||
plotOpts.m_PDFPropertyPopups = aPlotJob->m_PDFPropertyPopups;
|
||||
plotOpts.m_PDFHierarchicalLinks = aPlotJob->m_PDFHierarchicalLinks;
|
||||
plotOpts.m_PDFMetadata = aPlotJob->m_PDFMetadata;
|
||||
|
||||
if( aPlotJob->GetOutputPathIsDirectory() )
|
||||
{
|
||||
plotOpts.m_outputDirectory = outPath;
|
||||
@ -346,6 +351,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportPlot( JOB* aJob )
|
||||
plotOpts.m_outputDirectory = wxEmptyString;
|
||||
plotOpts.m_outputFile = outPath;
|
||||
}
|
||||
|
||||
plotOpts.m_pageSizeSelect = pageSizeSelect;
|
||||
plotOpts.m_plotAll = aPlotJob->m_plotAll;
|
||||
plotOpts.m_plotDrawingSheet = aPlotJob->m_plotDrawingSheet;
|
||||
@ -851,7 +857,8 @@ int EESCHEMA_JOBS_HANDLER::doSymExportSvg( JOB_SYM_EXPORT_SVG* aSvgJob,
|
||||
// iterate from unit 1, unit 0 would be "all units" which we don't want
|
||||
for( int unit = 1; unit < symbol->GetUnitCount() + 1; unit++ )
|
||||
{
|
||||
for( int bodyStyle = 1; bodyStyle < ( symbol->HasAlternateBodyStyle() ? 2 : 1 ) + 1; ++bodyStyle )
|
||||
for( int bodyStyle = 1; bodyStyle < ( symbol->HasAlternateBodyStyle() ? 2 : 1 ) + 1;
|
||||
++bodyStyle )
|
||||
{
|
||||
wxString filename;
|
||||
wxFileName fn;
|
||||
@ -883,7 +890,8 @@ int EESCHEMA_JOBS_HANDLER::doSymExportSvg( JOB_SYM_EXPORT_SVG* aSvgJob,
|
||||
RPT_SEVERITY_ACTION );
|
||||
|
||||
// Get the symbol bounding box to fit the plot page to it
|
||||
BOX2I symbolBB = symbol->Flatten()->GetUnitBoundingBox( unit, bodyStyle, !aSvgJob->m_includeHiddenFields );
|
||||
BOX2I symbolBB = symbol->Flatten()->GetUnitBoundingBox(
|
||||
unit, bodyStyle, !aSvgJob->m_includeHiddenFields );
|
||||
PAGE_INFO pageInfo( PAGE_INFO::Custom );
|
||||
pageInfo.SetHeightMils( schIUScale.IUToMils( symbolBB.GetHeight() * 1.2 ) );
|
||||
pageInfo.SetWidthMils( schIUScale.IUToMils( symbolBB.GetWidth() * 1.2 ) );
|
||||
@ -1087,7 +1095,8 @@ int EESCHEMA_JOBS_HANDLER::JobSymUpgrade( JOB* aJob )
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !SCH_IO_MGR::ConvertLibrary( nullptr, fn.GetAbsolutePath(), upgradeJob->m_outputLibraryPath ) )
|
||||
if( !SCH_IO_MGR::ConvertLibrary( nullptr, fn.GetAbsolutePath(),
|
||||
upgradeJob->m_outputLibraryPath ) )
|
||||
{
|
||||
m_reporter->Report( ( "Unable to convert library\n" ), RPT_SEVERITY_ERROR );
|
||||
return CLI::EXIT_CODES::ERR_UNKNOWN;
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
* Configure the SCH_RENDER_SETTINGS object with the correct data to be used with plotting.
|
||||
*
|
||||
* It's sort of a kludge due to the plotter depending on this object normally managed by
|
||||
*the frame and canvas
|
||||
* the frame and canvas.
|
||||
*
|
||||
* @param aRenderSettings The object to populate with working settings.
|
||||
* @param aTheme The theme to take color data from to stick into render settings, can be
|
||||
|
@ -41,9 +41,10 @@
|
||||
|
||||
using namespace T_BOMCFG_T; // for the BOM_CFG_PARSER parser and its keywords
|
||||
|
||||
///! Update the schema version whenever a migration is required
|
||||
/// Update the schema version whenever a migration is required.
|
||||
const int eeschemaSchemaVersion = 3;
|
||||
|
||||
|
||||
/// Default value for bom.plugins
|
||||
const nlohmann::json defaultBomPlugins =
|
||||
{
|
||||
@ -763,9 +764,7 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() :
|
||||
m_params.emplace_back( new PARAM<wxString>( "system.last_symbol_lib_dir",
|
||||
&m_lastSymbolLibDir, "" ) );
|
||||
|
||||
|
||||
// Migrations
|
||||
|
||||
registerMigration( 0, 1,
|
||||
[&]() -> bool
|
||||
{
|
||||
|
@ -252,6 +252,7 @@ void FIELDS_GRID_TABLE::initGrid( WX_GRID* aGrid )
|
||||
SCH_FIELD& valueField = static_cast<SCH_FIELD&>( this->at( VALUE_FIELD ) );
|
||||
valueField.OnScintillaCharAdded( aScintillaTricks, aEvent );
|
||||
} );
|
||||
|
||||
m_valueAttr->SetEditor( valueEditor );
|
||||
}
|
||||
|
||||
@ -940,7 +941,8 @@ void FIELDS_GRID_TABLE::SetValue( int aRow, int aCol, const wxString &aValue )
|
||||
if( value == DEFAULT_FONT_NAME )
|
||||
field.SetFont( nullptr );
|
||||
else if( value == KICAD_FONT_NAME )
|
||||
field.SetFont( KIFONT::FONT::GetFont( wxEmptyString, field.IsBold(), field.IsItalic() ) );
|
||||
field.SetFont( KIFONT::FONT::GetFont( wxEmptyString, field.IsBold(),
|
||||
field.IsItalic() ) );
|
||||
else
|
||||
field.SetFont( KIFONT::FONT::GetFont( aValue, field.IsBold(), field.IsItalic() ) );
|
||||
|
||||
|
@ -34,7 +34,8 @@ static const wxString DescriptionFormat = wxS(
|
||||
"__FIELDS__"
|
||||
"</table>" );
|
||||
|
||||
static const wxString AliasOfFormat = wxS( "<br><i>" ) + _( "Derived from" ) + wxS( " %s (%s)</i>" );
|
||||
static const wxString AliasOfFormat = wxS( "<br><i>" ) + _( "Derived from" ) +
|
||||
wxS( " %s (%s)</i>" );
|
||||
static const wxString DescFormat = wxS( "<br>%s" );
|
||||
static const wxString KeywordsFormat = wxS( "<br>" ) + _( "Keywords" ) + wxS( ": %s" );
|
||||
static const wxString FieldFormat = wxS(
|
||||
@ -129,9 +130,10 @@ protected:
|
||||
root_desc = parent->GetDesc();
|
||||
}
|
||||
|
||||
m_html.Replace( wxS( "__ALIASOF__" ), wxString::Format( AliasOfFormat,
|
||||
EscapeHTML( UnescapeString( root_name ) ),
|
||||
EscapeHTML( root_desc ) ) );
|
||||
m_html.Replace( wxS( "__ALIASOF__" ),
|
||||
wxString::Format( AliasOfFormat,
|
||||
EscapeHTML( UnescapeString( root_name ) ),
|
||||
EscapeHTML( root_desc ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,7 +159,8 @@ protected:
|
||||
if( keywords.empty() )
|
||||
m_html.Replace( wxS( "__KEY__" ), wxEmptyString );
|
||||
else
|
||||
m_html.Replace( wxS( "__KEY__" ), wxString::Format( KeywordsFormat, EscapeHTML( keywords ) ) );
|
||||
m_html.Replace( wxS( "__KEY__" ),
|
||||
wxString::Format( KeywordsFormat, EscapeHTML( keywords ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,20 +29,23 @@ namespace JUNCTION_HELPERS
|
||||
*/
|
||||
struct POINT_INFO
|
||||
{
|
||||
///< True if the point has 3+ wires and/or 3+ buses meeting there
|
||||
/// True if the point has 3+ wires and/or 3+ buses meeting there
|
||||
bool isJunction;
|
||||
///< True if there is already junction dot at the point
|
||||
|
||||
/// True if there is already junction dot at the point
|
||||
bool hasExplicitJunctionDot;
|
||||
///< True if there is a bus entry at the point (either end)
|
||||
|
||||
/// True if there is a bus entry at the point (either end)
|
||||
bool hasBusEntry;
|
||||
///< True if there is a bus entry at the point and it connects to more than one wire
|
||||
|
||||
/// True if there is a bus entry at the point and it connects to more than one wire
|
||||
bool hasBusEntryToMultipleWires;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check a tree of items for a confluence at a given point and work out what kind of junction
|
||||
* it is, if any.
|
||||
*/
|
||||
*/
|
||||
POINT_INFO AnalyzePoint( const EE_RTREE& aItem, const VECTOR2I& aPosition, bool aBreakCrossings );
|
||||
|
||||
} // namespace JUNCTION_HELPERS
|
||||
} // namespace JUNCTION_HELPERS
|
||||
|
@ -265,6 +265,8 @@ unsigned LIB_SYMBOL::GetInheritanceDepth() const
|
||||
|
||||
return depth;
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL_SPTR LIB_SYMBOL::GetRootSymbol() const
|
||||
{
|
||||
const LIB_SYMBOL_SPTR sp = m_parent.lock();
|
||||
@ -643,6 +645,7 @@ void LIB_SYMBOL::Print( const SCH_RENDER_SETTINGS* aSettings, int aUnit, int aBo
|
||||
prms.SetColor( color );
|
||||
shape.SetStroke( prms );
|
||||
}
|
||||
|
||||
shape.Print( aSettings, aUnit, aBodyStyle, aOffset, aForceNoFill, aDimmed );
|
||||
prms.SetColor( init_color );
|
||||
shape.SetStroke( prms );
|
||||
|
@ -91,7 +91,7 @@ public:
|
||||
virtual ~LIB_SYMBOL()
|
||||
{}
|
||||
|
||||
///< http://www.boost.org/doc/libs/1_55_0/libs/smart_ptr/sp_techniques.html#weak_without_shared
|
||||
/// http://www.boost.org/doc/libs/1_55_0/libs/smart_ptr/sp_techniques.html#weak_without_shared.
|
||||
LIB_SYMBOL_SPTR SharedPtr() const { return m_me; }
|
||||
|
||||
/**
|
||||
@ -120,7 +120,7 @@ public:
|
||||
/**
|
||||
* Get the number of parents for this symbol.
|
||||
*
|
||||
* @return the inhertance depth for this symbol.
|
||||
* @return the inheritance depth for this symbol.
|
||||
*/
|
||||
unsigned GetInheritanceDepth() const;
|
||||
|
||||
@ -252,7 +252,7 @@ public:
|
||||
* If aUnit == 0, unit is not used
|
||||
* if aBodyStyle == 0 Convert is non used
|
||||
* Fields are not taken in account
|
||||
**/
|
||||
*/
|
||||
const BOX2I GetBodyBoundingBox( int aUnit, int aBodyStyle, bool aIncludePins,
|
||||
bool aIncludePrivateItems ) const;
|
||||
|
||||
@ -549,7 +549,7 @@ public:
|
||||
* greater that count are removed from the symbol.
|
||||
*
|
||||
* @param aCount - Number of units per package.
|
||||
* @param aDuplicateDrawItems Create duplicate draw items of unit 1 for each additionl unit.
|
||||
* @param aDuplicateDrawItems Create duplicate draw items of unit 1 for each additional unit.
|
||||
*/
|
||||
void SetUnitCount( int aCount, bool aDuplicateDrawItems = true );
|
||||
int GetUnitCount() const override;
|
||||
@ -637,7 +637,7 @@ public:
|
||||
* @note #SCH_FIELD objects are not included.
|
||||
*
|
||||
* @param aUnit is the unit number of the item, -1 includes all units.
|
||||
* @param aBodyStyle is the alternate body styple of the item, -1 includes all body styles.
|
||||
* @param aBodyStyle is the alternate body style of the item, -1 includes all body styles.
|
||||
*
|
||||
* @return a list of unit items.
|
||||
*/
|
||||
|
@ -46,7 +46,7 @@ bool SCH_EDIT_FRAME::CreateArchiveLibrary( const wxString& aFileName )
|
||||
|
||||
// Create a new empty library to archive symbols:
|
||||
std::unique_ptr<SYMBOL_LIB> archLib = std::make_unique<SYMBOL_LIB>( SCH_LIB_TYPE::LT_EESCHEMA,
|
||||
aFileName );
|
||||
aFileName );
|
||||
|
||||
// Save symbols to file only when the library will be fully filled
|
||||
archLib->EnableBuffering();
|
||||
|
@ -42,6 +42,7 @@
|
||||
void SCH_EDIT_FRAME::doReCreateMenuBar()
|
||||
{
|
||||
EE_SELECTION_TOOL* selTool = m_toolManager->GetTool<EE_SELECTION_TOOL>();
|
||||
|
||||
// wxWidgets handles the Mac Application menu behind the scenes, but that means
|
||||
// we always have to start from scratch with a new wxMenuBar.
|
||||
wxMenuBar* oldMenuBar = GetMenuBar();
|
||||
@ -205,7 +206,8 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
|
||||
showHidePanels->Add( EE_ACTIONS::showNetNavigator, ACTION_MENU::CHECK );
|
||||
|
||||
if( ADVANCED_CFG::GetCfg().m_EnableDesignBlocks )
|
||||
showHidePanels->Add( EE_ACTIONS::showDesignBlockPanel, ACTION_MENU::CHECK, _( "Design Blocks" ) );
|
||||
showHidePanels->Add( EE_ACTIONS::showDesignBlockPanel, ACTION_MENU::CHECK,
|
||||
_( "Design Blocks" ) );
|
||||
|
||||
viewMenu->Add( showHidePanels );
|
||||
|
||||
|
@ -350,7 +350,8 @@ void SCH_EDIT_FRAME::RefreshNetNavigator( const NET_NAVIGATOR_ITEM_DATA* aSelect
|
||||
wxTreeItemId selection = m_netNavigator->GetSelection();
|
||||
|
||||
if( selection.IsOk() )
|
||||
itemData = dynamic_cast<NET_NAVIGATOR_ITEM_DATA*>( m_netNavigator->GetItemData( selection ) );
|
||||
itemData = dynamic_cast<NET_NAVIGATOR_ITEM_DATA*>(
|
||||
m_netNavigator->GetItemData( selection ) );
|
||||
|
||||
m_netNavigator->DeleteAllItems();
|
||||
nodeCnt++;
|
||||
@ -401,7 +402,8 @@ void SCH_EDIT_FRAME::SelectNetNavigatorItem( const NET_NAVIGATOR_ITEM_DATA* aSel
|
||||
|
||||
while( itemId.IsOk() )
|
||||
{
|
||||
itemData = dynamic_cast<NET_NAVIGATOR_ITEM_DATA*>( m_netNavigator->GetItemData( itemId ) );
|
||||
itemData = dynamic_cast<NET_NAVIGATOR_ITEM_DATA*>(
|
||||
m_netNavigator->GetItemData( itemId ) );
|
||||
|
||||
wxCHECK2( itemData, continue );
|
||||
|
||||
@ -533,7 +535,8 @@ void SCH_EDIT_FRAME::ToggleNetNavigator()
|
||||
wxTreeItemId selection = m_netNavigator->GetSelection();
|
||||
|
||||
if( selection.IsOk() )
|
||||
itemData = dynamic_cast<NET_NAVIGATOR_ITEM_DATA*>( m_netNavigator->GetItemData( selection ) );
|
||||
itemData = dynamic_cast<NET_NAVIGATOR_ITEM_DATA*>(
|
||||
m_netNavigator->GetItemData( selection ) );
|
||||
|
||||
RefreshNetNavigator( itemData );
|
||||
|
||||
@ -559,7 +562,7 @@ void SCH_EDIT_FRAME::onResizeNetNavigator( wxSizeEvent& aEvent )
|
||||
// Store the current pane size
|
||||
// It allows to retrieve the last defined pane size when switching between
|
||||
// docked and floating pane state
|
||||
// Note: *DO NOT* call m_auimgr.Update() here: it crashes Kicad at least on Windows
|
||||
// Note: *DO NOT* call m_auimgr.Update() here: it crashes KiCad at least on Windows
|
||||
|
||||
EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
|
||||
|
||||
|
@ -119,6 +119,7 @@ void SCH_EDIT_FRAME::SelectUnit( SCH_SYMBOL* aSymbol, int aUnit )
|
||||
const wxString targetUnitName = symbol->GetUnitDisplayName( aUnit );
|
||||
const wxString currUnitName = symbol->GetUnitDisplayName( currentUnit );
|
||||
wxString otherSheetName = otherSymbolRef->GetSheetPath().PathHumanReadable( true, true );
|
||||
|
||||
if( otherSheetName.IsEmpty() )
|
||||
otherSheetName = _( "Root" );
|
||||
|
||||
|
@ -425,6 +425,7 @@ OPT_BOX2I PIN_LAYOUT_CACHE::getUntransformedPinNameBox() const
|
||||
OPT_BOX2I PIN_LAYOUT_CACHE::getUntransformedPinNumberBox() const
|
||||
{
|
||||
int pinNameOffset = 0;
|
||||
|
||||
if( const SYMBOL* parentSymbol = m_pin.GetParentSymbol() )
|
||||
{
|
||||
if( parentSymbol->GetShowPinNames() )
|
||||
@ -613,7 +614,7 @@ std::optional<PIN_LAYOUT_CACHE::TEXT_INFO> PIN_LAYOUT_CACHE::GetPinNameInfo( int
|
||||
// But it's not hugely expensive to recompute, and that's what's always been
|
||||
// done to now
|
||||
//
|
||||
// Becasue pins are very likely to share a lot of characteristics, a global
|
||||
// Because pins are very likely to share a lot of characteristics, a global
|
||||
// cache might make more sense than a per-pin cache.
|
||||
|
||||
if( name.IsEmpty() || !m_pin.GetParentSymbol()->GetShowPinNames() )
|
||||
@ -673,6 +674,7 @@ std::optional<PIN_LAYOUT_CACHE::TEXT_INFO> PIN_LAYOUT_CACHE::GetPinNumberInfo( i
|
||||
const bool numAbove =
|
||||
m_pin.GetParentSymbol()->GetPinNameOffset() > 0
|
||||
|| ( m_pin.GetShownName().empty() || !m_pin.GetParentSymbol()->GetShowPinNames() );
|
||||
|
||||
if( numAbove )
|
||||
{
|
||||
info->m_TextPosition.y -= getPinTextOffset() + info->m_Thickness / 2;
|
||||
@ -688,6 +690,7 @@ std::optional<PIN_LAYOUT_CACHE::TEXT_INFO> PIN_LAYOUT_CACHE::GetPinNumberInfo( i
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
std::optional<PIN_LAYOUT_CACHE::TEXT_INFO>
|
||||
PIN_LAYOUT_CACHE::GetPinElectricalTypeInfo( int aShadowWidth )
|
||||
{
|
||||
|
@ -174,7 +174,7 @@ private:
|
||||
OPT_BOX2I getUntransformedPinTypeBox() const;
|
||||
OPT_BOX2I getUntransformedAltIconBox() const;
|
||||
|
||||
///< Pin type decoration if any
|
||||
/// Pin type decoration if any
|
||||
OPT_BOX2I getUntransformedDecorationBox() const;
|
||||
|
||||
/// The pin in question
|
||||
@ -196,4 +196,4 @@ private:
|
||||
TEXT_EXTENTS_CACHE m_numExtentsCache;
|
||||
TEXT_EXTENTS_CACHE m_nameExtentsCache;
|
||||
TEXT_EXTENTS_CACHE m_typeExtentsCache;
|
||||
};
|
||||
};
|
||||
|
@ -37,7 +37,8 @@ wxString PIN_NUMBERS::getNextSymbol( const wxString& str, wxString::size_type& c
|
||||
wxChar c = str[cursor];
|
||||
|
||||
// Need to check that there is a digit in the string before we parse it as a numeric
|
||||
if( ( wxIsdigit( c ) || ( ( c == '+' || c == '-' ) && ( cursor < str.size() - 1 ) && wxIsdigit( str[cursor + 1] ) ) ) )
|
||||
if( ( wxIsdigit( c ) || ( ( c == '+' || c == '-' ) && ( cursor < str.size() - 1 )
|
||||
&& wxIsdigit( str[cursor + 1] ) ) ) )
|
||||
{
|
||||
// number, possibly with sign
|
||||
while( ++cursor < str.size() )
|
||||
@ -72,6 +73,7 @@ wxString PIN_NUMBERS::GetSummary() const
|
||||
wxString ret;
|
||||
|
||||
const_iterator i = begin();
|
||||
|
||||
if( i == end() )
|
||||
return ret;
|
||||
|
||||
@ -92,13 +94,16 @@ wxString PIN_NUMBERS::GetSummary() const
|
||||
continue;
|
||||
|
||||
ret += *begin_of_range;
|
||||
|
||||
if( begin_of_range != last )
|
||||
{
|
||||
ret += '-';
|
||||
ret += *last;
|
||||
}
|
||||
|
||||
if( i == end() )
|
||||
break;
|
||||
|
||||
begin_of_range = i;
|
||||
ret += ',';
|
||||
}
|
||||
@ -188,7 +193,9 @@ int PIN_NUMBERS::Compare( const wxString& lhs, const wxString& rhs )
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -82,37 +82,42 @@ void InitTables()
|
||||
{
|
||||
// clang-format off
|
||||
g_pinElectricalTypes = {
|
||||
{ ELECTRICAL_PINTYPE::PT_INPUT, { _( "Input" ), BITMAPS::pintype_input } },
|
||||
{ ELECTRICAL_PINTYPE::PT_OUTPUT, { _( "Output" ), BITMAPS::pintype_output } },
|
||||
{ ELECTRICAL_PINTYPE::PT_BIDI, { _( "Bidirectional" ), BITMAPS::pintype_bidi } },
|
||||
{ ELECTRICAL_PINTYPE::PT_TRISTATE, { _( "Tri-state" ), BITMAPS::pintype_3states } },
|
||||
{ ELECTRICAL_PINTYPE::PT_PASSIVE, { _( "Passive" ), BITMAPS::pintype_passive } },
|
||||
{ ELECTRICAL_PINTYPE::PT_NIC, { _( "Free" ), BITMAPS::pintype_nic } },
|
||||
{ ELECTRICAL_PINTYPE::PT_UNSPECIFIED, { _( "Unspecified" ), BITMAPS::pintype_notspecif } },
|
||||
{ ELECTRICAL_PINTYPE::PT_POWER_IN, { _( "Power input" ), BITMAPS::pintype_powerinput } },
|
||||
{ ELECTRICAL_PINTYPE::PT_POWER_OUT, { _( "Power output" ), BITMAPS::pintype_poweroutput } },
|
||||
{ ELECTRICAL_PINTYPE::PT_OPENCOLLECTOR, { _( "Open collector" ), BITMAPS::pintype_opencoll } },
|
||||
{ ELECTRICAL_PINTYPE::PT_OPENEMITTER, { _( "Open emitter" ), BITMAPS::pintype_openemit } },
|
||||
{ ELECTRICAL_PINTYPE::PT_NC, { _( "Unconnected" ), BITMAPS::pintype_noconnect } },
|
||||
{ ELECTRICAL_PINTYPE::PT_INPUT, { _( "Input" ), BITMAPS::pintype_input } },
|
||||
{ ELECTRICAL_PINTYPE::PT_OUTPUT, { _( "Output" ), BITMAPS::pintype_output } },
|
||||
{ ELECTRICAL_PINTYPE::PT_BIDI, { _( "Bidirectional" ), BITMAPS::pintype_bidi } },
|
||||
{ ELECTRICAL_PINTYPE::PT_TRISTATE, { _( "Tri-state" ), BITMAPS::pintype_3states } },
|
||||
{ ELECTRICAL_PINTYPE::PT_PASSIVE, { _( "Passive" ), BITMAPS::pintype_passive } },
|
||||
{ ELECTRICAL_PINTYPE::PT_NIC, { _( "Free" ), BITMAPS::pintype_nic } },
|
||||
{ ELECTRICAL_PINTYPE::PT_UNSPECIFIED, { _( "Unspecified" ), BITMAPS::pintype_notspecif } },
|
||||
{ ELECTRICAL_PINTYPE::PT_POWER_IN, { _( "Power input" ), BITMAPS::pintype_powerinput } },
|
||||
{ ELECTRICAL_PINTYPE::PT_POWER_OUT, { _( "Power output" ), BITMAPS::pintype_poweroutput } },
|
||||
{ ELECTRICAL_PINTYPE::PT_OPENCOLLECTOR, { _( "Open collector" ),
|
||||
BITMAPS::pintype_opencoll } },
|
||||
{ ELECTRICAL_PINTYPE::PT_OPENEMITTER, { _( "Open emitter" ), BITMAPS::pintype_openemit } },
|
||||
{ ELECTRICAL_PINTYPE::PT_NC, { _( "Unconnected" ), BITMAPS::pintype_noconnect } },
|
||||
};
|
||||
|
||||
g_pinShapes = {
|
||||
{ GRAPHIC_PINSHAPE::LINE, { _( "Line" ), BITMAPS::pinshape_normal } },
|
||||
{ GRAPHIC_PINSHAPE::INVERTED, { _( "Inverted" ), BITMAPS::pinshape_invert } },
|
||||
{ GRAPHIC_PINSHAPE::CLOCK, { _( "Clock" ), BITMAPS::pinshape_clock_normal } },
|
||||
{ GRAPHIC_PINSHAPE::INVERTED_CLOCK, { _( "Inverted clock" ), BITMAPS::pinshape_clock_invert } },
|
||||
{ GRAPHIC_PINSHAPE::INPUT_LOW, { _( "Input low" ), BITMAPS::pinshape_active_low_input } },
|
||||
{ GRAPHIC_PINSHAPE::CLOCK_LOW, { _( "Clock low" ), BITMAPS::pinshape_clock_active_low } },
|
||||
{ GRAPHIC_PINSHAPE::OUTPUT_LOW, { _( "Output low" ), BITMAPS::pinshape_active_low_output } },
|
||||
{ GRAPHIC_PINSHAPE::FALLING_EDGE_CLOCK, { _( "Falling edge clock" ), BITMAPS::pinshape_clock_fall } },
|
||||
{ GRAPHIC_PINSHAPE::NONLOGIC, { _( "NonLogic" ), BITMAPS::pinshape_nonlogic } },
|
||||
{ GRAPHIC_PINSHAPE::LINE, { _( "Line" ), BITMAPS::pinshape_normal } },
|
||||
{ GRAPHIC_PINSHAPE::INVERTED, { _( "Inverted" ), BITMAPS::pinshape_invert } },
|
||||
{ GRAPHIC_PINSHAPE::CLOCK, { _( "Clock" ), BITMAPS::pinshape_clock_normal } },
|
||||
{ GRAPHIC_PINSHAPE::INVERTED_CLOCK, { _( "Inverted clock" ),
|
||||
BITMAPS::pinshape_clock_invert } },
|
||||
{ GRAPHIC_PINSHAPE::INPUT_LOW, { _( "Input low" ), BITMAPS::pinshape_active_low_input } },
|
||||
{ GRAPHIC_PINSHAPE::CLOCK_LOW, { _( "Clock low" ), BITMAPS::pinshape_clock_active_low } },
|
||||
{ GRAPHIC_PINSHAPE::OUTPUT_LOW, { _( "Output low" ),
|
||||
BITMAPS::pinshape_active_low_output } },
|
||||
{ GRAPHIC_PINSHAPE::FALLING_EDGE_CLOCK, { _( "Falling edge clock" ),
|
||||
BITMAPS::pinshape_clock_fall } },
|
||||
{ GRAPHIC_PINSHAPE::NONLOGIC, { _( "NonLogic" ),
|
||||
BITMAPS::pinshape_nonlogic } },
|
||||
};
|
||||
|
||||
g_pinOrientations = {
|
||||
{ PIN_ORIENTATION::PIN_RIGHT, { _( "Right" ), BITMAPS::pinorient_right } },
|
||||
{ PIN_ORIENTATION::PIN_LEFT, { _( "Left" ), BITMAPS::pinorient_left } },
|
||||
{ PIN_ORIENTATION::PIN_UP, { _( "Up" ), BITMAPS::pinorient_up } },
|
||||
{ PIN_ORIENTATION::PIN_DOWN, { _( "Down" ), BITMAPS::pinorient_down } },
|
||||
{ PIN_ORIENTATION::PIN_RIGHT, { _( "Right" ), BITMAPS::pinorient_right } },
|
||||
{ PIN_ORIENTATION::PIN_LEFT, { _( "Left" ), BITMAPS::pinorient_left } },
|
||||
{ PIN_ORIENTATION::PIN_UP, { _( "Up" ), BITMAPS::pinorient_up } },
|
||||
{ PIN_ORIENTATION::PIN_DOWN, { _( "Down" ), BITMAPS::pinorient_down } },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
@ -37,8 +37,10 @@ enum class ELECTRICAL_PINTYPE
|
||||
PT_INPUT, ///< usual pin input: must be connected
|
||||
PT_OUTPUT, ///< usual output
|
||||
PT_BIDI, ///< input or output (like port for a microprocessor)
|
||||
PT_TRISTATE, ///< tris state bus pin
|
||||
PT_PASSIVE, ///< pin for passive symbols: must be connected, and can be connected to any pin
|
||||
PT_TRISTATE, ///< tri state bus pin
|
||||
|
||||
/// pin for passive symbols: must be connected, and can be connected to any pin.
|
||||
PT_PASSIVE,
|
||||
PT_NIC, ///< not internally connected (may be connected to anything)
|
||||
PT_UNSPECIFIED, ///< unknown electrical properties: creates always a warning when connected
|
||||
PT_POWER_IN, ///< power input (GND, VCC for ICs). Must be connected to a power output.
|
||||
@ -82,12 +84,14 @@ enum class PIN_ORIENTATION
|
||||
* x---|
|
||||
*/
|
||||
PIN_RIGHT,
|
||||
|
||||
/**
|
||||
* The pin extends leftwards from the connection point:
|
||||
* Probably on the right side of the symbol.
|
||||
* |---x
|
||||
*/
|
||||
PIN_LEFT,
|
||||
|
||||
/**
|
||||
* The pin extends upwards from the connection point:
|
||||
* Probably on the bottom side of the symbol.
|
||||
@ -96,6 +100,7 @@ enum class PIN_ORIENTATION
|
||||
* x
|
||||
*/
|
||||
PIN_UP,
|
||||
|
||||
/**
|
||||
* The pin extends downwards from the connection:
|
||||
* Probably on the top side of the symbol.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user