Default eeschema strings to wide
Prevents stack bug on MacOS
This commit is contained in:
parent
209d593ca0
commit
a444addd89
|
@ -243,7 +243,7 @@ protected:
|
|||
case PIN_UP: return SIDE_BOTTOM;
|
||||
case PIN_DOWN: return SIDE_TOP;
|
||||
default:
|
||||
wxFAIL_MSG( "Invalid pin orientation" );
|
||||
wxFAIL_MSG( wxT( "Invalid pin orientation" ) );
|
||||
return SIDE_LEFT;
|
||||
}
|
||||
}
|
||||
|
@ -273,7 +273,7 @@ protected:
|
|||
*/
|
||||
void getPossibleCollisions( std::vector<SCH_ITEM*>& aItems )
|
||||
{
|
||||
wxCHECK_RET( m_screen, "getPossibleCollisions() with null m_screen" );
|
||||
wxCHECK_RET( m_screen, wxT( "getPossibleCollisions() with null m_screen" ) );
|
||||
|
||||
EDA_RECT symbolBox = m_symbol->GetBodyAndPinsBoundingBox();
|
||||
std::vector<SIDE_AND_NPINS> sides = getPreferredSides();
|
||||
|
@ -664,7 +664,7 @@ protected:
|
|||
field_xcoord = aFieldBox.GetRight();
|
||||
break;
|
||||
default:
|
||||
wxFAIL_MSG( "Unexpected value for SCH_FIELD::GetHorizJustify()" );
|
||||
wxFAIL_MSG( wxT( "Unexpected value for SCH_FIELD::GetHorizJustify()" ) );
|
||||
field_xcoord = aFieldBox.Centre().x; // Most are centered
|
||||
}
|
||||
|
||||
|
@ -733,7 +733,7 @@ const AUTOPLACER::SIDE AUTOPLACER::SIDE_RIGHT( 1, 0 );
|
|||
void SCH_SYMBOL::AutoplaceFields( SCH_SCREEN* aScreen, bool aManual )
|
||||
{
|
||||
if( aManual )
|
||||
wxASSERT_MSG( aScreen, "A SCH_SCREEN pointer must be given for manual autoplacement" );
|
||||
wxASSERT_MSG( aScreen, wxT( "A SCH_SCREEN pointer must be given for manual autoplacement" ) );
|
||||
|
||||
AUTOPLACER autoplacer( this, aScreen );
|
||||
autoplacer.DoAutoplace( aManual );
|
||||
|
|
|
@ -57,14 +57,14 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
|
|||
// python <script_path>/script.py
|
||||
// and *not* python <script_path>\script.py
|
||||
// Otherwise the script does not find some auxiliary pythons scripts needed by this script
|
||||
if( extension == "xsl" )
|
||||
if( extension == wxT( "xsl" ) )
|
||||
{
|
||||
m_info = readHeader( "-->" );
|
||||
m_info = readHeader( wxT( "-->" ) );
|
||||
m_cmd = wxString::Format( "xsltproc -o \"%%O%s\" \"%s\" \"%%I\"",
|
||||
getOutputExtension( m_info ),
|
||||
m_file.GetFullPath() );
|
||||
}
|
||||
else if( extension == "py" )
|
||||
else if( extension == wxT( "py" ) )
|
||||
{
|
||||
m_info = readHeader( "\"\"\"" );
|
||||
#ifdef __WINDOWS__
|
||||
|
@ -107,7 +107,7 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
|
|||
#endif
|
||||
}
|
||||
#ifdef __WINDOWS__
|
||||
else if( extension == "pyw" )
|
||||
else if( extension == wxT( "pyw" ) )
|
||||
{
|
||||
m_info = readHeader( "\"\"\"" );
|
||||
m_cmd = wxString::Format( "pythonw \"%s/%s\" \"%%I\" \"%%O%s\"",
|
||||
|
@ -121,7 +121,7 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
|
|||
m_cmd = m_file.GetFullPath();
|
||||
}
|
||||
|
||||
wxLogTrace( BOM_TRACE, "%s: extracted command line %s", m_name, m_cmd );
|
||||
wxLogTrace( BOM_TRACE, wxT( "%s: extracted command line %s" ), m_name, m_cmd );
|
||||
}
|
||||
|
||||
|
||||
|
@ -130,7 +130,7 @@ bool BOM_GENERATOR_HANDLER::IsValidGenerator( const wxString& aFile )
|
|||
wxFileName fn( aFile );
|
||||
wxString ext = fn.GetExt().Lower();
|
||||
|
||||
for( const auto& pluginExt : { "xsl", "py", "pyw" } )
|
||||
for( const auto& pluginExt : { wxT( "xsl" ), wxT( "py" ), wxT( "pyw" ) } )
|
||||
{
|
||||
if( pluginExt == ext )
|
||||
return true;
|
||||
|
@ -145,13 +145,13 @@ wxString BOM_GENERATOR_HANDLER::readHeader( const wxString& aEndSection )
|
|||
if( aEndSection.IsEmpty() )
|
||||
return wxEmptyString;
|
||||
|
||||
wxFFile fdata( m_file.GetFullPath(), "rb" ); // dtor will close the file
|
||||
wxFFile fdata( m_file.GetFullPath(), wxT( "rb" ) ); // dtor will close the file
|
||||
wxString data;
|
||||
|
||||
if( !fdata.ReadAll( &data ) )
|
||||
return wxEmptyString;
|
||||
|
||||
const wxString header( "@package" );
|
||||
const wxString header( wxT( "@package" ) );
|
||||
|
||||
// Extract substring between @package and endsection
|
||||
int strstart = data.Find( header );
|
||||
|
@ -198,7 +198,7 @@ wxFileName BOM_GENERATOR_HANDLER::FindFilePath() const
|
|||
{
|
||||
if( m_file.IsAbsolute() && m_file.Exists( wxFILE_EXISTS_REGULAR ) )
|
||||
{
|
||||
wxLogTrace( BOM_TRACE, "%s found directly", m_file.GetFullPath() );
|
||||
wxLogTrace( BOM_TRACE, wxT( "%s found directly" ), m_file.GetFullPath() );
|
||||
return m_file;
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ wxFileName BOM_GENERATOR_HANDLER::FindFilePath() const
|
|||
|
||||
if( test.Exists( wxFILE_EXISTS_REGULAR ) )
|
||||
{
|
||||
wxLogTrace( BOM_TRACE, "%s found in user plugins path %s", m_file.GetFullName(),
|
||||
wxLogTrace( BOM_TRACE, wxT( "%s found in user plugins path %s" ), m_file.GetFullName(),
|
||||
PATHS::GetUserPluginsPath() );
|
||||
return test;
|
||||
}
|
||||
|
@ -215,12 +215,12 @@ wxFileName BOM_GENERATOR_HANDLER::FindFilePath() const
|
|||
|
||||
if( test.Exists( wxFILE_EXISTS_REGULAR ) )
|
||||
{
|
||||
wxLogTrace( BOM_TRACE, "%s found in stock plugins path %s", m_file.GetFullName(),
|
||||
wxLogTrace( BOM_TRACE, wxT( "%s found in stock plugins path %s" ), m_file.GetFullName(),
|
||||
PATHS::GetStockPluginsPath() );
|
||||
return test;
|
||||
}
|
||||
|
||||
wxLogTrace( BOM_TRACE, "Could not find %s (checked %s, %s)", m_file.GetFullName(),
|
||||
wxLogTrace( BOM_TRACE, wxT( "Could not find %s (checked %s, %s)" ), m_file.GetFullName(),
|
||||
PATHS::GetUserPluginsPath(), PATHS::GetStockPluginsPath() );
|
||||
|
||||
return m_file;
|
||||
|
|
|
@ -303,9 +303,9 @@ wxString buildFullReference( const SCH_REFERENCE& aItem, int aUnitNumber = -1 )
|
|||
fullref = aItem.GetRef() + aItem.GetRefNumber();
|
||||
|
||||
if( aUnitNumber < 0 )
|
||||
fullref << ".." << aItem.GetUnit();
|
||||
fullref << wxT( ".." ) << aItem.GetUnit();
|
||||
else
|
||||
fullref << ".." << aUnitNumber;
|
||||
fullref << wxT( ".." ) << aUnitNumber;
|
||||
|
||||
return fullref;
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ wxString CONNECTION_SUBGRAPH::GetNetName() const
|
|||
if( !m_driver->Connection( &m_sheet ) )
|
||||
{
|
||||
#ifdef CONNECTIVITY_DEBUG
|
||||
wxASSERT_MSG( false, "Tried to get the net name of an item with no connection" );
|
||||
wxASSERT_MSG( false, wxT( "Tried to get the net name of an item with no connection" ) );
|
||||
#endif
|
||||
|
||||
return "";
|
||||
|
@ -288,7 +288,7 @@ wxString CONNECTION_SUBGRAPH::driverName( SCH_ITEM* aItem ) const
|
|||
}
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Unhandled item type in GetNameForDriver" );
|
||||
wxFAIL_MSG( wxT( "Unhandled item type in GetNameForDriver" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -711,7 +711,7 @@ void CONNECTION_GRAPH::updateItemConnectivity( const SCH_SHEET_PATH& aSheet,
|
|||
void CONNECTION_GRAPH::buildConnectionGraph()
|
||||
{
|
||||
// Recache all bus aliases for later use
|
||||
wxCHECK_RET( m_schematic, "Connection graph cannot be built without schematic pointer" );
|
||||
wxCHECK_RET( m_schematic, wxT( "Connection graph cannot be built without schematic pointer" ) );
|
||||
|
||||
SCH_SHEET_LIST all_sheets = m_schematic->GetSheets();
|
||||
|
||||
|
@ -916,7 +916,7 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
|||
break;
|
||||
}
|
||||
default:
|
||||
wxLogTrace( ConnTrace, "Unexpected strong driver %s",
|
||||
wxLogTrace( ConnTrace, wxT( "Unexpected strong driver %s" ),
|
||||
driver->GetSelectMenuText( EDA_UNITS::MILLIMETRES ) );
|
||||
break;
|
||||
}
|
||||
|
@ -1018,14 +1018,14 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
|||
|
||||
wxString oldName = aConn->Name().AfterFirst( '{' );
|
||||
|
||||
newName = wxString::Format( "%s_%u{%s", prefix, suffix, oldName );
|
||||
newName = wxString::Format( wxT( "%s_%u{%s" ), prefix, suffix, oldName );
|
||||
|
||||
aConn->ConfigureFromLabel( newName );
|
||||
}
|
||||
else
|
||||
{
|
||||
newName = wxString::Format( "%s_%u", aConn->Name(), suffix );
|
||||
aConn->SetSuffix( wxString::Format( "_%u", suffix ) );
|
||||
newName = wxString::Format( wxT( "%s_%u" ), aConn->Name(), suffix );
|
||||
aConn->SetSuffix( wxString::Format( wxT( "_%u" ), suffix ) );
|
||||
}
|
||||
|
||||
suffix++;
|
||||
|
@ -1051,7 +1051,7 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
|||
while( m_net_name_to_subgraphs_map.count( new_name ) )
|
||||
new_name = create_new_name( connection );
|
||||
|
||||
wxLogTrace( ConnTrace, "%ld (%s) is weakly driven and not unique. Changing to %s.",
|
||||
wxLogTrace( ConnTrace, wxT( "%ld (%s) is weakly driven and not unique. Changing to %s." ),
|
||||
subgraph->m_code, name, new_name );
|
||||
|
||||
alg::delete_matching( *vec, subgraph );
|
||||
|
@ -1092,13 +1092,13 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
|||
if( conflict )
|
||||
{
|
||||
wxLogTrace( ConnTrace,
|
||||
"%ld (%s) skipped for promotion due to potential conflict",
|
||||
wxT( "%ld (%s) skipped for promotion due to potential conflict" ),
|
||||
subgraph->m_code, name );
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogTrace( ConnTrace,
|
||||
"%ld (%s) weakly driven by unique sheet pin %s, promoting",
|
||||
wxT( "%ld (%s) weakly driven by unique sheet pin %s, promoting" ),
|
||||
subgraph->m_code, name,
|
||||
subgraph->m_driver->GetSelectMenuText( EDA_UNITS::MILLIMETRES ) );
|
||||
|
||||
|
@ -1188,7 +1188,7 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
|||
|
||||
connections_to_check.push_back( c );
|
||||
wxLogTrace( ConnTrace,
|
||||
"%lu (%s): Adding secondary driver %s", aSubgraph->m_code,
|
||||
wxT( "%lu (%s): Adding secondary driver %s" ), aSubgraph->m_code,
|
||||
aSubgraph->m_driver_connection->Name( true ), c->Name( true ) );
|
||||
}
|
||||
}
|
||||
|
@ -1266,7 +1266,7 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
|||
{
|
||||
if( connection->IsBus() && candidate->m_driver_connection->IsNet() )
|
||||
{
|
||||
wxLogTrace( ConnTrace, "%lu (%s) has bus child %lu (%s)", subgraph->m_code,
|
||||
wxLogTrace( ConnTrace, wxT( "%lu (%s) has bus child %lu (%s)" ), subgraph->m_code,
|
||||
connection->Name(), candidate->m_code, member->Name() );
|
||||
|
||||
subgraph->m_bus_neighbors[member].insert( candidate );
|
||||
|
@ -1274,7 +1274,7 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
|||
}
|
||||
else
|
||||
{
|
||||
wxLogTrace( ConnTrace, "%lu (%s) absorbs neighbor %lu (%s)",
|
||||
wxLogTrace( ConnTrace, wxT( "%lu (%s) absorbs neighbor %lu (%s)" ),
|
||||
subgraph->m_code, connection->Name(),
|
||||
candidate->m_code, candidate->m_driver_connection->Name() );
|
||||
|
||||
|
@ -1302,7 +1302,7 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
|||
else
|
||||
assignNewNetCode( *subgraph->m_driver_connection );
|
||||
|
||||
wxLogTrace( ConnTrace, "Re-resolving drivers for %lu (%s)", subgraph->m_code,
|
||||
wxLogTrace( ConnTrace, wxT( "Re-resolving drivers for %lu (%s)" ), subgraph->m_code,
|
||||
subgraph->m_driver_connection->Name() );
|
||||
}
|
||||
|
||||
|
@ -1364,7 +1364,7 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
|||
if( !subgraph->m_dirty )
|
||||
continue;
|
||||
|
||||
wxLogTrace( ConnTrace, "Processing %lu (%s) for propagation", subgraph->m_code,
|
||||
wxLogTrace( ConnTrace, wxT( "Processing %lu (%s) for propagation" ), subgraph->m_code,
|
||||
subgraph->m_driver_connection->Name() );
|
||||
|
||||
// For subgraphs that are driven by a global (power port or label) and have more
|
||||
|
@ -1398,7 +1398,7 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
|||
|
||||
if( conn->Name() == secondary_name )
|
||||
{
|
||||
wxLogTrace( ConnTrace, "Global %lu (%s) promoted to %s", candidate->m_code,
|
||||
wxLogTrace( ConnTrace, wxT( "Global %lu (%s) promoted to %s" ), candidate->m_code,
|
||||
conn->Name(), subgraph->m_driver_connection->Name() );
|
||||
|
||||
conn->Clone( *subgraph->m_driver_connection );
|
||||
|
@ -1426,14 +1426,14 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
|||
for( CONNECTION_SUBGRAPH* subgraph : m_driver_subgraphs )
|
||||
{
|
||||
// All SGs should have been processed by propagateToNeighbors above
|
||||
wxASSERT_MSG( !subgraph->m_dirty, "Subgraph not processed by propagateToNeighbors!" );
|
||||
wxASSERT_MSG( !subgraph->m_dirty, wxT( "Subgraph not processed by propagateToNeighbors!" ) );
|
||||
|
||||
if( subgraph->m_bus_parents.size() < 2 )
|
||||
continue;
|
||||
|
||||
SCH_CONNECTION* conn = subgraph->m_driver_connection;
|
||||
|
||||
wxLogTrace( ConnTrace, "%lu (%s) has multiple bus parents",
|
||||
wxLogTrace( ConnTrace, wxT( "%lu (%s) has multiple bus parents" ),
|
||||
subgraph->m_code, conn->Name() );
|
||||
|
||||
wxASSERT( conn->IsNet() );
|
||||
|
@ -1451,7 +1451,7 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
|||
|
||||
if( !match )
|
||||
{
|
||||
wxLogTrace( ConnTrace, "Warning: could not match %s inside %lu (%s)",
|
||||
wxLogTrace( ConnTrace, wxT( "Warning: could not match %s inside %lu (%s)" ),
|
||||
conn->Name(), parent->m_code, parent->m_driver_connection->Name() );
|
||||
continue;
|
||||
}
|
||||
|
@ -1460,7 +1460,7 @@ void CONNECTION_GRAPH::buildConnectionGraph()
|
|||
{
|
||||
wxString old_name = match->Name();
|
||||
|
||||
wxLogTrace( ConnTrace, "Updating %lu (%s) member %s to %s", parent->m_code,
|
||||
wxLogTrace( ConnTrace, wxT( "Updating %lu (%s) member %s to %s" ), parent->m_code,
|
||||
parent->m_driver_connection->Name(), old_name, conn->Name() );
|
||||
|
||||
match->Clone( *conn );
|
||||
|
@ -1651,7 +1651,7 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph )
|
|||
{
|
||||
if( candidate->GetNameForDriver( label ) == aParent->GetNameForDriver( pin ) )
|
||||
{
|
||||
wxLogTrace( ConnTrace, "%lu: found child %lu (%s)", aParent->m_code,
|
||||
wxLogTrace( ConnTrace, wxT( "%lu: found child %lu (%s)" ), aParent->m_code,
|
||||
candidate->m_code, candidate->m_driver_connection->Name() );
|
||||
|
||||
candidate->m_hier_parent = aParent;
|
||||
|
@ -1692,7 +1692,7 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph )
|
|||
|
||||
if( aParent->GetNameForDriver( label ) == candidate->GetNameForDriver( pin ) )
|
||||
{
|
||||
wxLogTrace( ConnTrace, "%lu: found additional parent %lu (%s)",
|
||||
wxLogTrace( ConnTrace, wxT( "%lu: found additional parent %lu (%s)" ),
|
||||
aParent->m_code, candidate->m_code,
|
||||
candidate->m_driver_connection->Name() );
|
||||
|
||||
|
@ -1747,7 +1747,7 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph )
|
|||
// This is bad, probably an ERC error
|
||||
if( !member )
|
||||
{
|
||||
wxLogTrace( ConnTrace, "Could not match bus member %s in %s",
|
||||
wxLogTrace( ConnTrace, wxT( "Could not match bus member %s in %s" ),
|
||||
kv.first->Name(), parent->Name() );
|
||||
continue;
|
||||
}
|
||||
|
@ -1766,7 +1766,7 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph )
|
|||
// Safety check against infinite recursion
|
||||
wxASSERT( neighbor_conn->IsNet() );
|
||||
|
||||
wxLogTrace( ConnTrace, "%lu (%s) connected to bus member %s (local %s)",
|
||||
wxLogTrace( ConnTrace, wxT( "%lu (%s) connected to bus member %s (local %s)" ),
|
||||
neighbor->m_code, neighbor_name, member->Name(), member->LocalName() );
|
||||
|
||||
// Take whichever name is higher priority
|
||||
|
@ -1799,13 +1799,13 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph )
|
|||
// on which subgraph comes up first)
|
||||
if( !aSubgraph->m_hier_ports.empty() && !aSubgraph->m_hier_pins.empty() )
|
||||
{
|
||||
wxLogTrace( ConnTrace, "%lu (%s) has both hier ports and pins; deferring processing",
|
||||
wxLogTrace( ConnTrace, wxT( "%lu (%s) has both hier ports and pins; deferring processing" ),
|
||||
aSubgraph->m_code, conn->Name() );
|
||||
return;
|
||||
}
|
||||
else if( aSubgraph->m_hier_ports.empty() && aSubgraph->m_hier_pins.empty() )
|
||||
{
|
||||
wxLogTrace( ConnTrace, "%lu (%s) has no hier pins or ports; marking clean",
|
||||
wxLogTrace( ConnTrace, wxT( "%lu (%s) has no hier pins or ports; marking clean" ),
|
||||
aSubgraph->m_code, conn->Name() );
|
||||
aSubgraph->m_dirty = false;
|
||||
return;
|
||||
|
@ -1813,7 +1813,7 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph )
|
|||
|
||||
visited.insert( aSubgraph );
|
||||
|
||||
wxLogTrace( ConnTrace, "Propagating %lu (%s) to subsheets",
|
||||
wxLogTrace( ConnTrace, wxT( "Propagating %lu (%s) to subsheets" ),
|
||||
aSubgraph->m_code, aSubgraph->m_driver_connection->Name() );
|
||||
|
||||
visit( aSubgraph );
|
||||
|
@ -1876,7 +1876,7 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph )
|
|||
|
||||
if( bestDriver != aSubgraph )
|
||||
{
|
||||
wxLogTrace( ConnTrace, "%lu (%s) overridden by new driver %lu (%s)",
|
||||
wxLogTrace( ConnTrace, wxT( "%lu (%s) overridden by new driver %lu (%s)" ),
|
||||
aSubgraph->m_code, aSubgraph->m_driver_connection->Name(), bestDriver->m_code,
|
||||
bestDriver->m_driver_connection->Name() );
|
||||
}
|
||||
|
@ -1910,12 +1910,12 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph )
|
|||
|
||||
if( !member )
|
||||
{
|
||||
wxLogTrace( ConnTrace, "WARNING: failed to match stale member %s in %s.",
|
||||
wxLogTrace( ConnTrace, wxT( "WARNING: failed to match stale member %s in %s." ),
|
||||
stale_member->Name(), subgraph->m_driver_connection->Name() );
|
||||
continue;
|
||||
}
|
||||
|
||||
wxLogTrace( ConnTrace, "Updating %lu (%s) member %s to %s", subgraph->m_code,
|
||||
wxLogTrace( ConnTrace, wxT( "Updating %lu (%s) member %s to %s" ), subgraph->m_code,
|
||||
subgraph->m_driver_connection->Name(), member->LocalName(),
|
||||
stale_member->Name() );
|
||||
|
||||
|
@ -2032,7 +2032,7 @@ void CONNECTION_GRAPH::recacheSubgraphName( CONNECTION_SUBGRAPH* aSubgraph,
|
|||
alg::delete_matching( vec, aSubgraph );
|
||||
}
|
||||
|
||||
wxLogTrace( ConnTrace, "recacheSubgraphName: %s => %s", aOldName,
|
||||
wxLogTrace( ConnTrace, wxT( "recacheSubgraphName: %s => %s" ), aOldName,
|
||||
aSubgraph->m_driver_connection->Name() );
|
||||
|
||||
m_net_name_to_subgraphs_map[aSubgraph->m_driver_connection->Name()].push_back( aSubgraph );
|
||||
|
@ -2083,7 +2083,7 @@ std::vector<const CONNECTION_SUBGRAPH*> CONNECTION_GRAPH::GetBusesNeedingMigrati
|
|||
if( !different )
|
||||
continue;
|
||||
|
||||
wxLogTrace( ConnTrace, "SG %ld (%s) has multiple bus labels", subgraph->m_code,
|
||||
wxLogTrace( ConnTrace, wxT( "SG %ld (%s) has multiple bus labels" ), subgraph->m_code,
|
||||
connection->Name() );
|
||||
|
||||
ret.push_back( subgraph );
|
||||
|
@ -2144,7 +2144,7 @@ int CONNECTION_GRAPH::RunERC()
|
|||
{
|
||||
int error_count = 0;
|
||||
|
||||
wxCHECK_MSG( m_schematic, true, "Null m_schematic in CONNECTION_GRAPH::RunERC" );
|
||||
wxCHECK_MSG( m_schematic, true, wxT( "Null m_schematic in CONNECTION_GRAPH::RunERC" ) );
|
||||
|
||||
ERC_SETTINGS& settings = m_schematic->ErcSettings();
|
||||
|
||||
|
@ -2831,7 +2831,7 @@ bool CONNECTION_GRAPH::ercCheckLabels( const CONNECTION_SUBGRAPH* aSubgraph )
|
|||
bool isGlobal = text->Type() == SCH_GLOBAL_LABEL_T;
|
||||
int errCode = isGlobal ? ERCE_GLOBLABEL : ERCE_LABEL_NOT_CONNECTED;
|
||||
|
||||
wxCHECK_MSG( m_schematic, true, "Null m_schematic in CONNECTION_GRAPH::ercCheckLabels" );
|
||||
wxCHECK_MSG( m_schematic, true, wxT( "Null m_schematic in CONNECTION_GRAPH::ercCheckLabels" ) );
|
||||
|
||||
wxString name = EscapeString( text->GetShownText(), CTX_NETNAME );
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindSymbolAndItem( const wxString* aPath, const wx
|
|||
ratio = kicadRatio;
|
||||
compRatioBent = 1.0; // Reset so we don't modify the "KiCad" ratio
|
||||
wxLogTrace( "CROSS_PROBE_SCALE",
|
||||
"Part TOO WIDE for screen. Using normal KiCad zoom ratio: %1.5f",
|
||||
wxT( "Part TOO WIDE for screen. Using normal KiCad zoom ratio: %1.5f" ),
|
||||
ratio );
|
||||
}
|
||||
|
||||
|
|
|
@ -213,7 +213,7 @@ void DIALOG_BOM::installGeneratorsList()
|
|||
|
||||
if( !m_generators[ii]->FindFilePath().Exists( wxFILE_EXISTS_REGULAR ) )
|
||||
{
|
||||
wxLogTrace( BOM_TRACE, "BOM plugin %s not found",
|
||||
wxLogTrace( BOM_TRACE, wxT( "BOM plugin %s not found" ),
|
||||
m_generators[ii]->FindFilePath().GetFullName() );
|
||||
name.Append( wxT( " " ) + _( "(file missing)" ) );
|
||||
|
||||
|
|
|
@ -528,7 +528,7 @@ bool DIALOG_CHANGE_SYMBOLS::processSymbol( SCH_SYMBOL* aSymbol, const SCH_SHEET_
|
|||
if( references.IsEmpty() )
|
||||
references = instance.m_Reference;
|
||||
else
|
||||
references += " " + instance.m_Reference;
|
||||
references += wxT( " " ) + instance.m_Reference;
|
||||
}
|
||||
|
||||
if( m_mode == MODE::UPDATE )
|
||||
|
@ -570,7 +570,7 @@ bool DIALOG_CHANGE_SYMBOLS::processSymbol( SCH_SYMBOL* aSymbol, const SCH_SHEET_
|
|||
|
||||
if( !libSymbol )
|
||||
{
|
||||
msg << ": " << _( "*** symbol not found ***" );
|
||||
msg << wxT( ": " ) << _( "*** symbol not found ***" );
|
||||
m_messagePanel->Report( msg, RPT_SEVERITY_ERROR );
|
||||
return false;
|
||||
}
|
||||
|
@ -579,7 +579,7 @@ bool DIALOG_CHANGE_SYMBOLS::processSymbol( SCH_SYMBOL* aSymbol, const SCH_SHEET_
|
|||
|
||||
if( flattenedSymbol->GetUnitCount() < aSymbol->GetUnit() )
|
||||
{
|
||||
msg << ": " << _( "*** new symbol has too few units ***" );
|
||||
msg << wxT( ": " ) << _( "*** new symbol has too few units ***" );
|
||||
m_messagePanel->Report( msg, RPT_SEVERITY_ERROR );
|
||||
return false;
|
||||
}
|
||||
|
@ -688,7 +688,7 @@ bool DIALOG_CHANGE_SYMBOLS::processSymbol( SCH_SYMBOL* aSymbol, const SCH_SHEET_
|
|||
screen->Append( aSymbol );
|
||||
frame->GetCanvas()->GetView()->Update( aSymbol );
|
||||
|
||||
msg += ": OK";
|
||||
msg += wxT( ": OK" );
|
||||
m_messagePanel->Report( msg, RPT_SEVERITY_ACTION );
|
||||
|
||||
return true;
|
||||
|
|
|
@ -108,7 +108,7 @@ void DIALOG_EESCHEMA_PAGE_SETTINGS::onTransferDataToWindow()
|
|||
bool DIALOG_EESCHEMA_PAGE_SETTINGS::onSavePageSettings()
|
||||
{
|
||||
wxCHECK_MSG( dynamic_cast<SCH_EDIT_FRAME*>( m_parent ), true,
|
||||
"DIALOG_PAGES_SETTINGS::OnDateApplyClick frame is not a schematic frame!" );
|
||||
wxT( "DIALOG_PAGES_SETTINGS::OnDateApplyClick frame is not a schematic frame!" ) );
|
||||
|
||||
// Exports settings to other sheets if requested:
|
||||
SCH_SCREENS ScreenList( dynamic_cast<SCH_EDIT_FRAME*>( m_parent )->Schematic().Root() );
|
||||
|
|
|
@ -753,7 +753,7 @@ void DIALOG_ERC::deleteAllMarkers( bool aIncludeExclusions )
|
|||
|
||||
void DIALOG_ERC::OnSaveReport( wxCommandEvent& aEvent )
|
||||
{
|
||||
wxFileName fn( "ERC." + ReportFileExtension );
|
||||
wxFileName fn( wxT( "ERC." ) + ReportFileExtension );
|
||||
|
||||
wxFileDialog dlg( this, _( "Save Report to File" ), Prj().GetProjectPath(), fn.GetFullName(),
|
||||
ReportFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
|
|
@ -192,7 +192,7 @@ void DIALOG_FIELD_PROPERTIES::OnSetFocusText( wxFocusEvent& event )
|
|||
// This is needed because GTK seems to ignore the selection on first update
|
||||
//
|
||||
// Note that we can't do this on OSX as it tends to provoke Apple's
|
||||
// "[NSAlert runModal] may not be invoked inside of transaction begin/commit pair"
|
||||
// wxT( "[NSAlert runModal] may not be invoked inside of transaction begin/commit pair" )
|
||||
// bug. See: https://bugs.launchpad.net/kicad/+bug/1837225
|
||||
if( m_fieldId == REFERENCE_FIELD || m_fieldId == VALUE_FIELD || m_fieldId == SHEETNAME_V )
|
||||
m_TextCtrl->Update();
|
||||
|
@ -348,7 +348,7 @@ DIALOG_SCH_FIELD_PROPERTIES::DIALOG_SCH_FIELD_PROPERTIES( SCH_BASE_FRAME* aParen
|
|||
|
||||
m_isPower = false;
|
||||
|
||||
m_textLabel->SetLabel( m_field->GetName() + ":" );
|
||||
m_textLabel->SetLabel( m_field->GetName() + wxT( ":" ) );
|
||||
|
||||
m_position = m_field->GetPosition();
|
||||
|
||||
|
@ -399,7 +399,7 @@ void DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded( wxStyledTextEvent &aEven
|
|||
{
|
||||
wxString text = m_StyledTextCtrl->GetText();
|
||||
int currpos = m_StyledTextCtrl->GetCurrentPos();
|
||||
text.Replace( "\n", "" );
|
||||
text.Replace( wxT( "\n" ), wxT( "" ) );
|
||||
m_StyledTextCtrl->SetText( text );
|
||||
m_StyledTextCtrl->GotoPos( currpos-1 );
|
||||
return;
|
||||
|
|
|
@ -406,18 +406,18 @@ private:
|
|||
|
||||
static bool BoolFromString( wxString aValue )
|
||||
{
|
||||
if( aValue == "1" )
|
||||
if( aValue == wxT( "1" ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if( aValue == "0" )
|
||||
else if( aValue == wxT( "0" ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( wxString::Format( "string '%s' can't be converted to boolean "
|
||||
"correctly, it will have been perceived as FALSE",
|
||||
wxFAIL_MSG( wxString::Format( wxT( "string '%s' can't be converted to boolean " )
|
||||
wxT( "correctly, it will have been perceived as FALSE" ),
|
||||
aValue ) );
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ bool DIALOG_LINE_WIRE_BUS_PROPERTIES::TransferDataToWindow()
|
|||
else if( style < (int) lineTypeNames.size() )
|
||||
m_typeCombo->SetSelection( style );
|
||||
else
|
||||
wxFAIL_MSG( "Line type not found in the type lookup map" );
|
||||
wxFAIL_MSG( wxT( "Line type not found in the type lookup map" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -107,7 +107,7 @@ void DIALOG_MIGRATE_BUSES::updateUi()
|
|||
{
|
||||
wxString old = item.labels[0];
|
||||
for( unsigned j = 1; j < item.labels.size(); j++ )
|
||||
old << ", " << item.labels[j];
|
||||
old << wxT( ", " ) << item.labels[j];
|
||||
|
||||
auto i = m_migration_list->InsertItem( m_migration_list->GetItemCount(), wxEmptyString );
|
||||
|
||||
|
@ -154,7 +154,7 @@ std::vector<wxString> DIALOG_MIGRATE_BUSES::getProposedLabels(
|
|||
{
|
||||
conn.ConfigureFromLabel( label );
|
||||
wxString proposal = conn.VectorPrefix();
|
||||
proposal << "[" << highest_end << ".." << lowest_start << "]";
|
||||
proposal << wxT( "[" ) << highest_end << wxT( ".." ) << lowest_start << wxT( "]" );
|
||||
proposals.push_back( proposal );
|
||||
}
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ void NETLIST_DIALOG::OnRunExternSpiceCommand( wxCommandEvent& event )
|
|||
|
||||
// Build the command line
|
||||
wxString commandLine = simulatorCommand;
|
||||
commandLine.Replace( "%I", fn.GetFullPath(), true );
|
||||
commandLine.Replace( wxT( "%I" ), fn.GetFullPath(), true );
|
||||
|
||||
if( m_Parent->ReadyToNetlist( _( "Simulator requires a fully annotated schematic." ) ) )
|
||||
{
|
||||
|
|
|
@ -450,7 +450,7 @@ wxFileName DIALOG_PLOT_SCHEMATIC::createPlotFileName( const wxString& aPlotFileN
|
|||
retv.SetPath( tmp.GetPath() );
|
||||
}
|
||||
|
||||
wxLogTrace( tracePathsAndFiles, "Writing plot file '%s'.", retv.GetFullPath() );
|
||||
wxLogTrace( tracePathsAndFiles, wxT( "Writing plot file '%s'." ), retv.GetFullPath() );
|
||||
|
||||
return retv;
|
||||
}
|
||||
|
@ -498,8 +498,8 @@ void DIALOG_PLOT_SCHEMATIC::createDXFFiles( bool aPlotAll, bool aPlotDrawingShee
|
|||
// The sub sheet can be in a sub_hierarchy, but we plot the file in the
|
||||
// main project folder (or the folder specified by the caller),
|
||||
// so replace separators to create a unique filename:
|
||||
fname.Replace( "/", "_" );
|
||||
fname.Replace( "\\", "_" );
|
||||
fname.Replace( wxT( "/" ), wxT( "_" ) );
|
||||
fname.Replace( wxT( "\\" ), wxT( "_" ) );
|
||||
wxString ext = DXF_PLOTTER::GetDefaultFileExtension();
|
||||
wxFileName plotFileName = createPlotFileName( fname, ext, &reporter );
|
||||
|
||||
|
@ -667,8 +667,8 @@ void DIALOG_PLOT_SCHEMATIC::createHPGLFiles( bool aPlotAll, bool aPlotFrameRef,
|
|||
// The sub sheet can be in a sub_hierarchy, but we plot the file in the
|
||||
// main project folder (or the folder specified by the caller),
|
||||
// so replace separators to create a unique filename:
|
||||
fname.Replace( "/", "_" );
|
||||
fname.Replace( "\\", "_" );
|
||||
fname.Replace( wxT( "/" ), wxT( "_" ) );
|
||||
fname.Replace( wxT( "\\" ), wxT( "_" ) );
|
||||
wxString ext = HPGL_PLOTTER::GetDefaultFileExtension();
|
||||
wxFileName plotFileName = createPlotFileName( fname, ext, &reporter );
|
||||
|
||||
|
@ -825,8 +825,8 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotDrawingSheet
|
|||
// The sub sheet can be in a sub_hierarchy, but we plot the file in the main
|
||||
// project folder (or the folder specified by the caller), so replace separators
|
||||
// to create a unique filename:
|
||||
fname.Replace( "/", "_" );
|
||||
fname.Replace( "\\", "_" );
|
||||
fname.Replace( wxT( "/" ), wxT( "_" ) );
|
||||
fname.Replace( wxT( "\\" ), wxT( "_" ) );
|
||||
wxString ext = PDF_PLOTTER::GetDefaultFileExtension();
|
||||
plotFileName = createPlotFileName( fname, ext, &reporter );
|
||||
|
||||
|
@ -1018,8 +1018,8 @@ void DIALOG_PLOT_SCHEMATIC::createPSFiles( bool aPlotAll, bool aPlotFrameRef,
|
|||
// The sub sheet can be in a sub_hierarchy, but we plot the file in the
|
||||
// main project folder (or the folder specified by the caller),
|
||||
// so replace separators to create a unique filename:
|
||||
fname.Replace( "/", "_" );
|
||||
fname.Replace ("\\", "_" );
|
||||
fname.Replace( wxT( "/" ), wxT( "_" ) );
|
||||
fname.Replace (wxT( "\\" ), wxT( "_" ) );
|
||||
wxString ext = PS_PLOTTER::GetDefaultFileExtension();
|
||||
wxFileName plotFileName = createPlotFileName( fname, ext, &reporter );
|
||||
|
||||
|
@ -1143,8 +1143,8 @@ void DIALOG_PLOT_SCHEMATIC::createSVGFiles( bool aPrintAll, bool aPrintFrameRef,
|
|||
// The sub sheet can be in a sub_hierarchy, but we plot the file in the
|
||||
// main project folder (or the folder specified by the caller),
|
||||
// so replace separators to create a unique filename:
|
||||
fname.Replace( "/", "_" );
|
||||
fname.Replace( "\\", "_" );
|
||||
fname.Replace( wxT( "/" ), wxT( "_" ) );
|
||||
fname.Replace( wxT( "\\" ), wxT( "_" ) );
|
||||
wxString ext = SVG_PLOTTER::GetDefaultFileExtension();
|
||||
wxFileName plotFileName = createPlotFileName( fname, ext, &reporter );
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ DIALOG_RESCUE_EACH::DIALOG_RESCUE_EACH( wxWindow* aParent,
|
|||
// fudge factors here but it does seem to work pretty reliably.
|
||||
auto info_size = m_htmlPrompt->GetTextExtent( info );
|
||||
auto prompt_size = m_htmlPrompt->GetSize();
|
||||
auto font_size = m_htmlPrompt->GetTextExtent( "X" );
|
||||
auto font_size = m_htmlPrompt->GetTextExtent( wxT( "X" ) );
|
||||
auto approx_info_height = ( 2 * info_size.x / prompt_size.x ) * font_size.y;
|
||||
m_htmlPrompt->SetSizeHints( 2 * prompt_size.x / 3, approx_info_height );
|
||||
Layout();
|
||||
|
|
|
@ -456,9 +456,9 @@ bool DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged( const wxString& aNewFilena
|
|||
{
|
||||
loadFromFile = wxFileExists( newAbsoluteFilename );
|
||||
|
||||
wxLogTrace( tracePathsAndFiles, "\n Sheet requested file '%s', %s",
|
||||
wxLogTrace( tracePathsAndFiles, wxT( "\n Sheet requested file '%s', %s" ),
|
||||
newAbsoluteFilename,
|
||||
loadFromFile ? "found" : "not found" );
|
||||
loadFromFile ? wxT( "found" ) : wxT( "not found" ) );
|
||||
}
|
||||
|
||||
if( m_sheet->GetScreen() == nullptr ) // New just created sheet.
|
||||
|
|
|
@ -64,7 +64,7 @@ bool DIALOG_SIGNAL_LIST::TransferDataToWindow()
|
|||
// netnames are escaped (can contain "{slash}" for '/') Unscape them:
|
||||
wxString netname = UnescapeString( net.first );
|
||||
|
||||
if( netname != "GND" && netname != "0" )
|
||||
if( netname != wxT( "GND" ) && netname != wxT( "0" ) )
|
||||
m_signals->Append( wxString::Format( "V(%s)", netname ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -131,10 +131,10 @@ wxString DIALOG_SIM_SETTINGS::evaluateDCControls( wxChoice* aDcSource, wxTextCtr
|
|||
try
|
||||
{
|
||||
// pick device name from exporter when something different than temperature is selected
|
||||
if( dcSource.Cmp( "TEMP" ) )
|
||||
if( dcSource.Cmp( wxT( "TEMP" ) ) )
|
||||
dcSource = m_exporter->GetSpiceDevice( dcSource );
|
||||
|
||||
return wxString::Format( "%s %s %s %s", dcSource,
|
||||
return wxString::Format( wxT( "%s %s %s %s" ), dcSource,
|
||||
SPICE_VALUE( aDcStart->GetValue() ).ToSpiceString(),
|
||||
SPICE_VALUE( aDcStop->GetValue() ).ToSpiceString(),
|
||||
SPICE_VALUE( aDcIncr->GetValue() ).ToSpiceString() );
|
||||
|
@ -186,7 +186,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
|
|||
if( !m_pgAC->Validate() )
|
||||
return false;
|
||||
|
||||
m_simCommand.Printf( ".ac %s %s %s %s",
|
||||
m_simCommand.Printf( wxT( ".ac %s %s %s %s" ),
|
||||
scaleToString( m_acScale->GetSelection() ),
|
||||
m_acPointsNumber->GetValue(),
|
||||
SPICE_VALUE( m_acFreqStart->GetValue() ).ToSpiceString(),
|
||||
|
@ -194,7 +194,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
|
|||
}
|
||||
else if( page == m_pgDC ) // DC transfer analysis
|
||||
{
|
||||
wxString simCmd = wxString( ".dc " );
|
||||
wxString simCmd = wxString( wxT( ".dc " ) );
|
||||
|
||||
wxString src1 = evaluateDCControls( m_dcSource1, m_dcStart1, m_dcStop1, m_dcIncr1 );
|
||||
|
||||
|
@ -210,7 +210,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
|
|||
if( src2.IsEmpty() )
|
||||
return false;
|
||||
else
|
||||
simCmd += " " + src2;
|
||||
simCmd += wxT( " " ) + src2;
|
||||
|
||||
if( m_dcSource1->GetStringSelection() == m_dcSource2->GetStringSelection() )
|
||||
{
|
||||
|
@ -234,7 +234,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
|
|||
wxString ref;
|
||||
|
||||
if( !empty( m_noiseRef ) )
|
||||
ref = wxString::Format( ", %d", netMap.at( m_noiseRef->GetValue() ) );
|
||||
ref = wxString::Format( wxT( ", %d" ), netMap.at( m_noiseRef->GetValue() ) );
|
||||
|
||||
wxString noiseSource = m_exporter->GetSpiceDevice( m_noiseSrc->GetValue() );
|
||||
|
||||
|
@ -242,7 +242,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
|
|||
if( noiseSource[0] != 'v' && noiseSource[0] != 'V' )
|
||||
noiseSource += 'v' + noiseSource;
|
||||
|
||||
m_simCommand.Printf( ".noise v(%d%s) %s %s %s %s %s",
|
||||
m_simCommand.Printf( wxT( ".noise v(%d%s) %s %s %s %s %s" ),
|
||||
netMap.at( m_noiseMeas->GetValue() ), ref,
|
||||
noiseSource, scaleToString( m_noiseScale->GetSelection() ),
|
||||
m_noisePointsNumber->GetValue(),
|
||||
|
@ -251,7 +251,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
|
|||
}
|
||||
else if( page == m_pgOP ) // DC operating point analysis
|
||||
{
|
||||
m_simCommand = wxString( ".op" );
|
||||
m_simCommand = wxString( wxT( ".op" ) );
|
||||
}
|
||||
else if( page == m_pgTransient ) // Transient analysis
|
||||
{
|
||||
|
@ -263,7 +263,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataFromWindow()
|
|||
if( !empty( m_transInitial ) )
|
||||
initial = SPICE_VALUE( m_transInitial->GetValue() ).ToSpiceString();
|
||||
|
||||
m_simCommand.Printf( ".tran %s %s %s",
|
||||
m_simCommand.Printf( wxT( ".tran %s %s %s" ),
|
||||
SPICE_VALUE( m_transStep->GetValue() ).ToSpiceString(),
|
||||
SPICE_VALUE( m_transFinal->GetValue() ).ToSpiceString(),
|
||||
initial );
|
||||
|
@ -332,7 +332,7 @@ bool DIALOG_SIM_SETTINGS::TransferDataToWindow()
|
|||
case NGSPICE_MODEL_MODE::LT_PSPICE: m_compatibilityModeChoice->SetSelection( 4 ); break;
|
||||
case NGSPICE_MODEL_MODE::HSPICE: m_compatibilityModeChoice->SetSelection( 5 ); break;
|
||||
default:
|
||||
wxFAIL_MSG( wxString::Format( "Unknown NGSPICE_MODEL_MODE %d.",
|
||||
wxFAIL_MSG( wxString::Format( wxT( "Unknown NGSPICE_MODEL_MODE %d." ),
|
||||
ngspiceSettings->GetModelMode() ) );
|
||||
break;
|
||||
}
|
||||
|
@ -433,22 +433,22 @@ bool DIALOG_SIM_SETTINGS::parseCommand( const wxString& aCommand )
|
|||
if( aCommand.IsEmpty() )
|
||||
return false;
|
||||
|
||||
wxStringTokenizer tokenizer( aCommand, " " );
|
||||
wxStringTokenizer tokenizer( aCommand, wxT( " " ) );
|
||||
wxString tkn = tokenizer.GetNextToken().Lower();
|
||||
|
||||
try
|
||||
{
|
||||
if( tkn == ".ac" )
|
||||
if( tkn == wxT( ".ac" ) )
|
||||
{
|
||||
m_simPages->SetSelection( m_simPages->FindPage( m_pgAC ) );
|
||||
|
||||
tkn = tokenizer.GetNextToken().Lower();
|
||||
|
||||
if( tkn == "dec" )
|
||||
if( tkn == wxT( "dec" ) )
|
||||
m_acScale->SetSelection( 0 );
|
||||
if( tkn == "oct" )
|
||||
if( tkn == wxT( "oct" ) )
|
||||
m_acScale->SetSelection( 1 );
|
||||
if( tkn == "lin" )
|
||||
if( tkn == wxT( "lin" ) )
|
||||
m_acScale->SetSelection( 2 );
|
||||
else
|
||||
return false;
|
||||
|
@ -458,7 +458,7 @@ bool DIALOG_SIM_SETTINGS::parseCommand( const wxString& aCommand )
|
|||
m_acFreqStart->SetValue( SPICE_VALUE( tokenizer.GetNextToken() ).ToSpiceString() );
|
||||
m_acFreqStop->SetValue( SPICE_VALUE( tokenizer.GetNextToken() ).ToSpiceString() );
|
||||
}
|
||||
else if( tkn == ".dc" )
|
||||
else if( tkn == wxT( ".dc" ) )
|
||||
{
|
||||
SPICE_DC_PARAMS src1, src2;
|
||||
src2.m_vincrement = SPICE_VALUE( -1 );
|
||||
|
@ -497,7 +497,7 @@ bool DIALOG_SIM_SETTINGS::parseCommand( const wxString& aCommand )
|
|||
|
||||
refreshUIControls();
|
||||
}
|
||||
else if( tkn == ".tran" )
|
||||
else if( tkn == wxT( ".tran" ) )
|
||||
{
|
||||
m_simPages->SetSelection( m_simPages->FindPage( m_pgTransient ) );
|
||||
|
||||
|
@ -511,7 +511,7 @@ bool DIALOG_SIM_SETTINGS::parseCommand( const wxString& aCommand )
|
|||
if( !tkn.IsEmpty() )
|
||||
m_transInitial->SetValue( SPICE_VALUE( tkn ).ToSpiceString() );
|
||||
}
|
||||
else if( tkn == ".op" )
|
||||
else if( tkn == wxT( ".op" ) )
|
||||
{
|
||||
m_simPages->SetSelection( m_simPages->FindPage( m_pgOP ) );
|
||||
}
|
||||
|
|
|
@ -162,16 +162,16 @@ private:
|
|||
switch( aOption )
|
||||
{
|
||||
case DECADE:
|
||||
return wxString( "dec" );
|
||||
return wxString( wxT( "dec" ) );
|
||||
|
||||
case OCTAVE:
|
||||
return wxString( "oct" );
|
||||
return wxString( wxT( "oct" ) );
|
||||
|
||||
case LINEAR:
|
||||
return wxString( "lin" );
|
||||
return wxString( wxT( "lin" ) );
|
||||
}
|
||||
|
||||
wxASSERT_MSG( false, "Unhandled scale type" );
|
||||
wxASSERT_MSG( false, wxT( "Unhandled scale type" ) );
|
||||
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
|
|
@ -338,7 +338,7 @@ bool DIALOG_TEXT_AND_LABEL_PROPERTIES::TransferDataFromWindow()
|
|||
{
|
||||
#ifdef __WXMAC__
|
||||
// On macOS CTRL+Enter produces '\r' instead of '\n' regardless of EOL setting
|
||||
text.Replace( "\r", "\n" );
|
||||
text.Replace( wxT( "\r" ), wxT( "\n" ) );
|
||||
#endif
|
||||
m_CurrentText->SetText( text );
|
||||
}
|
||||
|
|
|
@ -94,10 +94,10 @@ bool PANEL_SETUP_FORMATTING::TransferDataToWindow()
|
|||
m_suffixCtrl->ChangeValue( settings.m_IntersheetRefsSuffix );
|
||||
m_listOwnPage->SetValue( settings.m_IntersheetRefsListOwnPage );
|
||||
|
||||
wxString offsetRatio = wxString::Format( "%f", settings.m_TextOffsetRatio * 100.0 );
|
||||
wxString offsetRatio = wxString::Format( wxT( "%f" ), settings.m_TextOffsetRatio * 100.0 );
|
||||
m_textOffsetRatioCtrl->SetValue( offsetRatio );
|
||||
|
||||
wxString labelSizeRatio = wxString::Format( "%f", settings.m_LabelSizeRatio * 100.0 );
|
||||
wxString labelSizeRatio = wxString::Format( wxT( "%f" ), settings.m_LabelSizeRatio * 100.0 );
|
||||
m_labelSizeRatioCtrl->SetValue( labelSizeRatio );
|
||||
|
||||
return true;
|
||||
|
@ -167,9 +167,9 @@ void PANEL_SETUP_FORMATTING::ImportSettingsFrom( SCHEMATIC_SETTINGS& aSettings )
|
|||
m_suffixCtrl->ChangeValue( aSettings.m_IntersheetRefsSuffix );
|
||||
m_listOwnPage->SetValue( aSettings.m_IntersheetRefsListOwnPage );
|
||||
|
||||
wxString offsetRatio = wxString::Format( "%f", aSettings.m_TextOffsetRatio * 100.0 );
|
||||
wxString offsetRatio = wxString::Format( wxT( "%f" ), aSettings.m_TextOffsetRatio * 100.0 );
|
||||
m_textOffsetRatioCtrl->SetValue( offsetRatio );
|
||||
|
||||
wxString labelSizeRatio = wxString::Format( "%f", aSettings.m_LabelSizeRatio * 100.0 );
|
||||
wxString labelSizeRatio = wxString::Format( wxT( "%f" ), aSettings.m_LabelSizeRatio * 100.0 );
|
||||
m_labelSizeRatioCtrl->SetValue( labelSizeRatio );
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ void PANEL_SETUP_PINMAP::reBuildMatrixPanel()
|
|||
wxSize bmapSize = dummy->GetSize();
|
||||
delete dummy;
|
||||
|
||||
wxSize charSize = KIUI::GetTextSize( "X", m_matrixPanel );
|
||||
wxSize charSize = KIUI::GetTextSize( wxT( "X" ), m_matrixPanel );
|
||||
wxPoint pos( 0, charSize.y * 2 );
|
||||
wxStaticText* text;
|
||||
|
||||
|
@ -133,7 +133,7 @@ void PANEL_SETUP_PINMAP::reBuildMatrixPanel()
|
|||
|
||||
wxPoint calloutPos( x + KiROUND( bmapSize.x / 2 ) - KiROUND( charSize.x / 2 ),
|
||||
y - charSize.y );
|
||||
new wxStaticText( m_matrixPanel, wxID_ANY, "|", calloutPos );
|
||||
new wxStaticText( m_matrixPanel, wxID_ANY, wxT( "|" ), calloutPos );
|
||||
}
|
||||
|
||||
int event_id = ID_MATRIX_0 + ii + ( jj * ELECTRICAL_PINTYPES_TOTAL );
|
||||
|
|
|
@ -158,7 +158,7 @@ protected:
|
|||
// paste the SYMBOL_LIB_TABLE_ROWs of s-expression (sym_lib_table), starting
|
||||
// at column 0 regardless of current cursor column.
|
||||
|
||||
STRING_LINE_READER slr( TO_UTF8( cb_text ), "Clipboard" );
|
||||
STRING_LINE_READER slr( TO_UTF8( cb_text ), wxT( "Clipboard" ) );
|
||||
LIB_TABLE_LEXER lexer( &slr );
|
||||
SYMBOL_LIB_TABLE tmp_tbl;
|
||||
bool parsed = true;
|
||||
|
@ -241,8 +241,8 @@ PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, P
|
|||
attr = new wxGridCellAttr;
|
||||
|
||||
wxString wildcards = AllSymbolLibFilesWildcard()
|
||||
+ "|" + KiCadSymbolLibFileWildcard()
|
||||
+ "|" + LegacySymbolLibFileWildcard();
|
||||
+ wxT( "|" ) + KiCadSymbolLibFileWildcard()
|
||||
+ wxT( "|" ) + LegacySymbolLibFileWildcard();
|
||||
attr->SetEditor( new GRID_CELL_PATH_EDITOR( m_parent, aGrid,
|
||||
&cfg->m_lastSymbolLibDir, wildcards,
|
||||
true, m_project->GetProjectPath() ) );
|
||||
|
@ -481,8 +481,8 @@ void PANEL_SYM_LIB_TABLE::OnUpdateUI( wxUpdateUIEvent& event )
|
|||
void PANEL_SYM_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
||||
{
|
||||
wxString wildcards = AllSymbolLibFilesWildcard()
|
||||
+ "|" + KiCadSymbolLibFileWildcard()
|
||||
+ "|" + LegacySymbolLibFileWildcard();
|
||||
+ wxT( "|" ) + KiCadSymbolLibFileWildcard()
|
||||
+ wxT( "|" ) + LegacySymbolLibFileWildcard();
|
||||
|
||||
EESCHEMA_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings<EESCHEMA_SETTINGS>();
|
||||
|
||||
|
@ -554,7 +554,7 @@ void PANEL_SYM_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
|||
|
||||
// Do not use the project path in the global library table. This will almost
|
||||
// assuredly be wrong for a different project.
|
||||
if( m_pageNdx == 0 && path.Contains( "${KIPRJMOD}" ) )
|
||||
if( m_pageNdx == 0 && path.Contains( wxT( "${KIPRJMOD}" ) ) )
|
||||
path = fn.GetFullPath();
|
||||
|
||||
m_cur_grid->SetCellValue( last_row, COL_URI, path );
|
||||
|
@ -768,7 +768,7 @@ void PANEL_SYM_LIB_TABLE::onConvertLegacyLibraries( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
wxFileName newLib( resolvedPath );
|
||||
newLib.SetExt( "kicad_sym" );
|
||||
newLib.SetExt( wxT( "kicad_sym" ) );
|
||||
|
||||
if( newLib.Exists() )
|
||||
{
|
||||
|
@ -791,7 +791,7 @@ void PANEL_SYM_LIB_TABLE::onConvertLegacyLibraries( wxCommandEvent& event )
|
|||
|
||||
// Do not use the project path in the global library table. This will almost
|
||||
// assuredly be wrong for a different project.
|
||||
if( m_cur_grid == m_global_grid && relPath.Contains( "${KIPRJMOD}" ) )
|
||||
if( m_cur_grid == m_global_grid && relPath.Contains( wxT( "${KIPRJMOD}" ) ) )
|
||||
relPath = newLib.GetFullPath();
|
||||
|
||||
m_cur_grid->SetCellValue( row, COL_URI, relPath );
|
||||
|
|
|
@ -342,8 +342,8 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
|||
else if( ext == LegacySymbolLibFileExtension || ext == LegacySymbolDocumentFileExtension ||
|
||||
ext == KiCadSymbolLibFileExtension )
|
||||
{
|
||||
if( destFile.GetName() == aProjectName + "-cache" )
|
||||
destFile.SetName( aNewProjectName + "-cache" );
|
||||
if( destFile.GetName() == aProjectName + wxT( "-cache" ) )
|
||||
destFile.SetName( aNewProjectName + wxT( "-cache" ) );
|
||||
|
||||
KiCopyFile( aSrcFilePath, destFile.GetFullPath(), aErrors );
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
|||
{
|
||||
if( node->IsList() && node->GetNumberOfChildren() > 1
|
||||
&& node->GetChild( 0 )->IsSymbol()
|
||||
&& node->GetChild( 0 )->GetSymbol() == "source" )
|
||||
&& node->GetChild( 0 )->GetSymbol() == wxT( "source" ) )
|
||||
{
|
||||
auto pathNode = dynamic_cast<SEXPR::SEXPR_STRING*>( node->GetChild( 1 ) );
|
||||
auto symNode = dynamic_cast<SEXPR::SEXPR_SYMBOL*>( node->GetChild( 1 ) );
|
||||
|
@ -374,10 +374,10 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
|||
else if( symNode )
|
||||
path = symNode->m_value;
|
||||
|
||||
if( path == aProjectName + ".sch" )
|
||||
path = aNewProjectName + ".sch";
|
||||
else if( path == aProjectBasePath + "/" + aProjectName + ".sch" )
|
||||
path = aNewProjectBasePath + "/" + aNewProjectName + ".sch";
|
||||
if( path == aProjectName + wxT( ".sch" ) )
|
||||
path = aNewProjectName + wxT( ".sch" );
|
||||
else if( path == aProjectBasePath + wxT( "/" ) + aProjectName + wxT( ".sch" ) )
|
||||
path = aNewProjectBasePath + wxT( "/" ) + aNewProjectName + wxT( ".sch" );
|
||||
else if( path.StartsWith( aProjectBasePath ) )
|
||||
path.Replace( aProjectBasePath, aNewProjectBasePath, false );
|
||||
|
||||
|
@ -388,7 +388,7 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
|||
}
|
||||
} );
|
||||
|
||||
wxFFile destNetList( destFile.GetFullPath(), "wb" );
|
||||
wxFFile destNetList( destFile.GetFullPath(), wxT( "wb" ) );
|
||||
|
||||
if( destNetList.IsOpened() )
|
||||
success = destNetList.Write( sexpr->AsString( 0 ) );
|
||||
|
@ -405,13 +405,13 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
|||
wxString msg;
|
||||
|
||||
if( !aErrors.empty() )
|
||||
aErrors += "\n";
|
||||
aErrors += wxT( "\n" );
|
||||
|
||||
msg.Printf( _( "Cannot copy file '%s'." ), destFile.GetFullPath() );
|
||||
aErrors += msg;
|
||||
}
|
||||
}
|
||||
else if( destFile.GetName() == "sym-lib-table" )
|
||||
else if( destFile.GetName() == wxT( "sym-lib-table" ) )
|
||||
{
|
||||
SYMBOL_LIB_TABLE symbolLibTable;
|
||||
symbolLibTable.Load( aSrcFilePath );
|
||||
|
@ -421,10 +421,10 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
|||
LIB_TABLE_ROW& row = symbolLibTable.At( i );
|
||||
wxString uri = row.GetFullURI();
|
||||
|
||||
uri.Replace( "/" + aProjectName + "-cache.lib", "/" + aNewProjectName + "-cache.lib" );
|
||||
uri.Replace( "/" + aProjectName + "-rescue.lib", "/" + aNewProjectName +
|
||||
"-rescue.lib" );
|
||||
uri.Replace( "/" + aProjectName + ".lib", "/" + aNewProjectName + ".lib" );
|
||||
uri.Replace( wxT( "/" ) + aProjectName + wxT( "-cache.lib" ), wxT( "/" ) + aNewProjectName + wxT( "-cache.lib" ) );
|
||||
uri.Replace( wxT( "/" ) + aProjectName + wxT( "-rescue.lib" ), wxT( "/" ) + aNewProjectName +
|
||||
wxT( "-rescue.lib" ) );
|
||||
uri.Replace( wxT( "/" ) + aProjectName + wxT( ".lib" ), wxT( "/" ) + aNewProjectName + wxT( ".lib" ) );
|
||||
|
||||
row.SetFullURI( uri );
|
||||
}
|
||||
|
@ -438,7 +438,7 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
|||
wxString msg;
|
||||
|
||||
if( !aErrors.empty() )
|
||||
aErrors += "\n";
|
||||
aErrors += wxT( "\n" );
|
||||
|
||||
msg.Printf( _( "Cannot copy file '%s'." ), destFile.GetFullPath() );
|
||||
aErrors += msg;
|
||||
|
@ -446,7 +446,7 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
|||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( "Unexpected filetype for Eeschema::SaveFileAs()" );
|
||||
wxFAIL_MSG( wxT( "Unexpected filetype for Eeschema::SaveFileAs()" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ void SCH_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
|||
|
||||
void SCH_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
||||
{
|
||||
wxCHECK_RET( aCfg, "Call to SCH_BASE_FRAME::SaveSettings with null settings" );
|
||||
wxCHECK_RET( aCfg, wxT( "Call to SCH_BASE_FRAME::SaveSettings with null settings" ) );
|
||||
|
||||
EDA_DRAW_FRAME::LoadSettings( aCfg );
|
||||
|
||||
|
@ -210,13 +210,13 @@ void SCH_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
|||
* The 100 mil grid is added to help conform to the KiCad Library Convention which
|
||||
* states: "Using a 100mil grid, pin ends and origin must lie on grid nodes IEC-60617"
|
||||
*/
|
||||
aCfg->m_Window.grid.sizes = { "100 mil",
|
||||
"50 mil",
|
||||
"25 mil",
|
||||
"10 mil",
|
||||
"5 mil",
|
||||
"2 mil",
|
||||
"1 mil" };
|
||||
aCfg->m_Window.grid.sizes = { wxT( "100 mil" ),
|
||||
wxT( "50 mil" ),
|
||||
wxT( "25 mil" ),
|
||||
wxT( "10 mil" ),
|
||||
wxT( "5 mil" ),
|
||||
wxT( "2 mil" ),
|
||||
wxT( "1 mil" ) };
|
||||
}
|
||||
|
||||
// Currently values read from config file are not used because the user cannot
|
||||
|
@ -230,7 +230,7 @@ void SCH_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
|||
|
||||
void SCH_BASE_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
||||
{
|
||||
wxCHECK_RET( aCfg, "Call to SCH_BASE_FRAME::SaveSettings with null settings" );
|
||||
wxCHECK_RET( aCfg, wxT( "Call to SCH_BASE_FRAME::SaveSettings with null settings" ) );
|
||||
|
||||
EDA_DRAW_FRAME::SaveSettings( aCfg );
|
||||
}
|
||||
|
|
|
@ -892,7 +892,7 @@ void BOM_CFG_PARSER::parseGenerator()
|
|||
|
||||
wxString option = FromUTF8();
|
||||
|
||||
if( option.StartsWith( "nickname=", &str ) )
|
||||
if( option.StartsWith( wxT( "nickname=" ), &str ) )
|
||||
settings.name = str;
|
||||
|
||||
NeedRIGHT();
|
||||
|
|
|
@ -174,11 +174,11 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet )
|
|||
if( aDrawingSheet )
|
||||
{
|
||||
wsItems.SetMilsToIUfactor( IU_PER_MILS );
|
||||
wsItems.SetPageNumber( "1" );
|
||||
wsItems.SetPageNumber( wxT( "1" ) );
|
||||
wsItems.SetSheetCount( 1 );
|
||||
wsItems.SetFileName( "dummyFilename" );
|
||||
wsItems.SetSheetName( "dummySheet" );
|
||||
wsItems.SetSheetLayer( "dummyLayer" );
|
||||
wsItems.SetFileName( wxT( "dummyFilename" ) );
|
||||
wsItems.SetSheetName( wxT( "dummySheet" ) );
|
||||
wsItems.SetSheetLayer( wxT( "dummyLayer" ) );
|
||||
wsItems.SetProject( &m_schematic->Prj() );
|
||||
wsItems.BuildDrawItemsList( aDrawingSheet->GetPageInfo(), aDrawingSheet->GetTitleBlock());
|
||||
}
|
||||
|
@ -589,7 +589,7 @@ int ERC_TESTER::TestMultUnitPinConflicts()
|
|||
continue;
|
||||
|
||||
wxString name = pin->GetParentSymbol()->GetRef( &subgraph->m_sheet ) +
|
||||
+ ":" + pin->GetShownNumber();
|
||||
+ wxT( ":" ) + pin->GetShownNumber();
|
||||
|
||||
if( !pinToNetMap.count( name ) )
|
||||
{
|
||||
|
@ -734,7 +734,7 @@ int ERC_TESTER::TestLibSymbolIssues()
|
|||
{
|
||||
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
|
||||
ercItem->SetItems( symbol );
|
||||
msg.Printf( "Symbol '%s' not found in symbol library '%s'.",
|
||||
msg.Printf( wxT( "Symbol '%s' not found in symbol library '%s'." ),
|
||||
UnescapeString( symbolName ),
|
||||
UnescapeString( libName ) );
|
||||
ercItem->SetErrorMessage( msg );
|
||||
|
@ -749,7 +749,7 @@ int ERC_TESTER::TestLibSymbolIssues()
|
|||
{
|
||||
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_LIB_SYMBOL_ISSUES );
|
||||
ercItem->SetItems( symbol );
|
||||
msg.Printf( "Symbol '%s' has been modified in library '%s'.",
|
||||
msg.Printf( wxT( "Symbol '%s' has been modified in library '%s'." ),
|
||||
UnescapeString( symbolName ),
|
||||
UnescapeString( libName ) );
|
||||
ercItem->SetErrorMessage( msg );
|
||||
|
|
|
@ -249,7 +249,7 @@ SEVERITY ERC_SETTINGS::GetSeverity( int aErrorCode ) const
|
|||
}
|
||||
|
||||
wxCHECK_MSG( m_Severities.count( aErrorCode ), RPT_SEVERITY_IGNORE,
|
||||
"Missing severity from map in ERC_SETTINGS!" );
|
||||
wxT( "Missing severity from map in ERC_SETTINGS!" ) );
|
||||
|
||||
return m_Severities.at( aErrorCode );
|
||||
}
|
||||
|
|
|
@ -669,18 +669,18 @@ wxString FIELDS_GRID_TABLE<T>::StringFromBool( bool aValue ) const
|
|||
template <class T>
|
||||
bool FIELDS_GRID_TABLE<T>::BoolFromString( wxString aValue ) const
|
||||
{
|
||||
if( aValue == "1" )
|
||||
if( aValue == wxT( "1" ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if( aValue == "0" )
|
||||
else if( aValue == wxT( "0" ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( wxString::Format( "string '%s' can't be converted to boolean "
|
||||
"correctly, it will have been perceived as FALSE", aValue ) );
|
||||
wxFAIL_MSG( wxString::Format( wxT( "string '%s' can't be converted to boolean " )
|
||||
wxT( "correctly, it will have been perceived as FALSE" ), aValue ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ PICKED_SYMBOL SCH_BASE_FRAME::PickSymbolFromLibTree( const SCHLIB_FILTER* aFilte
|
|||
history_list.push_back( symbol );
|
||||
}
|
||||
|
||||
adapter->DoAddLibrary( "-- " + _( "Recently Used" ) + " --", wxEmptyString, history_list,
|
||||
adapter->DoAddLibrary( wxT( "-- " ) + _( "Recently Used" ) + " --", wxEmptyString, history_list,
|
||||
true );
|
||||
|
||||
if( !aHistoryList.empty() )
|
||||
|
|
|
@ -171,7 +171,7 @@ int HIERARCHY_TREE::OnCompareItems( const wxTreeItemId& item1, const wxTreeItemI
|
|||
|
||||
void HIERARCHY_NAVIG_DLG::buildHierarchyTree( SCH_SHEET_PATH* aList, wxTreeItemId* aPreviousmenu )
|
||||
{
|
||||
wxCHECK_RET( m_nbsheets < NB_MAX_SHEET, "Maximum number of sheets exceeded." );
|
||||
wxCHECK_RET( m_nbsheets < NB_MAX_SHEET, wxT( "Maximum number of sheets exceeded." ) );
|
||||
|
||||
std::vector<SCH_ITEM*> sheetChildren;
|
||||
aList->LastScreen()->GetSheets( &sheetChildren );
|
||||
|
|
|
@ -418,7 +418,7 @@ void LIB_FIELD::SetName( const wxString& aName )
|
|||
// Mandatory field names are fixed.
|
||||
if( IsMandatory() )
|
||||
{
|
||||
wxFAIL_MSG( "trying to set a MANDATORY_FIELD's name\n" );
|
||||
wxFAIL_MSG( wxT( "trying to set a MANDATORY_FIELD's name\n" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -432,7 +432,7 @@ void LIB_FIELD::SetName( const wxString& aName )
|
|||
|
||||
wxString LIB_FIELD::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||
{
|
||||
return wxString::Format( "%s '%s'", GetName(), ShortenedShownText() );
|
||||
return wxString::Format( wxT( "%s '%s'" ), GetName(), ShortenedShownText() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ int LIB_PIN::GetPenWidth() const
|
|||
|
||||
wxString LIB_PIN::GetShownName() const
|
||||
{
|
||||
if( m_name == "~" )
|
||||
if( m_name == wxT( "~" ) )
|
||||
return wxEmptyString;
|
||||
else
|
||||
return m_name;
|
||||
|
|
|
@ -417,7 +417,7 @@ void LIB_SHAPE::AddPoint( const wxPoint& aPosition )
|
|||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( "LIB_SHAPE::AddPoint not implemented for " + SHAPE_T_asString() );
|
||||
wxFAIL_MSG( wxT( "LIB_SHAPE::AddPoint not implemented for " ) + SHAPE_T_asString() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ LIB_SYMBOL::LIB_SYMBOL( const LIB_SYMBOL& aSymbol, SYMBOL_LIB* aLibrary ) :
|
|||
}
|
||||
catch( ... )
|
||||
{
|
||||
wxFAIL_MSG( "Failed to clone LIB_ITEM." );
|
||||
wxFAIL_MSG( wxT( "Failed to clone LIB_ITEM." ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -371,7 +371,7 @@ std::unique_ptr< LIB_SYMBOL > LIB_SYMBOL::Flatten() const
|
|||
LIB_SYMBOL_SPTR parent = m_parent.lock();
|
||||
|
||||
wxCHECK_MSG( parent, retv,
|
||||
wxString::Format( "Parent of derived symbol '%s' undefined", m_name ) );
|
||||
wxString::Format( wxT( "Parent of derived symbol '%s' undefined" ), m_name ) );
|
||||
|
||||
// Copy the parent.
|
||||
retv.reset( new LIB_SYMBOL( *parent.get() ) );
|
||||
|
@ -1420,7 +1420,7 @@ std::vector<struct LIB_SYMBOL_UNIT> LIB_SYMBOL::GetUniqueUnits()
|
|||
compareDrawItems = GetUnitDrawItems( unitNum, 1 );
|
||||
|
||||
wxCHECK2_MSG( compareDrawItems.size() != 0, continue,
|
||||
"Multiple unit symbol defined with empty units." );
|
||||
wxT( "Multiple unit symbol defined with empty units." ) );
|
||||
|
||||
if( currentDrawItems.size() != compareDrawItems.size() )
|
||||
{
|
||||
|
@ -1464,7 +1464,7 @@ std::vector<struct LIB_SYMBOL_UNIT> LIB_SYMBOL::GetUniqueUnits()
|
|||
compareDrawItems = GetUnitDrawItems( unitNum, 2 );
|
||||
|
||||
wxCHECK2_MSG( compareDrawItems.size() != 0, continue,
|
||||
"Multiple unit symbol defined with empty units." );
|
||||
wxT( "Multiple unit symbol defined with empty units." ) );
|
||||
|
||||
if( currentDrawItems.size() != compareDrawItems.size() )
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ bool SCH_EDIT_FRAME::CreateArchiveLibraryCacheFile( bool aUseCurrentSheetFilenam
|
|||
else
|
||||
fn = Schematic().RootScreen()->GetFileName();
|
||||
|
||||
fn.SetName( fn.GetName() + "-cache" );
|
||||
fn.SetName( fn.GetName() + wxT( "-cache" ) );
|
||||
fn.SetExt( LegacySymbolLibFileExtension );
|
||||
|
||||
bool success = CreateArchiveLibrary( fn.GetFullPath() );
|
||||
|
@ -131,7 +131,7 @@ bool SCH_EDIT_FRAME::CreateArchiveLibrary( const wxString& aFileName )
|
|||
if( errorMsg.empty() )
|
||||
errorMsg += tmp;
|
||||
else
|
||||
errorMsg += "\n" + tmp;
|
||||
errorMsg += wxT( "\n" ) + tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,9 +50,9 @@ wxString NETLIST_EXPORTER_BASE::MakeCommandLine( const wxString& aFormatString,
|
|||
wxFileName out = aFinalFile;
|
||||
wxString str_out = out.GetFullPath();
|
||||
|
||||
ret.Replace( "%P", aProjectPath, true );
|
||||
ret.Replace( "%B", out.GetName(), true );
|
||||
ret.Replace( "%I", in.GetFullPath(), true );
|
||||
ret.Replace( wxT( "%P" ), aProjectPath, true );
|
||||
ret.Replace( wxT( "%B" ), out.GetName(), true );
|
||||
ret.Replace( wxT( "%I" ), in.GetFullPath(), true );
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
// A ugly hack to run xsltproc that has a serious bug on Window since a long time:
|
||||
|
@ -60,11 +60,11 @@ wxString NETLIST_EXPORTER_BASE::MakeCommandLine( const wxString& aFormatString,
|
|||
// so replace if by '/' if possible (I mean if the filename does not start by "\\"
|
||||
// that is a filename on a Windows server)
|
||||
|
||||
if( !str_out.StartsWith( "\\\\" ) )
|
||||
str_out.Replace( "\\", "/" );
|
||||
if( !str_out.StartsWith( wxT( "\\\\" ) ) )
|
||||
str_out.Replace( wxT( "\\" ), wxT( "/" ) );
|
||||
#endif
|
||||
|
||||
ret.Replace( "%O", str_out, true );
|
||||
ret.Replace( wxT( "%O" ), str_out, true );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -137,12 +137,12 @@ int PIN_NUMBERS::Compare( const wxString& lhs, const wxString& rhs )
|
|||
if( wxIsdigit( c2 ) || c2 == '-' || c2 == '+' )
|
||||
{
|
||||
// numeric comparison
|
||||
wxString::size_type v1 = symbol1.find_first_of( "vV" );
|
||||
wxString::size_type v1 = symbol1.find_first_of( wxT( "vV" ) );
|
||||
|
||||
if( v1 != wxString::npos )
|
||||
symbol1[v1] = '.';
|
||||
|
||||
wxString::size_type v2 = symbol2.find_first_of( "vV" );
|
||||
wxString::size_type v2 = symbol2.find_first_of( wxT( "vV" ) );
|
||||
|
||||
if( v2 != wxString::npos )
|
||||
symbol2[v2] = '.';
|
||||
|
|
|
@ -249,7 +249,7 @@ BITMAPS ElectricalPinTypeGetBitmap( ELECTRICAL_PINTYPE aType )
|
|||
auto findIt = pinTypes.find( aType );
|
||||
|
||||
wxCHECK_MSG( findIt != pinTypes.end(), BITMAPS::INVALID_BITMAP,
|
||||
"Could not find pin type in lookup map" );
|
||||
wxT( "Could not find pin type in lookup map" ) );
|
||||
|
||||
return findIt->second.bitmap;
|
||||
}
|
||||
|
@ -270,7 +270,7 @@ BITMAPS PinShapeGetBitmap( GRAPHIC_PINSHAPE aShape )
|
|||
auto findIt = pinShapes.find( aShape );
|
||||
|
||||
wxCHECK_MSG( findIt != pinShapes.end(), BITMAPS::INVALID_BITMAP,
|
||||
"Could not find pinshape in lookup map" );
|
||||
wxT( "Could not find pinshape in lookup map" ) );
|
||||
|
||||
return findIt->second.bitmap;
|
||||
}
|
||||
|
|
|
@ -316,7 +316,7 @@ bool RESCUE_CACHE_CANDIDATE::PerformAction( RESCUER* aRescuer )
|
|||
{
|
||||
LIB_SYMBOL* tmp = ( m_cache_candidate ) ? m_cache_candidate : m_lib_candidate;
|
||||
|
||||
wxCHECK_MSG( tmp, false, "Both cache and library symbols undefined." );
|
||||
wxCHECK_MSG( tmp, false, wxT( "Both cache and library symbols undefined." ) );
|
||||
|
||||
std::unique_ptr<LIB_SYMBOL> new_symbol = tmp->Flatten();
|
||||
new_symbol->SetName( m_new_name );
|
||||
|
@ -434,8 +434,8 @@ void RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues(
|
|||
|
||||
// Spaces in the file name will break the symbol name because they are not
|
||||
// quoted in the symbol library file format.
|
||||
libNickname.Replace( " ", "-" );
|
||||
LIB_ID new_id( libNickname, new_name + "-" + symbol_id.GetLibNickname().wx_str() );
|
||||
libNickname.Replace( wxT( " " ), wxT( "-" ) );
|
||||
LIB_ID new_id( libNickname, new_name + wxT( "-" ) + symbol_id.GetLibNickname().wx_str() );
|
||||
|
||||
RESCUE_SYMBOL_LIB_TABLE_CANDIDATE candidate( symbol_id, new_id, cache_match, lib_match,
|
||||
eachSymbol->GetUnit(),
|
||||
|
@ -484,7 +484,7 @@ bool RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::PerformAction( RESCUER* aRescuer )
|
|||
{
|
||||
LIB_SYMBOL* tmp = ( m_cache_candidate ) ? m_cache_candidate : m_lib_candidate;
|
||||
|
||||
wxCHECK_MSG( tmp, false, "Both cache and library symbols undefined." );
|
||||
wxCHECK_MSG( tmp, false, wxT( "Both cache and library symbols undefined." ) );
|
||||
|
||||
std::unique_ptr<LIB_SYMBOL> new_symbol = tmp->Flatten();
|
||||
new_symbol->SetLibId( m_new_id );
|
||||
|
@ -761,7 +761,7 @@ bool LEGACY_RESCUER::WriteRescueLibrary( wxWindow *aParent )
|
|||
|
||||
void LEGACY_RESCUER::AddSymbol( LIB_SYMBOL* aNewSymbol )
|
||||
{
|
||||
wxCHECK_RET( aNewSymbol, "Invalid LIB_SYMBOL pointer." );
|
||||
wxCHECK_RET( aNewSymbol, wxT( "Invalid LIB_SYMBOL pointer." ) );
|
||||
|
||||
aNewSymbol->SetLib( m_rescue_lib.get() );
|
||||
m_rescue_lib->AddSymbol( aNewSymbol );
|
||||
|
@ -817,15 +817,15 @@ bool SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary( wxWindow *aParent )
|
|||
return false;
|
||||
}
|
||||
|
||||
wxString uri = "${KIPRJMOD}/" + fn.GetFullName();
|
||||
wxString uri = wxT( "${KIPRJMOD}/" ) + fn.GetFullName();
|
||||
wxString libNickname = fn.GetName();
|
||||
|
||||
// Spaces in the file name will break the symbol name because they are not
|
||||
// quoted in the symbol library file format.
|
||||
libNickname.Replace( " ", "-" );
|
||||
libNickname.Replace( wxT( " " ), wxT( "-" ) );
|
||||
|
||||
SYMBOL_LIB_TABLE_ROW* row = new SYMBOL_LIB_TABLE_ROW( libNickname, uri,
|
||||
wxString( "Legacy" ) );
|
||||
wxString( wxT( "Legacy" ) ) );
|
||||
m_prj->SchSymbolLibTable()->InsertRow( row );
|
||||
|
||||
fn = wxFileName( m_prj->GetProjectPath(), SYMBOL_LIB_TABLE::GetSymbolLibTableFileName() );
|
||||
|
@ -858,7 +858,7 @@ bool SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary( wxWindow *aParent )
|
|||
|
||||
void SYMBOL_LIB_TABLE_RESCUER::AddSymbol( LIB_SYMBOL* aNewSymbol )
|
||||
{
|
||||
wxCHECK_RET( aNewSymbol, "Invalid LIB_SYMBOL pointer." );
|
||||
wxCHECK_RET( aNewSymbol, wxT( "Invalid LIB_SYMBOL pointer." ) );
|
||||
|
||||
wxFileName fn = GetRescueLibraryFileName( m_schematic );
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
LIB_SYMBOL* SchGetLibSymbol( const LIB_ID& aLibId, SYMBOL_LIB_TABLE* aLibTable,
|
||||
SYMBOL_LIB* aCacheLib, wxWindow* aParent, bool aShowErrorMsg )
|
||||
{
|
||||
wxCHECK_MSG( aLibTable, nullptr, "Invalid symbol library table." );
|
||||
wxCHECK_MSG( aLibTable, nullptr, wxT( "Invalid symbol library table." ) );
|
||||
|
||||
LIB_SYMBOL* symbol = nullptr;
|
||||
|
||||
|
@ -56,10 +56,10 @@ LIB_SYMBOL* SchGetLibSymbol( const LIB_ID& aLibId, SYMBOL_LIB_TABLE* aLibTable,
|
|||
|
||||
if( !symbol && aCacheLib )
|
||||
{
|
||||
wxCHECK_MSG( aCacheLib->IsCache(), nullptr, "Invalid cache library." );
|
||||
wxCHECK_MSG( aCacheLib->IsCache(), nullptr, wxT( "Invalid cache library." ) );
|
||||
|
||||
wxString cacheName = aLibId.GetLibNickname().wx_str();
|
||||
cacheName += "_" + aLibId.GetLibItemName();
|
||||
cacheName += wxT( "_" ) + aLibId.GetLibItemName();
|
||||
symbol = aCacheLib->FindSymbol( cacheName );
|
||||
}
|
||||
}
|
||||
|
@ -172,12 +172,12 @@ void SCH_BASE_FRAME::UpdateStatusBar()
|
|||
VECTOR2D cursorPos = GetCanvas()->GetViewControls()->GetCursorPosition();
|
||||
VECTOR2D d = cursorPos - screen->m_LocalOrigin;
|
||||
|
||||
line.Printf( "X %s Y %s",
|
||||
line.Printf( wxT( "X %s Y %s" ),
|
||||
MessageTextFromValue( GetUserUnits(), cursorPos.x, false ),
|
||||
MessageTextFromValue( GetUserUnits(), cursorPos.y, false ) );
|
||||
SetStatusText( line, 2 );
|
||||
|
||||
line.Printf( "dx %s dy %s dist %s",
|
||||
line.Printf( wxT( "dx %s dy %s dist %s" ),
|
||||
MessageTextFromValue( GetUserUnits(), d.x, false ),
|
||||
MessageTextFromValue( GetUserUnits(), d.y, false ),
|
||||
MessageTextFromValue( GetUserUnits(), hypot( d.x, d.y ), false ) );
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
|
||||
BITMAP_BASE* GetImage() const
|
||||
{
|
||||
wxCHECK_MSG( m_image != nullptr, nullptr, "Invalid SCH_BITMAP init, m_image is NULL." );
|
||||
wxCHECK_MSG( m_image != nullptr, nullptr, wxT( "Invalid SCH_BITMAP init, m_image is NULL." ) );
|
||||
return m_image;
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ SCH_BUS_WIRE_ENTRY::SCH_BUS_WIRE_ENTRY( const wxPoint& pos, int aQuadrant ) :
|
|||
case 2: m_size.x *= 1; m_size.y *= 1; break;
|
||||
case 3: m_size.x *= -1; m_size.y *= 1; break;
|
||||
case 4: m_size.x *= -1; m_size.y *= -1; break;
|
||||
default: wxFAIL_MSG( "SCH_BUS_WIRE_ENTRY ctor: unexpected quadrant" );
|
||||
default: wxFAIL_MSG( wxT( "SCH_BUS_WIRE_ENTRY ctor: unexpected quadrant" ) );
|
||||
}
|
||||
|
||||
m_layer = LAYER_WIRE;
|
||||
|
|
|
@ -350,7 +350,7 @@ wxString SCH_CONNECTION::Name( bool aIgnoreSheet ) const
|
|||
|
||||
void SCH_CONNECTION::recacheName()
|
||||
{
|
||||
m_cached_name = m_name.IsEmpty() ? "<NO NET>" : m_prefix + m_name + m_suffix;
|
||||
m_cached_name = m_name.IsEmpty() ? wxT( "<NO NET>" ) : m_prefix + m_name + m_suffix;
|
||||
|
||||
bool prepend_path = true;
|
||||
|
||||
|
@ -412,7 +412,7 @@ void SCH_CONNECTION::AppendInfoToMsgPanel( std::vector<MSG_PANEL_ITEM>& aList )
|
|||
// CONNECTION_GRAPH entirely in the future, as they are mostly only useful for netlist exports.
|
||||
#if 0
|
||||
if( !IsBus() )
|
||||
aList.emplace_back( _( "Net Code" ), wxString::Format( "%d", m_net_code ) );
|
||||
aList.emplace_back( _( "Net CodewxT( " ), wxString::Format( " )%d", m_net_code ) );
|
||||
#endif
|
||||
|
||||
if( auto alias = m_graph->GetBusAlias( m_name ) )
|
||||
|
@ -420,7 +420,7 @@ void SCH_CONNECTION::AppendInfoToMsgPanel( std::vector<MSG_PANEL_ITEM>& aList )
|
|||
msg.Printf( _( "Bus Alias %s Members" ), m_name );
|
||||
|
||||
for( const wxString& member : alias->Members() )
|
||||
members << member << " ";
|
||||
members << member << wxT( " " );
|
||||
|
||||
aList.emplace_back( msg, members );
|
||||
}
|
||||
|
@ -433,7 +433,7 @@ void SCH_CONNECTION::AppendInfoToMsgPanel( std::vector<MSG_PANEL_ITEM>& aList )
|
|||
msg.Printf( _( "Bus Alias %s Members" ), group_alias->GetName() );
|
||||
|
||||
for( const wxString& member : group_alias->Members() )
|
||||
members << member << " ";
|
||||
members << member << wxT( " " );
|
||||
|
||||
aList.emplace_back( msg, members );
|
||||
}
|
||||
|
@ -447,14 +447,14 @@ void SCH_CONNECTION::AppendInfoToMsgPanel( std::vector<MSG_PANEL_ITEM>& aList )
|
|||
return;
|
||||
|
||||
if( IsBus() )
|
||||
aList.emplace_back( "Bus Code", wxString::Format( "%d", m_bus_code ) );
|
||||
aList.emplace_back( wxT( "Bus Code" ), wxString::Format( wxT( "%d" ), m_bus_code ) );
|
||||
|
||||
aList.emplace_back( "Subgraph Code", wxString::Format( "%d", m_subgraph_code ) );
|
||||
aList.emplace_back( wxT( "Subgraph Code" ), wxString::Format( wxT( "%d" ), m_subgraph_code ) );
|
||||
|
||||
if( SCH_ITEM* driver = Driver() )
|
||||
{
|
||||
msg.Printf( "%s at %p", driver->GetSelectMenuText( EDA_UNITS::MILLIMETRES ), driver );
|
||||
aList.emplace_back( "Connection Source", msg );
|
||||
msg.Printf( wxT( "%s at %p" ), driver->GetSelectMenuText( EDA_UNITS::MILLIMETRES ), driver );
|
||||
aList.emplace_back( wxT( "Connection Source" ), msg );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -474,7 +474,7 @@ bool SCH_CONNECTION::MightBeBusLabel( const wxString& aLabel )
|
|||
// Weak heuristic for performance reasons. Stronger test will be used for connectivity
|
||||
wxString label = UnescapeString( aLabel );
|
||||
|
||||
return label.Contains( wxT( "[" ) ) || label.Contains( wxT( "{" ) );
|
||||
return label.Contains( wxT( "[wxT( " ) ) || label.Contains( wxT( " ){" ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -259,15 +259,15 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
m_auimgr.SetManagedWindow( this );
|
||||
|
||||
CreateInfoBar();
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" )
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( wxT( "MainToolbar" ) )
|
||||
.Top().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" )
|
||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( wxT( "OptToolbar" ) )
|
||||
.Left().Layer( 3 ) );
|
||||
m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( "ToolsToolbar" )
|
||||
m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( wxT( "ToolsToolbar" ) )
|
||||
.Right().Layer( 2 ) );
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" )
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( wxT( "DrawFrame" ) )
|
||||
.Center() );
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" )
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( wxT( "MsgPanel" ) )
|
||||
.Bottom().Layer( 6 ) );
|
||||
|
||||
FinishAUIInitialization();
|
||||
|
@ -846,7 +846,7 @@ void SCH_EDIT_FRAME::OnModify()
|
|||
GetCanvas()->Refresh();
|
||||
UpdateHierarchyNavigator();
|
||||
|
||||
if( !GetTitle().StartsWith( "*" ) )
|
||||
if( !GetTitle().StartsWith( wxT( "*" ) ) )
|
||||
UpdateTitle();
|
||||
}
|
||||
|
||||
|
@ -992,7 +992,7 @@ void SCH_EDIT_FRAME::NewProject()
|
|||
}
|
||||
|
||||
// OpenProjectFiles() requires absolute
|
||||
wxASSERT_MSG( create_me.IsAbsolute(), "wxFileDialog returned non-absolute path" );
|
||||
wxASSERT_MSG( create_me.IsAbsolute(), wxT( "wxFileDialog returned non-absolute path" ) );
|
||||
|
||||
OpenProjectFiles( std::vector<wxString>( 1, create_me.GetFullPath() ), KICTL_CREATE );
|
||||
m_mruPath = create_me.GetPath();
|
||||
|
@ -1004,8 +1004,8 @@ void SCH_EDIT_FRAME::LoadProject()
|
|||
{
|
||||
wxString pro_dir = m_mruPath;
|
||||
wxString wildcards = AllSchematicFilesWildcard()
|
||||
+ "|" + KiCadSchematicFileWildcard()
|
||||
+ "|" + LegacySchematicFileWildcard();
|
||||
+ wxT( "|" ) + KiCadSchematicFileWildcard()
|
||||
+ wxT( "|" ) + LegacySchematicFileWildcard();
|
||||
|
||||
wxFileDialog dlg( this, _( "Open Schematic" ), pro_dir, wxEmptyString,
|
||||
wildcards, wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
@ -1349,7 +1349,7 @@ void SCH_EDIT_FRAME::RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags )
|
|||
|
||||
#ifdef PROFILE
|
||||
timer.Stop();
|
||||
wxLogTrace( "CONN_PROFILE", "SchematicCleanUp() %0.4f ms", timer.msecs() );
|
||||
wxLogTrace( "CONN_PROFILE", wxT( "SchematicCleanUp() %0.4f ms" ), timer.msecs() );
|
||||
#endif
|
||||
|
||||
if( settings.m_IntersheetRefsShow )
|
||||
|
|
|
@ -146,7 +146,7 @@ wxString SCH_FIELD::GetShownText( int aDepth ) const
|
|||
PROJECT* project = nullptr;
|
||||
wxString text = EDA_TEXT::GetShownText();
|
||||
|
||||
if( text == "~" ) // Legacy placeholder for empty string
|
||||
if( text == wxT( "~" ) ) // Legacy placeholder for empty string
|
||||
{
|
||||
text = "";
|
||||
}
|
||||
|
@ -569,7 +569,7 @@ void SCH_FIELD::Rotate( const wxPoint& aCenter )
|
|||
|
||||
wxString SCH_FIELD::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||
{
|
||||
return wxString::Format( "%s '%s'", GetName(), ShortenedShownText() );
|
||||
return wxString::Format( wxT( "%s '%s'" ), GetName(), ShortenedShownText() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -613,7 +613,7 @@ void SCH_FIELD::DoHypertextMenu( EDA_DRAW_FRAME* aFrame )
|
|||
{
|
||||
constexpr int START_ID = 1;
|
||||
|
||||
static wxString back = "HYPERTEXT_BACK";
|
||||
static wxString back = wxT( "HYPERTEXT_BACK" );
|
||||
wxMenu menu;
|
||||
SCH_TEXT* label = dynamic_cast<SCH_TEXT*>( m_parent );
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ SCH_CONNECTION* SCH_ITEM::Connection( const SCH_SHEET_PATH* aSheet ) const
|
|||
return nullptr;
|
||||
|
||||
wxASSERT_MSG( !IsConnectivityDirty(),
|
||||
"Shouldn't be asking for connection if connectivity is dirty!" );
|
||||
wxT( "Shouldn't be asking for connection if connectivity is dirty!" ) );
|
||||
|
||||
if( !aSheet )
|
||||
aSheet = &Schematic()->CurrentSheet();
|
||||
|
|
|
@ -106,7 +106,7 @@ void SCH_MARKER::ViewGetLayers( int aLayers[], int& aCount ) const
|
|||
{
|
||||
aCount = 2;
|
||||
|
||||
wxCHECK_RET( Schematic(), "No SCHEMATIC set for SCH_MARKER!" );
|
||||
wxCHECK_RET( Schematic(), wxT( "No SCHEMATIC set for SCH_MARKER!" ) );
|
||||
|
||||
switch( Schematic()->ErcSettings().GetSeverity( m_rcItem->GetErrorCode() ) )
|
||||
{
|
||||
|
@ -124,7 +124,7 @@ SCH_LAYER_ID SCH_MARKER::GetColorLayer() const
|
|||
if( IsExcluded() )
|
||||
return LAYER_HIDDEN;
|
||||
|
||||
wxCHECK_MSG( Schematic(), LAYER_ERC_ERR, "No SCHEMATIC set for SCH_MARKER!" );
|
||||
wxCHECK_MSG( Schematic(), LAYER_ERC_ERR, wxT( "No SCHEMATIC set for SCH_MARKER!" ) );
|
||||
|
||||
switch( Schematic()->ErcSettings().GetSeverity( m_rcItem->GetErrorCode() ) )
|
||||
{
|
||||
|
|
|
@ -597,7 +597,7 @@ void SCH_PAINTER::draw( const LIB_SHAPE *aShape, int aLayer )
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "SCH_PAINTER::draw not implemented for " + aShape->SHAPE_T_asString() );
|
||||
wxFAIL_MSG( wxT( "SCH_PAINTER::draw not implemented for " ) + aShape->SHAPE_T_asString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1191,7 +1191,7 @@ void SCH_PAINTER::draw( LIB_PIN *aPin, int aLayer )
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Unknown pin orientation" );
|
||||
wxFAIL_MSG( wxT( "Unknown pin orientation" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ wxString SCH_PIN::GetShownName() const
|
|||
if( !m_alt.IsEmpty() )
|
||||
name = m_alt;
|
||||
|
||||
if( name == "~" )
|
||||
if( name == wxT( "~" ) )
|
||||
return wxEmptyString;
|
||||
else
|
||||
return name;
|
||||
|
@ -103,7 +103,7 @@ wxString SCH_PIN::GetShownName() const
|
|||
|
||||
wxString SCH_PIN::GetShownNumber() const
|
||||
{
|
||||
if( m_number == "~" )
|
||||
if( m_number == wxT( "~" ) )
|
||||
return wxEmptyString;
|
||||
else
|
||||
return m_number;
|
||||
|
@ -180,7 +180,7 @@ SCH_SYMBOL* SCH_PIN::GetParentSymbol() const
|
|||
|
||||
wxString SCH_PIN::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||
{
|
||||
return wxString::Format( "%s %s",
|
||||
return wxString::Format( wxT( "%s %s" ),
|
||||
GetParentSymbol()->GetSelectMenuText( aUnits ),
|
||||
m_libPin->GetSelectMenuText( aUnits ) );
|
||||
}
|
||||
|
@ -266,10 +266,10 @@ wxString SCH_PIN::GetDefaultNetName( const SCH_SHEET_PATH& aPath, bool aForceNoC
|
|||
return it->second.first;
|
||||
}
|
||||
|
||||
wxString name = "Net-(";
|
||||
wxString name = wxT( "Net-(" );
|
||||
|
||||
if( aForceNoConnect || GetType() == ELECTRICAL_PINTYPE::PT_NC )
|
||||
name = ( "unconnected-(" );
|
||||
name = ( wxT( "unconnected-(" ) );
|
||||
|
||||
name << GetParentSymbol()->GetRef( &aPath );
|
||||
|
||||
|
@ -282,7 +282,7 @@ wxString SCH_PIN::GetDefaultNetName( const SCH_SHEET_PATH& aPath, bool aForceNoC
|
|||
annotated = false;
|
||||
}
|
||||
|
||||
name << "-Pad" << m_libPin->GetNumber() << ")";
|
||||
name << wxT( "-Pad" ) << m_libPin->GetNumber() << wxT( ")" );
|
||||
|
||||
if( annotated )
|
||||
m_net_name_map[ aPath ] = std::make_pair( name, aForceNoConnect );
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
ALTIUM_SCH_RECORD ReadRecord( const std::map<wxString, wxString>& aProps )
|
||||
{
|
||||
int recordId = ALTIUM_PARSER::ReadInt( aProps, "RECORD", 0 );
|
||||
int recordId = ALTIUM_PARSER::ReadInt( aProps, wxT( "RECORD" ), 0 );
|
||||
return static_cast<ALTIUM_SCH_RECORD>( recordId );
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ int ReadKiCadUnitFrac( const std::map<wxString, wxString>& aProps, const wxStrin
|
|||
{
|
||||
// a unit is stored using two fields, denoting the size in mils and a fraction size
|
||||
int key = ALTIUM_PARSER::ReadInt( aProps, aKey, 0 );
|
||||
int keyFrac = ALTIUM_PARSER::ReadInt( aProps, aKey + "_FRAC", 0 );
|
||||
int keyFrac = ALTIUM_PARSER::ReadInt( aProps, aKey + wxT( "_FRAC" ), 0 );
|
||||
return Altium2KiCadUnit( key, keyFrac );
|
||||
}
|
||||
|
||||
|
@ -61,20 +61,20 @@ int ReadKiCadUnitFrac1( const std::map<wxString, wxString>& aProps, const wxStri
|
|||
// a unit is stored using two fields, denoting the size in mils and a fraction size
|
||||
// Dunno why Altium invents different units for the same purpose
|
||||
int key = ALTIUM_PARSER::ReadInt( aProps, aKey, 0 );
|
||||
int keyFrac = ALTIUM_PARSER::ReadInt( aProps, aKey + "_FRAC1", 0 );
|
||||
int keyFrac = ALTIUM_PARSER::ReadInt( aProps, aKey + wxT( "_FRAC1" ), 0 );
|
||||
return Altium2KiCadUnit( key * 10, keyFrac );
|
||||
}
|
||||
|
||||
|
||||
int ReadOwnerIndex( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
return ALTIUM_PARSER::ReadInt( aProperties, "OWNERINDEX", ALTIUM_COMPONENT_NONE );
|
||||
return ALTIUM_PARSER::ReadInt( aProperties, wxT( "OWNERINDEX" ), ALTIUM_COMPONENT_NONE );
|
||||
}
|
||||
|
||||
|
||||
int ReadOwnerPartId( const std::map<wxString, wxString>& aProperties )
|
||||
{
|
||||
return ALTIUM_PARSER::ReadInt( aProperties, "OWNERPARTID", ALTIUM_COMPONENT_NONE );
|
||||
return ALTIUM_PARSER::ReadInt( aProperties, wxT( "OWNERPARTID" ), ALTIUM_COMPONENT_NONE );
|
||||
}
|
||||
|
||||
|
||||
|
@ -99,7 +99,7 @@ ASCH_STORAGE_FILE::ASCH_STORAGE_FILE( ALTIUM_PARSER& aReader )
|
|||
data = aReader.ReadVector( dataSize );
|
||||
|
||||
if( aReader.HasParsingError() )
|
||||
THROW_IO_ERROR( "Storage stream was not parsed correctly" );
|
||||
THROW_IO_ERROR( wxT( "Storage stream was not parsed correctly" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -107,19 +107,19 @@ ASCH_SYMBOL::ASCH_SYMBOL( const std::map<wxString, wxString>& aProps )
|
|||
{
|
||||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::COMPONENT );
|
||||
|
||||
currentpartid = ALTIUM_PARSER::ReadInt( aProps, "CURRENTPARTID", ALTIUM_COMPONENT_NONE );
|
||||
libreference = ALTIUM_PARSER::ReadString( aProps, "LIBREFERENCE", "" );
|
||||
sourcelibraryname = ALTIUM_PARSER::ReadString( aProps, "SOURCELIBRARYNAME", "" );
|
||||
componentdescription = ALTIUM_PARSER::ReadString( aProps, "COMPONENTDESCRIPTION", "" );
|
||||
currentpartid = ALTIUM_PARSER::ReadInt( aProps, wxT( "CURRENTPARTID" ), ALTIUM_COMPONENT_NONE );
|
||||
libreference = ALTIUM_PARSER::ReadString( aProps, wxT( "LIBREFERENCE" ), wxT( "" ) );
|
||||
sourcelibraryname = ALTIUM_PARSER::ReadString( aProps, wxT( "SOURCELIBRARYNAME" ), wxT( "" ) );
|
||||
componentdescription = ALTIUM_PARSER::ReadString( aProps, wxT( "COMPONENTDESCRIPTION" ), wxT( "" ) );
|
||||
|
||||
orientation = ALTIUM_PARSER::ReadInt( aProps, "ORIENTATION", 0 );
|
||||
isMirrored = ALTIUM_PARSER::ReadBool( aProps, "ISMIRRORED", false );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
orientation = ALTIUM_PARSER::ReadInt( aProps, wxT( "ORIENTATION" ), 0 );
|
||||
isMirrored = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISMIRRORED" ), false );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
|
||||
partcount = ALTIUM_PARSER::ReadInt( aProps, "PARTCOUNT", 0 );
|
||||
displaymodecount = ALTIUM_PARSER::ReadInt( aProps, "DISPLAYMODECOUNT", 0 );
|
||||
displaymode = ALTIUM_PARSER::ReadInt( aProps, "DISPLAYMODE", 0 );
|
||||
partcount = ALTIUM_PARSER::ReadInt( aProps, wxT( "PARTCOUNT" ), 0 );
|
||||
displaymodecount = ALTIUM_PARSER::ReadInt( aProps, wxT( "DISPLAYMODECOUNT" ), 0 );
|
||||
displaymode = ALTIUM_PARSER::ReadInt( aProps, wxT( "DISPLAYMODE" ), 0 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -129,45 +129,45 @@ ASCH_PIN::ASCH_PIN( const std::map<wxString, wxString>& aProps )
|
|||
|
||||
ownerindex = ReadOwnerIndex( aProps );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, "OWNERPARTDISPLAYMODE", 0 );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, wxT( "OWNERPARTDISPLAYMODE" ), 0 );
|
||||
|
||||
name = ALTIUM_PARSER::ReadString( aProps, "NAME", "" );
|
||||
text = ALTIUM_PARSER::ReadString( aProps, "TEXT", "" );
|
||||
designator = ALTIUM_PARSER::ReadString( aProps, "DESIGNATOR", "" );
|
||||
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxT( "" ) );
|
||||
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
|
||||
designator = ALTIUM_PARSER::ReadString( aProps, wxT( "DESIGNATOR" ), wxT( "" ) );
|
||||
|
||||
int symbolOuterInt = ALTIUM_PARSER::ReadInt( aProps, "SYMBOL_OUTER", 0 );
|
||||
int symbolOuterInt = ALTIUM_PARSER::ReadInt( aProps, wxT( "SYMBOL_OUTER" ), 0 );
|
||||
symbolOuter = static_cast<ASCH_PIN_SYMBOL_OUTER>( symbolOuterInt );
|
||||
|
||||
int symbolInnerInt = ALTIUM_PARSER::ReadInt( aProps, "SYMBOL_INNER", 0 );
|
||||
int symbolInnerInt = ALTIUM_PARSER::ReadInt( aProps, wxT( "SYMBOL_INNER" ), 0 );
|
||||
symbolInner = static_cast<ASCH_PIN_SYMBOL_INNER>( symbolInnerInt );
|
||||
|
||||
int symbolOuterEdgeInt = ALTIUM_PARSER::ReadInt( aProps, "SYMBOL_OUTEREDGE", 0 );
|
||||
int symbolOuterEdgeInt = ALTIUM_PARSER::ReadInt( aProps, wxT( "SYMBOL_OUTEREDGE" ), 0 );
|
||||
symbolOuterEdge = ( symbolOuterEdgeInt == 0 || symbolOuterEdgeInt == 1
|
||||
|| symbolOuterEdgeInt == 4 || symbolOuterEdgeInt == 17 ) ?
|
||||
static_cast<ASCH_PIN_SYMBOL_OUTEREDGE>( symbolOuterEdgeInt ) :
|
||||
ASCH_PIN_SYMBOL_OUTEREDGE::NO_SYMBOL;
|
||||
|
||||
int symbolInnerEdgeInt = ALTIUM_PARSER::ReadInt( aProps, "SYMBOL_INNEREDGE", 0 );
|
||||
int symbolInnerEdgeInt = ALTIUM_PARSER::ReadInt( aProps, wxT( "SYMBOL_INNEREDGE" ), 0 );
|
||||
symbolInnerEdge = ( symbolInnerEdgeInt == 0 || symbolInnerEdgeInt == 3 ) ?
|
||||
static_cast<ASCH_PIN_SYMBOL_INNEREDGE>( symbolInnerEdgeInt ) :
|
||||
ASCH_PIN_SYMBOL_INNEREDGE::NO_SYMBOL;
|
||||
electrical = ReadEnum<ASCH_PIN_ELECTRICAL>( aProps, "ELECTRICAL", 0, 7,
|
||||
electrical = ReadEnum<ASCH_PIN_ELECTRICAL>( aProps, wxT( "ELECTRICAL" ), 0, 7,
|
||||
ASCH_PIN_ELECTRICAL::INPUT );
|
||||
|
||||
int pinconglomerate = ALTIUM_PARSER::ReadInt( aProps, "PINCONGLOMERATE", 0 );
|
||||
int pinconglomerate = ALTIUM_PARSER::ReadInt( aProps, wxT( "PINCONGLOMERATE" ), 0 );
|
||||
|
||||
orientation = static_cast<ASCH_RECORD_ORIENTATION>( pinconglomerate & 0x03 );
|
||||
showPinName = ( pinconglomerate & 0x08 ) != 0;
|
||||
showDesignator = ( pinconglomerate & 0x10 ) != 0;
|
||||
|
||||
int x = ALTIUM_PARSER::ReadInt( aProps, "LOCATION.X", 0 );
|
||||
int xfrac = ALTIUM_PARSER::ReadInt( aProps, "LOCATION.X_FRAC", 0 );
|
||||
int y = ALTIUM_PARSER::ReadInt( aProps, "LOCATION.Y", 0 );
|
||||
int yfrac = ALTIUM_PARSER::ReadInt( aProps, "LOCATION.Y_FRAC", 0 );
|
||||
int x = ALTIUM_PARSER::ReadInt( aProps, wxT( "LOCATION.X" ), 0 );
|
||||
int xfrac = ALTIUM_PARSER::ReadInt( aProps, wxT( "LOCATION.X_FRAC" ), 0 );
|
||||
int y = ALTIUM_PARSER::ReadInt( aProps, wxT( "LOCATION.Y" ), 0 );
|
||||
int yfrac = ALTIUM_PARSER::ReadInt( aProps, wxT( "LOCATION.Y_FRAC" ), 0 );
|
||||
location = wxPoint( Altium2KiCadUnit( x, xfrac ), -Altium2KiCadUnit( y, yfrac ) );
|
||||
|
||||
int p = ALTIUM_PARSER::ReadInt( aProps, "PINLENGTH", 0 );
|
||||
int pfrac = ALTIUM_PARSER::ReadInt( aProps, "PINLENGTH_FRAC", 0 );
|
||||
int p = ALTIUM_PARSER::ReadInt( aProps, wxT( "PINLENGTH" ), 0 );
|
||||
int pfrac = ALTIUM_PARSER::ReadInt( aProps, wxT( "PINLENGTH_FRAC" ), 0 );
|
||||
pinlength = Altium2KiCadUnit( p, pfrac );
|
||||
|
||||
// this code calculates the location as required by KiCad without rounding error attached
|
||||
|
@ -195,7 +195,7 @@ ASCH_PIN::ASCH_PIN( const std::map<wxString, wxString>& aProps )
|
|||
kicadYfrac -= pfrac;
|
||||
break;
|
||||
default:
|
||||
wxLogWarning( "Pin has unexpected orientation" );
|
||||
wxLogWarning( wxT( "Pin has unexpected orientation" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -211,18 +211,18 @@ ASCH_LABEL::ASCH_LABEL( const std::map<wxString, wxString>& aProps )
|
|||
ownerindex = ReadOwnerIndex( aProps );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
|
||||
text = ALTIUM_PARSER::ReadString( aProps, "TEXT", "" );
|
||||
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
|
||||
|
||||
fontId = ALTIUM_PARSER::ReadInt( aProps, "FONTID", 0 );
|
||||
isMirrored = ALTIUM_PARSER::ReadBool( aProps, "ISMIRRORED", false );
|
||||
fontId = ALTIUM_PARSER::ReadInt( aProps, wxT( "FONTID" ), 0 );
|
||||
isMirrored = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISMIRRORED" ), false );
|
||||
|
||||
justification = ReadEnum<ASCH_LABEL_JUSTIFICATION>( aProps, "JUSTIFICATION", 0, 8,
|
||||
justification = ReadEnum<ASCH_LABEL_JUSTIFICATION>( aProps, wxT( "JUSTIFICATION" ), 0, 8,
|
||||
ASCH_LABEL_JUSTIFICATION::BOTTOM_LEFT );
|
||||
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, "ORIENTATION", 0, 3,
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, wxT( "ORIENTATION" ), 0, 3,
|
||||
ASCH_RECORD_ORIENTATION::RIGHTWARDS );
|
||||
}
|
||||
|
||||
|
@ -232,21 +232,21 @@ ASCH_TEXT_FRAME::ASCH_TEXT_FRAME( const std::map<wxString, wxString>& aProps )
|
|||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::NOTE
|
||||
|| ReadRecord( aProps ) == ALTIUM_SCH_RECORD::TEXT_FRAME );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
size = wxSize( ReadKiCadUnitFrac( aProps, "CORNER.X" ) - location.x,
|
||||
-ReadKiCadUnitFrac( aProps, "CORNER.Y" ) - location.y );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
size = wxSize( ReadKiCadUnitFrac( aProps, wxT( "CORNER.X" ) ) - location.x,
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "CORNER.Y" ) ) - location.y );
|
||||
|
||||
text = ALTIUM_PARSER::ReadString( aProps, "TEXT", "" );
|
||||
text.Replace( "~1", "\n", true );
|
||||
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
|
||||
text.Replace( wxT( "~1" ), wxT( "\n" ), true );
|
||||
|
||||
fontId = ALTIUM_PARSER::ReadInt( aProps, "FONTID", 0 );
|
||||
isWordWrapped = ALTIUM_PARSER::ReadBool( aProps, "WORDWRAP", false );
|
||||
border = ALTIUM_PARSER::ReadBool( aProps, "SHOWBORDER", false );
|
||||
textMargin = ReadKiCadUnitFrac( aProps, "TEXTMARGIN" );
|
||||
areaColor = ALTIUM_PARSER::ReadInt( aProps, "AREACOLOR", 0 );
|
||||
fontId = ALTIUM_PARSER::ReadInt( aProps, wxT( "FONTID" ), 0 );
|
||||
isWordWrapped = ALTIUM_PARSER::ReadBool( aProps, wxT( "WORDWRAP" ), false );
|
||||
border = ALTIUM_PARSER::ReadBool( aProps, wxT( "SHOWBORDER" ), false );
|
||||
textMargin = ReadKiCadUnitFrac( aProps, wxT( "TEXTMARGIN" ) );
|
||||
areaColor = ALTIUM_PARSER::ReadInt( aProps, wxT( "AREACOLOR" ), 0 );
|
||||
|
||||
alignment = ReadEnum<ASCH_TEXT_FRAME_ALIGNMENT>( aProps, "ALIGNMENT", 1, 3,
|
||||
alignment = ReadEnum<ASCH_TEXT_FRAME_ALIGNMENT>( aProps, wxT( "ALIGNMENT" ), 1, 3,
|
||||
ASCH_TEXT_FRAME_ALIGNMENT::LEFT );
|
||||
}
|
||||
|
||||
|
@ -256,7 +256,7 @@ ASCH_NOTE::ASCH_NOTE( const std::map<wxString, wxString>& aProperties ) :
|
|||
{
|
||||
wxASSERT( ReadRecord( aProperties ) == ALTIUM_SCH_RECORD::NOTE );
|
||||
|
||||
author = ALTIUM_PARSER::ReadString( aProperties, "AUTHOR", "" );
|
||||
author = ALTIUM_PARSER::ReadString( aProperties, wxT( "AUTHOR" ), wxT( "" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -266,18 +266,18 @@ ASCH_BEZIER::ASCH_BEZIER( const std::map<wxString, wxString>& aProps )
|
|||
|
||||
ownerindex = ReadOwnerIndex( aProps );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, "OWNERPARTDISPLAYMODE", 0 );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, wxT( "OWNERPARTDISPLAYMODE" ), 0 );
|
||||
|
||||
int locationCount = ALTIUM_PARSER::ReadInt( aProps, "LOCATIONCOUNT", 0 );
|
||||
int locationCount = ALTIUM_PARSER::ReadInt( aProps, wxT( "LOCATIONCOUNT" ), 0 );
|
||||
|
||||
for( int i = 1; i <= locationCount; i++ )
|
||||
{
|
||||
const wxString si = std::to_string( i );
|
||||
points.emplace_back( ReadKiCadUnitFrac( aProps, "X" + si ),
|
||||
-ReadKiCadUnitFrac( aProps, "Y" + si ) );
|
||||
points.emplace_back( ReadKiCadUnitFrac( aProps, wxT( "X" ) + si ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "Y" ) + si ) );
|
||||
}
|
||||
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, "LINEWIDTH" );
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, wxT( "LINEWIDTH" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -287,21 +287,21 @@ ASCH_POLYLINE::ASCH_POLYLINE( const std::map<wxString, wxString>& aProps )
|
|||
|
||||
ownerindex = ReadOwnerIndex( aProps );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, "OWNERPARTDISPLAYMODE", 0 );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, wxT( "OWNERPARTDISPLAYMODE" ), 0 );
|
||||
|
||||
int locationCount = ALTIUM_PARSER::ReadInt( aProps, "LOCATIONCOUNT", 0 );
|
||||
int locationCount = ALTIUM_PARSER::ReadInt( aProps, wxT( "LOCATIONCOUNT" ), 0 );
|
||||
|
||||
for( int i = 1; i <= locationCount; i++ )
|
||||
{
|
||||
const wxString si = std::to_string( i );
|
||||
points.emplace_back( ReadKiCadUnitFrac( aProps, "X" + si ),
|
||||
-ReadKiCadUnitFrac( aProps, "Y" + si ) );
|
||||
points.emplace_back( ReadKiCadUnitFrac( aProps, wxT( "X" ) + si ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "Y" ) + si ) );
|
||||
}
|
||||
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, "LINEWIDTH" );
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, wxT( "LINEWIDTH" ) );
|
||||
|
||||
int linestyleVar = ALTIUM_PARSER::ReadInt( aProps, "LINESTYLEEXT", 0 );
|
||||
linestyleVar = ALTIUM_PARSER::ReadInt( aProps, "LINESTYLE", linestyleVar ); // overwrite if present
|
||||
int linestyleVar = ALTIUM_PARSER::ReadInt( aProps, wxT( "LINESTYLEEXT" ), 0 );
|
||||
linestyleVar = ALTIUM_PARSER::ReadInt( aProps, wxT( "LINESTYLE" ), linestyleVar ); // overwrite if present
|
||||
linestyle = linestyleVar >= 0 && linestyleVar <= 3 ?
|
||||
static_cast<ASCH_POLYLINE_LINESTYLE>( linestyleVar ) :
|
||||
ASCH_POLYLINE_LINESTYLE::SOLID;
|
||||
|
@ -314,22 +314,22 @@ ASCH_POLYGON::ASCH_POLYGON( const std::map<wxString, wxString>& aProps )
|
|||
|
||||
ownerindex = ReadOwnerIndex( aProps );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, "OWNERPARTDISPLAYMODE", 0 );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, wxT( "OWNERPARTDISPLAYMODE" ), 0 );
|
||||
|
||||
int locationCount = ALTIUM_PARSER::ReadInt( aProps, "LOCATIONCOUNT", 0 );
|
||||
int locationCount = ALTIUM_PARSER::ReadInt( aProps, wxT( "LOCATIONCOUNT" ), 0 );
|
||||
|
||||
for( int i = 1; i <= locationCount; i++ )
|
||||
{
|
||||
const wxString si = std::to_string( i );
|
||||
points.emplace_back( ReadKiCadUnitFrac( aProps, "X" + si ),
|
||||
-ReadKiCadUnitFrac( aProps, "Y" + si ) );
|
||||
points.emplace_back( ReadKiCadUnitFrac( aProps, wxT( "X" ) + si ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "Y" ) + si ) );
|
||||
}
|
||||
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, "LINEWIDTH" );
|
||||
isSolid = ALTIUM_PARSER::ReadBool( aProps, "ISSOLID", false );
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, wxT( "LINEWIDTH" ) );
|
||||
isSolid = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISSOLID" ), false );
|
||||
|
||||
color = ALTIUM_PARSER::ReadInt( aProps, "COLOR", 0 );
|
||||
areacolor = ALTIUM_PARSER::ReadInt( aProps, "AREACOLOR", 0 );
|
||||
color = ALTIUM_PARSER::ReadInt( aProps, wxT( "COLOR" ), 0 );
|
||||
areacolor = ALTIUM_PARSER::ReadInt( aProps, wxT( "AREACOLOR" ), 0 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -339,22 +339,22 @@ ASCH_ROUND_RECTANGLE::ASCH_ROUND_RECTANGLE( const std::map<wxString, wxString>&
|
|||
|
||||
ownerindex = ReadOwnerIndex( aProps );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, "OWNERPARTDISPLAYMODE", 0 );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, wxT( "OWNERPARTDISPLAYMODE" ), 0 );
|
||||
|
||||
bottomLeft = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
topRight = wxPoint( ReadKiCadUnitFrac( aProps, "CORNER.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "CORNER.Y" ) );
|
||||
bottomLeft = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
topRight = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "CORNER.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "CORNER.Y" ) ) );
|
||||
|
||||
cornerradius = wxSize( ReadKiCadUnitFrac( aProps, "CORNERXRADIUS" ),
|
||||
-ReadKiCadUnitFrac( aProps, "CORNERYRADIUS" ) );
|
||||
cornerradius = wxSize( ReadKiCadUnitFrac( aProps, wxT( "CORNERXRADIUS" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "CORNERYRADIUS" ) ) );
|
||||
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, "LINEWIDTH" );
|
||||
isSolid = ALTIUM_PARSER::ReadBool( aProps, "ISSOLID", false );
|
||||
isTransparent = ALTIUM_PARSER::ReadBool( aProps, "TRANSPARENT", false );
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, wxT( "LINEWIDTH" ) );
|
||||
isSolid = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISSOLID" ), false );
|
||||
isTransparent = ALTIUM_PARSER::ReadBool( aProps, wxT( "TRANSPARENT" ), false );
|
||||
|
||||
color = ALTIUM_PARSER::ReadInt( aProps, "COLOR", 0 );
|
||||
areacolor = ALTIUM_PARSER::ReadInt( aProps, "AREACOLOR", 0 );
|
||||
color = ALTIUM_PARSER::ReadInt( aProps, wxT( "COLOR" ), 0 );
|
||||
areacolor = ALTIUM_PARSER::ReadInt( aProps, wxT( "AREACOLOR" ), 0 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -364,16 +364,16 @@ ASCH_ARC::ASCH_ARC( const std::map<wxString, wxString>& aProps )
|
|||
|
||||
ownerindex = ReadOwnerIndex( aProps );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, "OWNERPARTDISPLAYMODE", 0 );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, wxT( "OWNERPARTDISPLAYMODE" ), 0 );
|
||||
|
||||
center = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
radius = ReadKiCadUnitFrac( aProps, "RADIUS" );
|
||||
center = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
radius = ReadKiCadUnitFrac( aProps, wxT( "RADIUS" ) );
|
||||
|
||||
startAngle = ALTIUM_PARSER::ReadDouble( aProps, "STARTANGLE", 0 );
|
||||
endAngle = ALTIUM_PARSER::ReadDouble( aProps, "ENDANGLE", 0 );
|
||||
startAngle = ALTIUM_PARSER::ReadDouble( aProps, wxT( "STARTANGLE" ), 0 );
|
||||
endAngle = ALTIUM_PARSER::ReadDouble( aProps, wxT( "ENDANGLE" ), 0 );
|
||||
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, "LINEWIDTH" );
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, wxT( "LINEWIDTH" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -383,14 +383,14 @@ ASCH_LINE::ASCH_LINE( const std::map<wxString, wxString>& aProps )
|
|||
|
||||
ownerindex = ReadOwnerIndex( aProps );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, "OWNERPARTDISPLAYMODE", 0 );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, wxT( "OWNERPARTDISPLAYMODE" ), 0 );
|
||||
|
||||
point1 = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
point2 = wxPoint( ReadKiCadUnitFrac( aProps, "CORNER.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "CORNER.Y" ) );
|
||||
point1 = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
point2 = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "CORNER.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "CORNER.Y" ) ) );
|
||||
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, "LINEWIDTH" );
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, wxT( "LINEWIDTH" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -400,19 +400,19 @@ ASCH_RECTANGLE::ASCH_RECTANGLE( const std::map<wxString, wxString>& aProps )
|
|||
|
||||
ownerindex = ReadOwnerIndex( aProps );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, "OWNERPARTDISPLAYMODE", 0 );
|
||||
ownerpartdisplaymode = ALTIUM_PARSER::ReadInt( aProps, wxT( "OWNERPARTDISPLAYMODE" ), 0 );
|
||||
|
||||
bottomLeft = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
topRight = wxPoint( ReadKiCadUnitFrac( aProps, "CORNER.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "CORNER.Y" ) );
|
||||
bottomLeft = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
topRight = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "CORNER.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "CORNER.Y" ) ) );
|
||||
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, "LINEWIDTH" );
|
||||
isSolid = ALTIUM_PARSER::ReadBool( aProps, "ISSOLID", false );
|
||||
isTransparent = ALTIUM_PARSER::ReadBool( aProps, "TRANSPARENT", false );
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, wxT( "LINEWIDTH" ) );
|
||||
isSolid = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISSOLID" ), false );
|
||||
isTransparent = ALTIUM_PARSER::ReadBool( aProps, wxT( "TRANSPARENT" ), false );
|
||||
|
||||
color = ALTIUM_PARSER::ReadInt( aProps, "COLOR", 0 );
|
||||
areacolor = ALTIUM_PARSER::ReadInt( aProps, "AREACOLOR", 0 );
|
||||
color = ALTIUM_PARSER::ReadInt( aProps, wxT( "COLOR" ), 0 );
|
||||
areacolor = ALTIUM_PARSER::ReadInt( aProps, wxT( "AREACOLOR" ), 0 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -420,15 +420,15 @@ ASCH_SHEET_SYMBOL::ASCH_SHEET_SYMBOL( const std::map<wxString, wxString>& aProps
|
|||
{
|
||||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::SHEET_SYMBOL );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
size = wxSize( ReadKiCadUnitFrac( aProps, "XSIZE" ),
|
||||
ReadKiCadUnitFrac( aProps, "YSIZE" ) );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
size = wxSize( ReadKiCadUnitFrac( aProps, wxT( "XSIZE" ) ),
|
||||
ReadKiCadUnitFrac( aProps, wxT( "YSIZE" ) ) );
|
||||
|
||||
isSolid = ALTIUM_PARSER::ReadBool( aProps, "ISSOLID", false );
|
||||
isSolid = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISSOLID" ), false );
|
||||
|
||||
color = ALTIUM_PARSER::ReadInt( aProps, "COLOR", 0 );
|
||||
areacolor = ALTIUM_PARSER::ReadInt( aProps, "AREACOLOR", 0 );
|
||||
color = ALTIUM_PARSER::ReadInt( aProps, wxT( "COLOR" ), 0 );
|
||||
areacolor = ALTIUM_PARSER::ReadInt( aProps, wxT( "AREACOLOR" ), 0 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -440,14 +440,14 @@ ASCH_SHEET_ENTRY::ASCH_SHEET_ENTRY( const std::map<wxString, wxString>& aProps )
|
|||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
|
||||
// some magic, because it stores those infos in a different unit??
|
||||
distanceFromTop = ReadKiCadUnitFrac1( aProps, "DISTANCEFROMTOP" );
|
||||
distanceFromTop = ReadKiCadUnitFrac1( aProps, wxT( "DISTANCEFROMTOP" ) );
|
||||
|
||||
side = ReadEnum<ASCH_SHEET_ENTRY_SIDE>( aProps, "SIDE", 0, 3, ASCH_SHEET_ENTRY_SIDE::LEFT );
|
||||
side = ReadEnum<ASCH_SHEET_ENTRY_SIDE>( aProps, wxT( "SIDE" ), 0, 3, ASCH_SHEET_ENTRY_SIDE::LEFT );
|
||||
|
||||
name = ALTIUM_PARSER::ReadString( aProps, "NAME", "" );
|
||||
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxT( "" ) );
|
||||
|
||||
iotype = ReadEnum<ASCH_PORT_IOTYPE>( aProps, "IOTYPE", 0, 3, ASCH_PORT_IOTYPE::UNSPECIFIED );
|
||||
style = ReadEnum<ASCH_PORT_STYLE>( aProps, "STYLE", 0, 7, ASCH_PORT_STYLE::NONE_HORIZONTAL );
|
||||
iotype = ReadEnum<ASCH_PORT_IOTYPE>( aProps, wxT( "IOTYPE" ), 0, 3, ASCH_PORT_IOTYPE::UNSPECIFIED );
|
||||
style = ReadEnum<ASCH_PORT_STYLE>( aProps, wxT( "STYLE" ), 0, 7, ASCH_PORT_STYLE::NONE_HORIZONTAL );
|
||||
}
|
||||
|
||||
|
||||
|
@ -457,16 +457,16 @@ ASCH_POWER_PORT::ASCH_POWER_PORT( const std::map<wxString, wxString>& aProps )
|
|||
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, "ORIENTATION", 0, 3,
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, wxT( "ORIENTATION" ), 0, 3,
|
||||
ASCH_RECORD_ORIENTATION::RIGHTWARDS );
|
||||
|
||||
text = ALTIUM_PARSER::ReadString( aProps, "TEXT", "" );
|
||||
showNetName = ALTIUM_PARSER::ReadBool( aProps, "SHOWNETNAME", true );
|
||||
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
|
||||
showNetName = ALTIUM_PARSER::ReadBool( aProps, wxT( "SHOWNETNAME" ), true );
|
||||
|
||||
style = ReadEnum<ASCH_POWER_PORT_STYLE>( aProps, "STYLE", 0, 10,
|
||||
style = ReadEnum<ASCH_POWER_PORT_STYLE>( aProps, wxT( "STYLE" ), 0, 10,
|
||||
ASCH_POWER_PORT_STYLE::CIRCLE );
|
||||
}
|
||||
|
||||
|
@ -476,17 +476,17 @@ ASCH_PORT::ASCH_PORT( const std::map<wxString, wxString>& aProps )
|
|||
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
|
||||
name = ALTIUM_PARSER::ReadString( aProps, "NAME", "" );
|
||||
harnessType = ALTIUM_PARSER::ReadString( aProps, "HARNESSTYPE", "" );
|
||||
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxT( "" ) );
|
||||
harnessType = ALTIUM_PARSER::ReadString( aProps, wxT( "HARNESSTYPE" ), wxT( "" ) );
|
||||
|
||||
width = ReadKiCadUnitFrac( aProps, "WIDTH" );
|
||||
height = ReadKiCadUnitFrac( aProps, "HEIGHT" );
|
||||
width = ReadKiCadUnitFrac( aProps, wxT( "WIDTH" ) );
|
||||
height = ReadKiCadUnitFrac( aProps, wxT( "HEIGHT" ) );
|
||||
|
||||
iotype = ReadEnum<ASCH_PORT_IOTYPE>( aProps, "IOTYPE", 0, 3, ASCH_PORT_IOTYPE::UNSPECIFIED );
|
||||
style = ReadEnum<ASCH_PORT_STYLE>( aProps, "STYLE", 0, 7, ASCH_PORT_STYLE::NONE_HORIZONTAL );
|
||||
iotype = ReadEnum<ASCH_PORT_IOTYPE>( aProps, wxT( "IOTYPE" ), 0, 3, ASCH_PORT_IOTYPE::UNSPECIFIED );
|
||||
style = ReadEnum<ASCH_PORT_STYLE>( aProps, wxT( "STYLE" ), 0, 7, ASCH_PORT_STYLE::NONE_HORIZONTAL );
|
||||
}
|
||||
|
||||
|
||||
|
@ -494,11 +494,11 @@ ASCH_NO_ERC::ASCH_NO_ERC( const std::map<wxString, wxString>& aProps )
|
|||
{
|
||||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::NO_ERC );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
|
||||
isActive = ALTIUM_PARSER::ReadBool( aProps, "ISACTIVE", true );
|
||||
supressAll = ALTIUM_PARSER::ReadInt( aProps, "SUPPRESSALL", true );
|
||||
isActive = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISACTIVE" ), true );
|
||||
supressAll = ALTIUM_PARSER::ReadInt( aProps, wxT( "SUPPRESSALL" ), true );
|
||||
}
|
||||
|
||||
|
||||
|
@ -506,12 +506,12 @@ ASCH_NET_LABEL::ASCH_NET_LABEL( const std::map<wxString, wxString>& aProps )
|
|||
{
|
||||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::NET_LABEL );
|
||||
|
||||
text = ALTIUM_PARSER::ReadString( aProps, "TEXT", "" );
|
||||
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, "ORIENTATION", 0, 3,
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, wxT( "ORIENTATION" ), 0, 3,
|
||||
ASCH_RECORD_ORIENTATION::RIGHTWARDS );
|
||||
}
|
||||
|
||||
|
@ -520,18 +520,18 @@ ASCH_BUS::ASCH_BUS( const std::map<wxString, wxString>& aProps )
|
|||
{
|
||||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::BUS );
|
||||
|
||||
indexinsheet = ALTIUM_PARSER::ReadInt( aProps, "INDEXINSHEET", 0 );
|
||||
indexinsheet = ALTIUM_PARSER::ReadInt( aProps, wxT( "INDEXINSHEET" ), 0 );
|
||||
|
||||
int locationcount = ALTIUM_PARSER::ReadInt( aProps, "LOCATIONCOUNT", 0 );
|
||||
int locationcount = ALTIUM_PARSER::ReadInt( aProps, wxT( "LOCATIONCOUNT" ), 0 );
|
||||
|
||||
for( int i = 1; i <= locationcount; i++ )
|
||||
{
|
||||
const wxString si = std::to_string( i );
|
||||
points.emplace_back( ReadKiCadUnitFrac( aProps, "X" + si ),
|
||||
-ReadKiCadUnitFrac( aProps, "Y" + si ) );
|
||||
points.emplace_back( ReadKiCadUnitFrac( aProps, wxT( "X" ) + si ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "Y" ) + si ) );
|
||||
}
|
||||
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, "LINEWIDTH" );
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, wxT( "LINEWIDTH" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -539,18 +539,18 @@ ASCH_WIRE::ASCH_WIRE( const std::map<wxString, wxString>& aProps )
|
|||
{
|
||||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::WIRE );
|
||||
|
||||
indexinsheet = ALTIUM_PARSER::ReadInt( aProps, "INDEXINSHEET", 0 );
|
||||
indexinsheet = ALTIUM_PARSER::ReadInt( aProps, wxT( "INDEXINSHEET" ), 0 );
|
||||
|
||||
int locationcount = ALTIUM_PARSER::ReadInt( aProps, "LOCATIONCOUNT", 0 );
|
||||
int locationcount = ALTIUM_PARSER::ReadInt( aProps, wxT( "LOCATIONCOUNT" ), 0 );
|
||||
|
||||
for( int i = 1; i <= locationcount; i++ )
|
||||
{
|
||||
const wxString si = std::to_string( i );
|
||||
points.emplace_back( ReadKiCadUnitFrac( aProps, "X" + si ),
|
||||
-ReadKiCadUnitFrac( aProps, "Y" + si ) );
|
||||
points.emplace_back( ReadKiCadUnitFrac( aProps, wxT( "X" ) + si ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "Y" ) + si ) );
|
||||
}
|
||||
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, "LINEWIDTH" );
|
||||
lineWidth = ReadKiCadUnitFrac( aProps, wxT( "LINEWIDTH" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -560,8 +560,8 @@ ASCH_JUNCTION::ASCH_JUNCTION( const std::map<wxString, wxString>& aProps )
|
|||
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -569,18 +569,18 @@ ASCH_IMAGE::ASCH_IMAGE( const std::map<wxString, wxString>& aProps )
|
|||
{
|
||||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::IMAGE );
|
||||
|
||||
indexinsheet = ALTIUM_PARSER::ReadInt( aProps, "INDEXINSHEET", 0 );
|
||||
indexinsheet = ALTIUM_PARSER::ReadInt( aProps, wxT( "INDEXINSHEET" ), 0 );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
|
||||
filename = ALTIUM_PARSER::ReadString( aProps, "FILENAME", "" );
|
||||
filename = ALTIUM_PARSER::ReadString( aProps, wxT( "FILENAME" ), wxT( "" ) );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
corner = wxPoint( ReadKiCadUnitFrac( aProps, "CORNER.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "CORNER.Y" ) );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
corner = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "CORNER.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "CORNER.Y" ) ) );
|
||||
|
||||
embedimage = ALTIUM_PARSER::ReadBool( aProps, "EMBEDIMAGE", false );
|
||||
keepaspect = ALTIUM_PARSER::ReadBool( aProps, "KEEPASPECT", false );
|
||||
embedimage = ALTIUM_PARSER::ReadBool( aProps, wxT( "EMBEDIMAGE" ), false );
|
||||
keepaspect = ALTIUM_PARSER::ReadBool( aProps, wxT( "KEEPASPECT" ), false );
|
||||
}
|
||||
|
||||
|
||||
|
@ -590,14 +590,14 @@ ASCH_SHEET_FONT::ASCH_SHEET_FONT( const std::map<wxString, wxString>& aProps, in
|
|||
|
||||
const wxString sid = std::to_string( aId );
|
||||
|
||||
fontname = ALTIUM_PARSER::ReadString( aProps, "FONTNAME" + sid, "" );
|
||||
fontname = ALTIUM_PARSER::ReadString( aProps, wxT( "FONTNAME" ) + sid, wxT( "" ) );
|
||||
|
||||
size = ReadKiCadUnitFrac( aProps, "SIZE" + sid );
|
||||
rotation = ALTIUM_PARSER::ReadInt( aProps, "ROTATION" + sid, 0 );
|
||||
size = ReadKiCadUnitFrac( aProps, wxT( "SIZE" ) + sid );
|
||||
rotation = ALTIUM_PARSER::ReadInt( aProps, wxT( "ROTATION" ) + sid, 0 );
|
||||
|
||||
italic = ALTIUM_PARSER::ReadBool( aProps, "ITALIC" + sid, false );
|
||||
bold = ALTIUM_PARSER::ReadBool( aProps, "BOLD" + sid, false );
|
||||
underline = ALTIUM_PARSER::ReadBool( aProps, "UNDERLINE" + sid, false );
|
||||
italic = ALTIUM_PARSER::ReadBool( aProps, wxT( "ITALIC" ) + sid, false );
|
||||
bold = ALTIUM_PARSER::ReadBool( aProps, wxT( "BOLD" ) + sid, false );
|
||||
underline = ALTIUM_PARSER::ReadBool( aProps, wxT( "UNDERLINE" ) + sid, false );
|
||||
}
|
||||
|
||||
wxPoint ASchSheetGetSize( ASCH_SHEET_SIZE aSheetSize )
|
||||
|
@ -632,14 +632,14 @@ ASCH_SHEET::ASCH_SHEET( const std::map<wxString, wxString>& aProps )
|
|||
{
|
||||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::SHEET );
|
||||
|
||||
int fontidcount = ALTIUM_PARSER::ReadInt( aProps, "FONTIDCOUNT", 0 );
|
||||
int fontidcount = ALTIUM_PARSER::ReadInt( aProps, wxT( "FONTIDCOUNT" ), 0 );
|
||||
|
||||
for( int i = 1; i <= fontidcount; i++ )
|
||||
fonts.emplace_back( aProps, i );
|
||||
|
||||
sheetSize = ReadEnum<ASCH_SHEET_SIZE>( aProps, "SHEETSTYLE", 0, 17, ASCH_SHEET_SIZE::A4 );
|
||||
sheetSize = ReadEnum<ASCH_SHEET_SIZE>( aProps, wxT( "SHEETSTYLE" ), 0, 17, ASCH_SHEET_SIZE::A4 );
|
||||
sheetOrientation = ReadEnum<ASCH_SHEET_WORKSPACEORIENTATION>(
|
||||
aProps, "WORKSPACEORIENTATION", 0, 1, ASCH_SHEET_WORKSPACEORIENTATION::LANDSCAPE );
|
||||
aProps, wxT( "WORKSPACEORIENTATION" ), 0, 1, ASCH_SHEET_WORKSPACEORIENTATION::LANDSCAPE );
|
||||
}
|
||||
|
||||
|
||||
|
@ -650,15 +650,15 @@ ASCH_SHEET_NAME::ASCH_SHEET_NAME( const std::map<wxString, wxString>& aProps )
|
|||
ownerindex = ReadOwnerIndex( aProps );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
|
||||
text = ALTIUM_PARSER::ReadString( aProps, "TEXT", "" );
|
||||
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
|
||||
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, "ORIENTATION", 0, 3,
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, wxT( "ORIENTATION" ), 0, 3,
|
||||
ASCH_RECORD_ORIENTATION::RIGHTWARDS );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
|
||||
isHidden = ALTIUM_PARSER::ReadBool( aProps, "ISHIDDEN", false );
|
||||
isHidden = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISHIDDEN" ), false );
|
||||
}
|
||||
|
||||
|
||||
|
@ -669,15 +669,15 @@ ASCH_FILE_NAME::ASCH_FILE_NAME( const std::map<wxString, wxString>& aProps )
|
|||
ownerindex = ReadOwnerIndex( aProps );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
|
||||
text = ALTIUM_PARSER::ReadString( aProps, "TEXT", "" );
|
||||
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
|
||||
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, "ORIENTATION", 0, 3,
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, wxT( "ORIENTATION" ), 0, 3,
|
||||
ASCH_RECORD_ORIENTATION::RIGHTWARDS );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
|
||||
isHidden = ALTIUM_PARSER::ReadBool( aProps, "ISHIDDEN", false );
|
||||
isHidden = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISHIDDEN" ), false );
|
||||
}
|
||||
|
||||
|
||||
|
@ -688,17 +688,17 @@ ASCH_DESIGNATOR::ASCH_DESIGNATOR( const std::map<wxString, wxString>& aProps )
|
|||
ownerindex = ReadOwnerIndex( aProps );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
|
||||
name = ALTIUM_PARSER::ReadString( aProps, "NAME", "" );
|
||||
text = ALTIUM_PARSER::ReadString( aProps, "TEXT", "" );
|
||||
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxT( "" ) );
|
||||
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
|
||||
|
||||
justification = ReadEnum<ASCH_LABEL_JUSTIFICATION>( aProps, "JUSTIFICATION", 0, 8,
|
||||
justification = ReadEnum<ASCH_LABEL_JUSTIFICATION>( aProps, wxT( "JUSTIFICATION" ), 0, 8,
|
||||
ASCH_LABEL_JUSTIFICATION::BOTTOM_LEFT );
|
||||
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, "ORIENTATION", 0, 3,
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, wxT( "ORIENTATION" ), 0, 3,
|
||||
ASCH_RECORD_ORIENTATION::RIGHTWARDS );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -706,11 +706,11 @@ ASCH_IMPLEMENTATION::ASCH_IMPLEMENTATION( const std::map<wxString, wxString>& aP
|
|||
{
|
||||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::IMPLEMENTATION );
|
||||
|
||||
ownerindex = ALTIUM_PARSER::ReadInt( aProps, "OWNERINDEX", ALTIUM_COMPONENT_NONE );
|
||||
name = ALTIUM_PARSER::ReadString( aProps, "MODELNAME", "" );
|
||||
type = ALTIUM_PARSER::ReadString( aProps, "MODELTYPE", "" );
|
||||
libname = ALTIUM_PARSER::ReadString( aProps, "MODELDATAFILE0", "" );
|
||||
isCurrent = ALTIUM_PARSER::ReadBool( aProps, "ISCURRENT", false );
|
||||
ownerindex = ALTIUM_PARSER::ReadInt( aProps, wxT( "OWNERINDEX" ), ALTIUM_COMPONENT_NONE );
|
||||
name = ALTIUM_PARSER::ReadString( aProps, wxT( "MODELNAME" ), wxT( "" ) );
|
||||
type = ALTIUM_PARSER::ReadString( aProps, wxT( "MODELTYPE" ), wxT( "" ) );
|
||||
libname = ALTIUM_PARSER::ReadString( aProps, wxT( "MODELDATAFILE0" ), wxT( "" ) );
|
||||
isCurrent = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISCURRENT" ), false );
|
||||
}
|
||||
|
||||
|
||||
|
@ -725,10 +725,10 @@ ASCH_BUS_ENTRY::ASCH_BUS_ENTRY( const std::map<wxString, wxString>& aProps )
|
|||
{
|
||||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::BUS_ENTRY );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
corner = wxPoint( ReadKiCadUnitFrac( aProps, "CORNER.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "CORNER.Y" ) );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
corner = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "CORNER.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "CORNER.Y" ) ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -739,19 +739,19 @@ ASCH_PARAMETER::ASCH_PARAMETER( const std::map<wxString, wxString>& aProps )
|
|||
ownerindex = ReadOwnerIndex( aProps );
|
||||
ownerpartid = ReadOwnerPartId( aProps );
|
||||
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
|
||||
-ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
|
||||
location = wxPoint( ReadKiCadUnitFrac( aProps, wxT( "LOCATION.X" ) ),
|
||||
-ReadKiCadUnitFrac( aProps, wxT( "LOCATION.Y" ) ) );
|
||||
|
||||
justification = ReadEnum<ASCH_LABEL_JUSTIFICATION>( aProps, "JUSTIFICATION", 0, 8,
|
||||
justification = ReadEnum<ASCH_LABEL_JUSTIFICATION>( aProps, wxT( "JUSTIFICATION" ), 0, 8,
|
||||
ASCH_LABEL_JUSTIFICATION::BOTTOM_LEFT );
|
||||
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, "ORIENTATION", 0, 3,
|
||||
orientation = ReadEnum<ASCH_RECORD_ORIENTATION>( aProps, wxT( "ORIENTATION" ), 0, 3,
|
||||
ASCH_RECORD_ORIENTATION::RIGHTWARDS );
|
||||
|
||||
name = ALTIUM_PARSER::ReadString( aProps, "NAME", "" );
|
||||
text = ALTIUM_PARSER::ReadString( aProps, "TEXT", "" );
|
||||
name = ALTIUM_PARSER::ReadString( aProps, wxT( "NAME" ), wxT( "" ) );
|
||||
text = ALTIUM_PARSER::ReadString( aProps, wxT( "TEXT" ), wxT( "" ) );
|
||||
|
||||
isHidden = ALTIUM_PARSER::ReadBool( aProps, "ISHIDDEN", false );
|
||||
isMirrored = ALTIUM_PARSER::ReadBool( aProps, "ISMIRRORED", false );
|
||||
isShowName = ALTIUM_PARSER::ReadBool( aProps, "SHOWNAME", false );
|
||||
isHidden = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISHIDDEN" ), false );
|
||||
isMirrored = ALTIUM_PARSER::ReadBool( aProps, wxT( "ISMIRRORED" ), false );
|
||||
isShowName = ALTIUM_PARSER::ReadBool( aProps, wxT( "SHOWNAME" ), false );
|
||||
}
|
||||
|
|
|
@ -93,19 +93,19 @@ SCH_ALTIUM_PLUGIN::~SCH_ALTIUM_PLUGIN()
|
|||
|
||||
const wxString SCH_ALTIUM_PLUGIN::GetName() const
|
||||
{
|
||||
return "Altium";
|
||||
return wxT( "Altium" );
|
||||
}
|
||||
|
||||
|
||||
const wxString SCH_ALTIUM_PLUGIN::GetFileExtension() const
|
||||
{
|
||||
return "SchDoc";
|
||||
return wxT( "SchDoc" );
|
||||
}
|
||||
|
||||
|
||||
const wxString SCH_ALTIUM_PLUGIN::GetLibraryFileExtension() const
|
||||
{
|
||||
return "SchLib";
|
||||
return wxT( "SchLib" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -137,9 +137,9 @@ wxString SCH_ALTIUM_PLUGIN::getLibName()
|
|||
}
|
||||
|
||||
if( m_libName.IsEmpty() )
|
||||
m_libName = "noname";
|
||||
m_libName = wxT( "noname" );
|
||||
|
||||
m_libName += "-altium-import";
|
||||
m_libName += wxT( "-altium-import" );
|
||||
m_libName = LIB_ID::FixIllegalChars( m_libName, true );
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ SCH_SHEET* SCH_ALTIUM_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchem
|
|||
|
||||
if( aAppendToMe )
|
||||
{
|
||||
wxCHECK_MSG( aSchematic->IsValid(), nullptr, "Can't append to a schematic with no root!" );
|
||||
wxCHECK_MSG( aSchematic->IsValid(), nullptr, wxT( "Can't append to a schematic with no root!" ) );
|
||||
m_rootSheet = &aSchematic->Root();
|
||||
}
|
||||
else
|
||||
|
@ -183,7 +183,7 @@ SCH_SHEET* SCH_ALTIUM_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchem
|
|||
sheetpath.push_back( m_rootSheet );
|
||||
|
||||
m_rootSheet->AddInstance( sheetpath );
|
||||
m_rootSheet->SetPageNumber( sheetpath, "#" ); // We'll update later if we find a
|
||||
m_rootSheet->SetPageNumber( sheetpath, wxT( "#" ) ); // We'll update later if we find a
|
||||
// pageNumber record for it
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ SCH_SHEET* SCH_ALTIUM_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchem
|
|||
|
||||
SYMBOL_LIB_TABLE* libTable = m_schematic->Prj().SchSymbolLibTable();
|
||||
|
||||
wxCHECK_MSG( libTable, nullptr, "Could not load symbol lib table." );
|
||||
wxCHECK_MSG( libTable, nullptr, wxT( "Could not load symbol lib table." ) );
|
||||
|
||||
m_pi.set( SCH_IO_MGR::FindPlugin( SCH_IO_MGR::SCH_KICAD ) );
|
||||
|
||||
|
@ -206,11 +206,11 @@ SCH_SHEET* SCH_ALTIUM_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchem
|
|||
{
|
||||
// Create a new empty symbol library.
|
||||
m_pi->CreateSymbolLib( getLibFileName().GetFullPath() );
|
||||
wxString libTableUri = "${KIPRJMOD}/" + getLibFileName().GetFullName();
|
||||
wxString libTableUri = wxT( "${KIPRJMOD}/" ) + getLibFileName().GetFullName();
|
||||
|
||||
// Add the new library to the project symbol library table.
|
||||
libTable->InsertRow( new SYMBOL_LIB_TABLE_ROW( getLibName(), libTableUri,
|
||||
wxString( "KiCad" ) ) );
|
||||
wxString( wxT( "KiCad" ) ) ) );
|
||||
|
||||
// Save project symbol library table.
|
||||
wxFileName fn( m_schematic->Prj().GetProjectPath(),
|
||||
|
@ -243,7 +243,7 @@ SCH_SHEET* SCH_ALTIUM_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchem
|
|||
void SCH_ALTIUM_PLUGIN::ParseAltiumSch( const wxString& aFileName )
|
||||
{
|
||||
// Open file
|
||||
FILE* fp = wxFopen( aFileName, "rb" );
|
||||
FILE* fp = wxFopen( aFileName, wxT( "rb" ) );
|
||||
|
||||
if( fp == nullptr )
|
||||
{
|
||||
|
@ -258,7 +258,7 @@ void SCH_ALTIUM_PLUGIN::ParseAltiumSch( const wxString& aFileName )
|
|||
if( len < 0 )
|
||||
{
|
||||
fclose( fp );
|
||||
THROW_IO_ERROR( "Read error, cannot determine length of file." );
|
||||
THROW_IO_ERROR( wxT( "Read error, cannot determine length of file." ) );
|
||||
}
|
||||
|
||||
std::unique_ptr<unsigned char[]> buffer( new unsigned char[len] );
|
||||
|
@ -268,7 +268,7 @@ void SCH_ALTIUM_PLUGIN::ParseAltiumSch( const wxString& aFileName )
|
|||
fclose( fp );
|
||||
|
||||
if( static_cast<size_t>( len ) != bytesRead )
|
||||
THROW_IO_ERROR( "Read error." );
|
||||
THROW_IO_ERROR( wxT( "Read error." ) );
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -293,11 +293,11 @@ void SCH_ALTIUM_PLUGIN::ParseStorage( const CFB::CompoundFileReader& aReader )
|
|||
ALTIUM_PARSER reader( aReader, file );
|
||||
|
||||
std::map<wxString, wxString> properties = reader.ReadProperties();
|
||||
wxString header = ALTIUM_PARSER::ReadString( properties, "HEADER", "" );
|
||||
int weight = ALTIUM_PARSER::ReadInt( properties, "WEIGHT", 0 );
|
||||
wxString header = ALTIUM_PARSER::ReadString( properties, wxT( "HEADER" ), wxT( "" ) );
|
||||
int weight = ALTIUM_PARSER::ReadInt( properties, wxT( "WEIGHT" ), 0 );
|
||||
|
||||
if( weight < 0 )
|
||||
THROW_IO_ERROR( "Storage weight is negative!" );
|
||||
THROW_IO_ERROR( wxT( "Storage weight is negative!" ) );
|
||||
|
||||
for( int i = 0; i < weight; i++ )
|
||||
{
|
||||
|
@ -305,14 +305,14 @@ void SCH_ALTIUM_PLUGIN::ParseStorage( const CFB::CompoundFileReader& aReader )
|
|||
}
|
||||
|
||||
if( reader.HasParsingError() )
|
||||
THROW_IO_ERROR( "stream was not parsed correctly!" );
|
||||
THROW_IO_ERROR( wxT( "stream was not parsed correctly!" ) );
|
||||
|
||||
// TODO pointhi: is it possible to have multiple headers in one Storage file? Otherwise
|
||||
// throw IO Error.
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
{
|
||||
m_reporter->Report( wxString::Format( _( "Storage file not fully parsed "
|
||||
"(%d bytes remaining)." ),
|
||||
wxT( "(%d bytes remaining)." ) ),
|
||||
reader.GetRemainingBytes() ),
|
||||
RPT_SEVERITY_ERROR );
|
||||
}
|
||||
|
@ -324,23 +324,23 @@ void SCH_ALTIUM_PLUGIN::ParseFileHeader( const CFB::CompoundFileReader& aReader
|
|||
const CFB::COMPOUND_FILE_ENTRY* file = FindStream( aReader, "FileHeader" );
|
||||
|
||||
if( file == nullptr )
|
||||
THROW_IO_ERROR( "FileHeader not found" );
|
||||
THROW_IO_ERROR( wxT( "FileHeader not found" ) );
|
||||
|
||||
ALTIUM_PARSER reader( aReader, file );
|
||||
|
||||
if( reader.GetRemainingBytes() <= 0 )
|
||||
{
|
||||
THROW_IO_ERROR( "FileHeader does not contain any data" );
|
||||
THROW_IO_ERROR( wxT( "FileHeader does not contain any data" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
std::map<wxString, wxString> properties = reader.ReadProperties();
|
||||
|
||||
int recordId = ALTIUM_PARSER::ReadInt( properties, "RECORD", 0 );
|
||||
int recordId = ALTIUM_PARSER::ReadInt( properties, wxT( "RECORD" ), 0 );
|
||||
ALTIUM_SCH_RECORD record = static_cast<ALTIUM_SCH_RECORD>( recordId );
|
||||
|
||||
if( record != ALTIUM_SCH_RECORD::HEADER )
|
||||
THROW_IO_ERROR( "Header expected" );
|
||||
THROW_IO_ERROR( wxT( "Header expected" ) );
|
||||
}
|
||||
|
||||
// Prepare some local variables
|
||||
|
@ -354,14 +354,14 @@ void SCH_ALTIUM_PLUGIN::ParseFileHeader( const CFB::CompoundFileReader& aReader
|
|||
{
|
||||
std::map<wxString, wxString> properties = reader.ReadProperties();
|
||||
|
||||
int recordId = ALTIUM_PARSER::ReadInt( properties, "RECORD", 0 );
|
||||
int recordId = ALTIUM_PARSER::ReadInt( properties, wxT( "RECORD" ), 0 );
|
||||
ALTIUM_SCH_RECORD record = static_cast<ALTIUM_SCH_RECORD>( recordId );
|
||||
|
||||
// see: https://github.com/vadmium/python-altium/blob/master/format.md
|
||||
switch( record )
|
||||
{
|
||||
case ALTIUM_SCH_RECORD::HEADER:
|
||||
THROW_IO_ERROR( "Header already parsed" );
|
||||
THROW_IO_ERROR( wxT( "Header already parsed" ) );
|
||||
case ALTIUM_SCH_RECORD::COMPONENT:
|
||||
ParseComponent( index, properties );
|
||||
break;
|
||||
|
@ -493,10 +493,10 @@ void SCH_ALTIUM_PLUGIN::ParseFileHeader( const CFB::CompoundFileReader& aReader
|
|||
}
|
||||
|
||||
if( reader.HasParsingError() )
|
||||
THROW_IO_ERROR( "stream was not parsed correctly!" );
|
||||
THROW_IO_ERROR( wxT( "stream was not parsed correctly!" ) );
|
||||
|
||||
if( reader.GetRemainingBytes() != 0 )
|
||||
THROW_IO_ERROR( "stream is not fully parsed" );
|
||||
THROW_IO_ERROR( wxT( "stream is not fully parsed" ) );
|
||||
|
||||
// assign LIB_SYMBOL -> COMPONENT
|
||||
for( std::pair<const int, SCH_SYMBOL*>& symbol : m_symbols )
|
||||
|
@ -504,7 +504,7 @@ void SCH_ALTIUM_PLUGIN::ParseFileHeader( const CFB::CompoundFileReader& aReader
|
|||
auto libSymbolIt = m_libSymbols.find( symbol.first );
|
||||
|
||||
if( libSymbolIt == m_libSymbols.end() )
|
||||
THROW_IO_ERROR( "every symbol should have a symbol attached" );
|
||||
THROW_IO_ERROR( wxT( "every symbol should have a symbol attached" ) );
|
||||
|
||||
m_pi->SaveSymbol( getLibFileName().GetFullPath(),
|
||||
new LIB_SYMBOL( *( libSymbolIt->second ) ), m_properties.get() );
|
||||
|
@ -565,9 +565,9 @@ void SCH_ALTIUM_PLUGIN::ParseComponent( int aIndex,
|
|||
const ASCH_SYMBOL& elem = pair.first->second;
|
||||
|
||||
// TODO: this is a hack until we correctly apply all transformations to every element
|
||||
wxString name = wxString::Format( "%d%s_%s",
|
||||
wxString name = wxString::Format( wxT( "%d%s_%s" ),
|
||||
elem.orientation,
|
||||
elem.isMirrored ? "_mirrored" : "",
|
||||
elem.isMirrored ? wxT( "_mirrored" ) : wxT( "" ),
|
||||
elem.libreference );
|
||||
LIB_ID libId = AltiumToKiCadLibID( getLibName(), name );
|
||||
|
||||
|
@ -821,16 +821,16 @@ void SCH_ALTIUM_PLUGIN::ParseLabel( const std::map<wxString, wxString>& aPropert
|
|||
if( elem.ownerpartid == ALTIUM_COMPONENT_NONE )
|
||||
{
|
||||
std::map<wxString, wxString> variableMap = {
|
||||
{ "APPLICATION_BUILDNUMBER", "KICAD_VERSION" },
|
||||
{ "SHEETNUMBER", "#" },
|
||||
{ "SHEETTOTAL", "##" },
|
||||
{ "TITLE", "TITLE" }, // 1:1 maps are sort of useless, but it makes it
|
||||
{ "REVISION", "REVISION" }, // easier to see that the list is complete
|
||||
{ "DATE", "ISSUE_DATE" },
|
||||
{ "CURRENTDATE", "CURRENT_DATE" },
|
||||
{ "COMPANYNAME", "COMPANY" },
|
||||
{ "DOCUMENTNAME", "FILENAME" },
|
||||
{ "PROJECTNAME", "PROJECTNAME" },
|
||||
{ wxT( "APPLICATION_BUILDNUMBER" ), wxT( "KICAD_VERSION" ) },
|
||||
{ wxT( "SHEETNUMBER" ), wxT( "#" ) },
|
||||
{ wxT( "SHEETTOTAL" ), wxT( "##" ) },
|
||||
{ wxT( "TITLE" ), wxT( "TITLE" ) }, // 1:1 maps are sort of useless, but it makes it
|
||||
{ wxT( "REVISION" ), wxT( "REVISION" ) }, // easier to see that the list is complete
|
||||
{ wxT( "DATE" ), wxT( "ISSUE_DATE" ) },
|
||||
{ wxT( "CURRENTDATE" ), wxT( "CURRENT_DATE" ) },
|
||||
{ wxT( "COMPANYNAME" ), wxT( "COMPANY" ) },
|
||||
{ wxT( "DOCUMENTNAME" ), wxT( "FILENAME" ) },
|
||||
{ wxT( "PROJECTNAME" ), wxT( "PROJECTNAME" ) },
|
||||
};
|
||||
|
||||
wxString kicadText = AltiumSpecialStringsToKiCadVariables( elem.text, variableMap );
|
||||
|
@ -1523,7 +1523,7 @@ void SCH_ALTIUM_PLUGIN::ParseSheetSymbol( int aIndex,
|
|||
sheetpath.push_back( sheet );
|
||||
|
||||
sheet->AddInstance( sheetpath );
|
||||
sheet->SetPageNumber( sheetpath, "#" ); // We'll update later if we find a pageNumber
|
||||
sheet->SetPageNumber( sheetpath, wxT( "#" ) ); // We'll update later if we find a pageNumber
|
||||
// record for it
|
||||
|
||||
m_sheets.insert( { aIndex, sheet } );
|
||||
|
@ -1822,12 +1822,12 @@ void SCH_ALTIUM_PLUGIN::ParsePowerPort( const std::map<wxString, wxString>& aPro
|
|||
libSymbol = new LIB_SYMBOL( wxEmptyString );
|
||||
libSymbol->SetPower();
|
||||
libSymbol->SetName( elem.text );
|
||||
libSymbol->GetReferenceField().SetText( "#PWR" );
|
||||
libSymbol->GetReferenceField().SetText( wxT( "#PWR" ) );
|
||||
libSymbol->GetValueField().SetText( elem.text );
|
||||
libSymbol->GetValueField().SetVisible( true );
|
||||
libSymbol->SetDescription( wxString::Format( _( "Power symbol creates a global "
|
||||
"label with name '%s'" ), elem.text ) );
|
||||
libSymbol->SetKeyWords( "power-flag" );
|
||||
libSymbol->SetKeyWords( wxT( "power-flag" ) );
|
||||
libSymbol->SetLibId( libId );
|
||||
|
||||
// generate graphic
|
||||
|
@ -1856,7 +1856,7 @@ void SCH_ALTIUM_PLUGIN::ParsePowerPort( const std::map<wxString, wxString>& aPro
|
|||
|
||||
// each symbol has its own powerSymbolIt for now
|
||||
SCH_SYMBOL* symbol = new SCH_SYMBOL();
|
||||
symbol->SetRef( &sheetpath, "#PWR?" );
|
||||
symbol->SetRef( &sheetpath, wxT( "#PWR?" ) );
|
||||
symbol->SetValue( elem.text );
|
||||
symbol->SetLibId( libId );
|
||||
symbol->SetLibSymbol( new LIB_SYMBOL( *libSymbol ) );
|
||||
|
@ -2138,7 +2138,7 @@ void SCH_ALTIUM_PLUGIN::ParseImage( const std::map<wxString, wxString>& aPropert
|
|||
return;
|
||||
}
|
||||
|
||||
wxString storagePath = wxFileName::CreateTempFileName( "kicad_import_" );
|
||||
wxString storagePath = wxFileName::CreateTempFileName( wxT( "kicad_import_" ) );
|
||||
|
||||
// As wxZlibInputStream is not seekable, we need to write a temporary file
|
||||
wxMemoryInputStream fileStream( storageFile->data.data(), storageFile->data.size() );
|
||||
|
@ -2197,24 +2197,24 @@ void SCH_ALTIUM_PLUGIN::ParseSheet( const std::map<wxString, wxString>& aPropert
|
|||
switch( m_altiumSheet->sheetSize )
|
||||
{
|
||||
default:
|
||||
case ASCH_SHEET_SIZE::A4: pageInfo.SetType( "A4", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::A3: pageInfo.SetType( "A3", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::A2: pageInfo.SetType( "A2", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::A1: pageInfo.SetType( "A1", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::A0: pageInfo.SetType( "A0", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::A: pageInfo.SetType( "A", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::B: pageInfo.SetType( "B", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::C: pageInfo.SetType( "C", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::D: pageInfo.SetType( "D", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::E: pageInfo.SetType( "E", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::LETTER: pageInfo.SetType( "USLetter", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::LEGAL: pageInfo.SetType( "USLegal", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::TABLOID: pageInfo.SetType( "A3", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::ORCAD_A: pageInfo.SetType( "A", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::ORCAD_B: pageInfo.SetType( "B", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::ORCAD_C: pageInfo.SetType( "C", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::ORCAD_D: pageInfo.SetType( "D", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::ORCAD_E: pageInfo.SetType( "E", isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::A4: pageInfo.SetType( wxT( "A4" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::A3: pageInfo.SetType( wxT( "A3" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::A2: pageInfo.SetType( wxT( "A2" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::A1: pageInfo.SetType( wxT( "A1" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::A0: pageInfo.SetType( wxT( "A0" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::A: pageInfo.SetType( wxT( "A" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::B: pageInfo.SetType( wxT( "B" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::C: pageInfo.SetType( wxT( "C" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::D: pageInfo.SetType( wxT( "D" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::E: pageInfo.SetType( wxT( "E" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::LETTER: pageInfo.SetType( wxT( "USLetter" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::LEGAL: pageInfo.SetType( wxT( "USLegal" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::TABLOID: pageInfo.SetType( wxT( "A3" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::ORCAD_A: pageInfo.SetType( wxT( "A" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::ORCAD_B: pageInfo.SetType( wxT( "B" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::ORCAD_C: pageInfo.SetType( wxT( "C" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::ORCAD_D: pageInfo.SetType( wxT( "D" ), isPortrait ); break;
|
||||
case ASCH_SHEET_SIZE::ORCAD_E: pageInfo.SetType( wxT( "E" ), isPortrait ); break;
|
||||
}
|
||||
|
||||
m_currentSheet->GetScreen()->SetPageSettings( pageInfo );
|
||||
|
@ -2266,7 +2266,7 @@ void SCH_ALTIUM_PLUGIN::ParseFileName( const std::map<wxString, wxString>& aProp
|
|||
|
||||
// If last symbols are ".sChDoC", change them to ".kicad_sch"
|
||||
if( ( elem.text.Right( GetFileExtension().length() + 1 ).Lower() )
|
||||
== ( "." + GetFileExtension().Lower() ) )
|
||||
== ( wxT( "." ) + GetFileExtension().Lower() ) )
|
||||
{
|
||||
elem.text.RemoveLast( GetFileExtension().length() );
|
||||
elem.text += KiCadSchematicFileExtension;
|
||||
|
@ -2328,38 +2328,38 @@ void SCH_ALTIUM_PLUGIN::ParseParameter( const std::map<wxString, wxString>& aPro
|
|||
|
||||
// TODO: fill in replacements from variant, sheet and project
|
||||
std::map<wxString, wxString> variableMap = {
|
||||
{ "COMMENT", "VALUE" },
|
||||
{ "VALUE", "ALTIUM_VALUE" },
|
||||
{ wxT( "COMMENT" ), wxT( "VALUE" ) },
|
||||
{ wxT( "VALUE" ), wxT( "ALTIUM_VALUE" ) },
|
||||
};
|
||||
|
||||
if( elem.ownerindex <= 0 && elem.ownerpartid == ALTIUM_COMPONENT_NONE )
|
||||
{
|
||||
// This is some sheet parameter
|
||||
if( elem.text == "*" )
|
||||
if( elem.text == wxT( "*" ) )
|
||||
return; // indicates parameter not set?
|
||||
|
||||
wxString paramName = elem.name.Upper();
|
||||
|
||||
if( paramName == "SHEETNUMBER" )
|
||||
if( paramName == wxT( "SHEETNUMBER" ) )
|
||||
{
|
||||
SCH_SHEET_PATH sheetpath;
|
||||
m_rootSheet->LocatePathOfScreen( m_currentSheet->GetScreen(), &sheetpath );
|
||||
|
||||
m_rootSheet->SetPageNumber( sheetpath, elem.text );
|
||||
}
|
||||
else if( paramName == "TITLE" )
|
||||
else if( paramName == wxT( "TITLE" ) )
|
||||
{
|
||||
m_currentTitleBlock->SetTitle( elem.text );
|
||||
}
|
||||
else if( paramName == "REVISION" )
|
||||
else if( paramName == wxT( "REVISION" ) )
|
||||
{
|
||||
m_currentTitleBlock->SetRevision( elem.text );
|
||||
}
|
||||
else if( paramName == "DATE" )
|
||||
else if( paramName == wxT( "DATE" ) )
|
||||
{
|
||||
m_currentTitleBlock->SetDate( elem.text );
|
||||
}
|
||||
else if( paramName == "COMPANYNAME" )
|
||||
else if( paramName == wxT( "COMPANYNAME" ) )
|
||||
{
|
||||
m_currentTitleBlock->SetCompany( elem.text );
|
||||
}
|
||||
|
@ -2381,15 +2381,15 @@ void SCH_ALTIUM_PLUGIN::ParseParameter( const std::map<wxString, wxString>& aPro
|
|||
SCH_SYMBOL* symbol = m_symbols.at( libSymbolIt->first );
|
||||
SCH_FIELD* field = nullptr;
|
||||
|
||||
if( elem.name.Upper() == "COMMENT" )
|
||||
if( elem.name.Upper() == wxT( "COMMENT" ) )
|
||||
field = symbol->GetField( VALUE_FIELD );
|
||||
else
|
||||
{
|
||||
int fieldIdx = symbol->GetFieldCount();
|
||||
wxString fieldName = elem.name.Upper();
|
||||
|
||||
if( fieldName == "VALUE" )
|
||||
fieldName = "ALTIUM_VALUE";
|
||||
if( fieldName == wxT( "VALUE" ) )
|
||||
fieldName = wxT( "ALTIUM_VALUE" );
|
||||
|
||||
field = symbol->AddField( SCH_FIELD( wxPoint(), fieldIdx, symbol, fieldName ) );
|
||||
}
|
||||
|
@ -2417,7 +2417,7 @@ void SCH_ALTIUM_PLUGIN::ParseImplementation( const std::map<wxString, wxString>&
|
|||
ASCH_IMPLEMENTATION elem( aProperties );
|
||||
|
||||
// Only get footprint, currently assigned only
|
||||
if( ( elem.type == "PCBLIB" ) && ( elem.isCurrent ) )
|
||||
if( ( elem.type == wxT( "PCBLIB" ) ) && ( elem.isCurrent ) )
|
||||
{
|
||||
const auto& implementationOwnerIt = m_altiumImplementationList.find( elem.ownerindex );
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include <wildcards_and_files_ext.h>
|
||||
|
||||
|
||||
const wxString PartNameFieldName = "Part Name";
|
||||
const wxString PartNameFieldName = wxT( "Part Name" );
|
||||
|
||||
|
||||
void CADSTAR_SCH_ARCHIVE_LOADER::Load( SCHEMATIC* aSchematic, SCH_SHEET* aRootSheet,
|
||||
|
@ -128,7 +128,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::Load( SCHEMATIC* aSchematic, SCH_SHEET* aRootSh
|
|||
m_reporter->Report( wxString::Format( _( "The CADSTAR design contains variants which has "
|
||||
"no KiCad equivalent. Only the master variant "
|
||||
"('%s') was loaded." ),
|
||||
Schematic.VariantHierarchy.Variants.at( "V0" ).Name ),
|
||||
Schematic.VariantHierarchy.Variants.at( wxT( "V0" ) ).Name ),
|
||||
RPT_SEVERITY_WARNING );
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::Load( SCHEMATIC* aSchematic, SCH_SHEET* aRootSh
|
|||
SCH_TEXT* txtItem = static_cast<SCH_TEXT*>( item );
|
||||
wxString txt = txtItem->GetText();
|
||||
|
||||
if( txt.Contains( "${" ) )
|
||||
if( txt.Contains( wxT( "${" ) ) )
|
||||
continue; // We can't calculate bounding box of text items with variables
|
||||
else
|
||||
bbox = txtItem->GetBoundingBox();
|
||||
|
@ -296,7 +296,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSheets()
|
|||
wxFileName loadedFilePath = wxFileName( Filename );
|
||||
|
||||
std::string filename = wxString::Format(
|
||||
"%s_%02d", loadedFilePath.GetName(), getSheetNumber( rootSheetID ) )
|
||||
wxT( "%s_%02d" ), loadedFilePath.GetName(), getSheetNumber( rootSheetID ) )
|
||||
.ToStdString();
|
||||
ReplaceIllegalFileNameChars( &filename );
|
||||
filename += wxT( "." ) + KiCadSchematicFileExtension;
|
||||
|
@ -335,7 +335,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadHierarchicalSheetPins()
|
|||
for( std::pair<TERMINAL_ID, TERMINAL> termPair : block.Terminals )
|
||||
{
|
||||
TERMINAL term = termPair.second;
|
||||
wxString name = "YOU SHOULDN'T SEE THIS TEXT. THIS IS A BUG.";
|
||||
wxString name = wxT( "YOU SHOULDN'T SEE THIS TEXT. THIS IS A BUG." );
|
||||
|
||||
SCH_HIERLABEL* sheetPin = nullptr;
|
||||
|
||||
|
@ -596,7 +596,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances()
|
|||
|
||||
kiPart = new LIB_SYMBOL( libPartName );
|
||||
kiPart->SetPower();
|
||||
loadSymDefIntoLibrary( symID, nullptr, "A", kiPart );
|
||||
loadSymDefIntoLibrary( symID, nullptr, wxT( "A" ), kiPart );
|
||||
|
||||
kiPart->GetValueField().SetText( symbolInstanceNetName );
|
||||
|
||||
|
@ -616,7 +616,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances()
|
|||
kiPart->GetValueField().SetVisible( false );
|
||||
}
|
||||
|
||||
kiPart->GetReferenceField().SetText( "#PWR" );
|
||||
kiPart->GetReferenceField().SetText( wxT( "#PWR" ) );
|
||||
kiPart->GetReferenceField().SetVisible( false );
|
||||
( *m_plugin )->SaveSymbol( m_libraryFileName.GetFullPath(), kiPart );
|
||||
m_powerSymLibMap.insert( { libPartName, kiPart } );
|
||||
|
@ -650,7 +650,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances()
|
|||
|
||||
SCH_GLOBALLABEL* netLabel = new SCH_GLOBALLABEL;
|
||||
netLabel->SetPosition( getKiCadPoint( sym.Origin + terminalPosOffset ) );
|
||||
netLabel->SetText( "***UNKNOWN NET****" ); // This should be later updated when we load the netlist
|
||||
netLabel->SetText( wxT( "***UNKNOWN NET****" ) ); // This should be later updated when we load the netlist
|
||||
netLabel->SetTextSize( wxSize( Mils2iu( 50 ), Mils2iu( 50 ) ) );
|
||||
|
||||
SYMDEF_SCM symbolDef = Library.SymbolDefinitions.at( sym.SymdefID );
|
||||
|
@ -664,11 +664,11 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances()
|
|||
|
||||
netLabel->SetLabelSpinStyle( getSpinStyle( sym.OrientAngle, sym.Mirror ) );
|
||||
|
||||
if( libSymDef.Alternate.Lower().Contains( "in" ) )
|
||||
if( libSymDef.Alternate.Lower().Contains( wxT( "in" ) ) )
|
||||
netLabel->SetShape( PINSHEETLABEL_SHAPE::PS_INPUT );
|
||||
else if( libSymDef.Alternate.Lower().Contains( "bi" ) )
|
||||
else if( libSymDef.Alternate.Lower().Contains( wxT( "bi" ) ) )
|
||||
netLabel->SetShape( PINSHEETLABEL_SHAPE::PS_BIDI );
|
||||
else if( libSymDef.Alternate.Lower().Contains( "out" ) )
|
||||
else if( libSymDef.Alternate.Lower().Contains( wxT( "out" ) ) )
|
||||
netLabel->SetShape( PINSHEETLABEL_SHAPE::PS_OUTPUT );
|
||||
else
|
||||
netLabel->SetShape( PINSHEETLABEL_SHAPE::PS_UNSPECIFIED );
|
||||
|
@ -683,7 +683,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances()
|
|||
}
|
||||
else
|
||||
{
|
||||
wxASSERT_MSG( false, "Unknown Symbol Variant." );
|
||||
wxASSERT_MSG( false, wxT( "Unknown Symbol Variant." ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -700,7 +700,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbolInstances()
|
|||
wxString symbolName = sym.ComponentRef.Designator;
|
||||
|
||||
if( symbolName.empty() )
|
||||
symbolName = wxString::Format( "ID: %s", sym.ID );
|
||||
symbolName = wxString::Format( wxT( "ID: %s" ), sym.ID );
|
||||
else
|
||||
symbolName += sym.GateID;
|
||||
|
||||
|
@ -810,7 +810,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadNets()
|
|||
std::map<NETELEMENT_ID, SCH_LABEL*> netlabels;
|
||||
|
||||
if( netName.IsEmpty() )
|
||||
netName = wxString::Format( "$%ld", net.SignalNum );
|
||||
netName = wxString::Format( wxT( "$%ld" ), net.SignalNum );
|
||||
|
||||
netName = HandleTextOverbar( netName );
|
||||
|
||||
|
@ -876,7 +876,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadNets()
|
|||
auto getHierarchicalLabel =
|
||||
[&]( NETELEMENT_ID aNode ) -> SCH_HIERLABEL*
|
||||
{
|
||||
if( aNode.Contains( "BLKT" ) )
|
||||
if( aNode.Contains( wxT( "BLKT" ) ) )
|
||||
{
|
||||
NET_SCH::BLOCK_TERM blockTerm = net.BlockTerminals.at( aNode );
|
||||
BLOCK_PIN_ID blockPinID = std::make_pair( blockTerm.BlockID,
|
||||
|
@ -1053,7 +1053,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadNets()
|
|||
// the first intersection point.
|
||||
VECTOR2I intsctPt = wireToSheetIntersects.at( 0 ).p;
|
||||
int intsctIndx = wireChain.FindSegment( intsctPt );
|
||||
wxASSERT_MSG( intsctIndx != -1, "Can't find intersecting segment" );
|
||||
wxASSERT_MSG( intsctIndx != -1, wxT( "Can't find intersecting segment" ) );
|
||||
|
||||
if( node == conn.StartNode )
|
||||
wireChain.Replace( 0, intsctIndx, intsctPt );
|
||||
|
@ -1328,7 +1328,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary( const SYMDEF_ID& aSymdef
|
|||
for( std::pair<TERMINAL_ID, TERMINAL> termPair : symbol.Terminals )
|
||||
{
|
||||
TERMINAL term = termPair.second;
|
||||
wxString pinNum = wxString::Format( "%ld", term.ID );
|
||||
wxString pinNum = wxString::Format( wxT( "%ld" ), term.ID );
|
||||
wxString pinName = wxEmptyString;
|
||||
LIB_PIN* pin = new LIB_PIN( aSymbol );
|
||||
|
||||
|
@ -1344,9 +1344,9 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary( const SYMDEF_ID& aSymdef
|
|||
if( !csPin.Identifier.IsEmpty() )
|
||||
pinNum = csPin.Identifier;
|
||||
else if( csPin.ID == UNDEFINED_VALUE )
|
||||
pinNum = wxString::Format( "%ld", term.ID );
|
||||
pinNum = wxString::Format( wxT( "%ld" ), term.ID );
|
||||
else
|
||||
pinNum = wxString::Format( "%ld", csPin.ID );
|
||||
pinNum = wxString::Format( wxT( "%ld" ), csPin.ID );
|
||||
}
|
||||
|
||||
pin->SetType( getKiCadPinType( csPin.Type ) );
|
||||
|
@ -1417,7 +1417,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSymDefIntoLibrary( const SYMDEF_ID& aSymdef
|
|||
csText.Mirror );
|
||||
|
||||
// Split out multi line text items into individual text elements
|
||||
if( csText.Text.Contains( "\n" ) )
|
||||
if( csText.Text.Contains( wxT( "\n" ) ) )
|
||||
{
|
||||
wxArrayString strings;
|
||||
wxStringSplit( csText.Text, strings, '\n' );
|
||||
|
@ -1625,7 +1625,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadLibrarySymbolShapeVertices( const std::vect
|
|||
const VERTEX* prev = &aCadstarVertices.at( 0 );
|
||||
const VERTEX* cur;
|
||||
|
||||
wxASSERT_MSG( prev->Type == VERTEX_TYPE::POINT, "First vertex should always be a point." );
|
||||
wxASSERT_MSG( prev->Type == VERTEX_TYPE::POINT, wxT( "First vertex should always be a point." ) );
|
||||
|
||||
for( size_t i = 1; i < aCadstarVertices.size(); i++ )
|
||||
{
|
||||
|
@ -1794,7 +1794,7 @@ SCH_SYMBOL* CADSTAR_SCH_ARCHIVE_LOADER::loadSchematicSymbol( const SYMBOL& aCads
|
|||
SYMBOL::PIN_NUM pin = pinPair.second;
|
||||
|
||||
replacePinNumber( termNumMap.at( pin.TerminalID ),
|
||||
wxString::Format( "%ld", pin.PinNum ) );
|
||||
wxString::Format( wxT( "%ld" ), pin.PinNum ) );
|
||||
}
|
||||
|
||||
//Newer versions of Cadstar use pin names
|
||||
|
@ -1897,14 +1897,14 @@ CADSTAR_SCH_ARCHIVE_LOADER::POINT CADSTAR_SCH_ARCHIVE_LOADER::getLocationOfNetEl
|
|||
};
|
||||
// clang-format on
|
||||
|
||||
if( aNetElementID.Contains( "J" ) ) // Junction
|
||||
if( aNetElementID.Contains( wxT( "J" ) ) ) // Junction
|
||||
{
|
||||
if( aNet.Junctions.find( aNetElementID ) == aNet.Junctions.end() )
|
||||
return logUnknownNetElementError();
|
||||
|
||||
return aNet.Junctions.at( aNetElementID ).Location;
|
||||
}
|
||||
else if( aNetElementID.Contains( "P" ) ) // Terminal/Pin of a symbol
|
||||
else if( aNetElementID.Contains( wxT( "P" ) ) ) // Terminal/Pin of a symbol
|
||||
{
|
||||
if( aNet.Terminals.find( aNetElementID ) == aNet.Terminals.end() )
|
||||
return logUnknownNetElementError();
|
||||
|
@ -1948,14 +1948,14 @@ CADSTAR_SCH_ARCHIVE_LOADER::POINT CADSTAR_SCH_ARCHIVE_LOADER::getLocationOfNetEl
|
|||
|
||||
return retval;
|
||||
}
|
||||
else if( aNetElementID.Contains( "BT" ) ) // Bus Terminal
|
||||
else if( aNetElementID.Contains( wxT( "BT" ) ) ) // Bus Terminal
|
||||
{
|
||||
if( aNet.BusTerminals.find( aNetElementID ) == aNet.BusTerminals.end() )
|
||||
return logUnknownNetElementError();
|
||||
|
||||
return aNet.BusTerminals.at( aNetElementID ).SecondPoint;
|
||||
}
|
||||
else if( aNetElementID.Contains( "BLKT" ) ) // Block Terminal (sheet hierarchy connection)
|
||||
else if( aNetElementID.Contains( wxT( "BLKT" ) ) ) // Block Terminal (sheet hierarchy connection)
|
||||
{
|
||||
if( aNet.BlockTerminals.find( aNetElementID ) == aNet.BlockTerminals.end() )
|
||||
return logUnknownNetElementError();
|
||||
|
@ -1968,7 +1968,7 @@ CADSTAR_SCH_ARCHIVE_LOADER::POINT CADSTAR_SCH_ARCHIVE_LOADER::getLocationOfNetEl
|
|||
|
||||
return Schematic.Blocks.at( blockid ).Terminals.at( termid ).Position;
|
||||
}
|
||||
else if( aNetElementID.Contains( "D" ) ) // Dangler
|
||||
else if( aNetElementID.Contains( wxT( "D" ) ) ) // Dangler
|
||||
{
|
||||
if( aNet.Danglers.find( aNetElementID ) == aNet.Danglers.end() )
|
||||
return logUnknownNetElementError();
|
||||
|
@ -1989,7 +1989,7 @@ wxString CADSTAR_SCH_ARCHIVE_LOADER::getNetName( const NET_SCH& aNet )
|
|||
wxString netname = aNet.Name;
|
||||
|
||||
if( netname.IsEmpty() )
|
||||
netname = wxString::Format( "$%ld", aNet.SignalNum );
|
||||
netname = wxString::Format( wxT( "$%ld" ), aNet.SignalNum );
|
||||
|
||||
return netname;
|
||||
}
|
||||
|
@ -2029,7 +2029,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadShapeVertices( const std::vector<VERTEX>& a
|
|||
const VERTEX* cur;
|
||||
|
||||
wxASSERT_MSG(
|
||||
prev->Type == VERTEX_TYPE::POINT, "First vertex should always be a point vertex" );
|
||||
prev->Type == VERTEX_TYPE::POINT, wxT( "First vertex should always be a point vertex" ) );
|
||||
|
||||
for( size_t ii = 1; ii < aCadstarVertices.size(); ii++ )
|
||||
{
|
||||
|
@ -2088,7 +2088,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadShapeVertices( const std::vector<VERTEX>& a
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Unknown CADSTAR Vertex type" );
|
||||
wxFAIL_MSG( wxT( "Unknown CADSTAR Vertex type" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -2120,7 +2120,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSheetAndChildSheets(
|
|||
const SCH_SHEET_PATH& aParentSheet )
|
||||
{
|
||||
wxCHECK_MSG( m_sheetMap.find( aCadstarSheetID ) == m_sheetMap.end(), ,
|
||||
"Sheet already loaded!" );
|
||||
wxT( "Sheet already loaded!" ) );
|
||||
|
||||
SCH_SHEET* sheet = new SCH_SHEET( aParentSheet.Last(), aPosition );
|
||||
SCH_SCREEN* screen = new SCH_SCREEN( m_schematic );
|
||||
|
@ -2138,7 +2138,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSheetAndChildSheets(
|
|||
|
||||
int sheetNum = getSheetNumber( aCadstarSheetID );
|
||||
wxString loadedFilename = wxFileName( Filename ).GetName();
|
||||
std::string filename = wxString::Format( "%s_%02d", loadedFilename, sheetNum ).ToStdString();
|
||||
std::string filename = wxString::Format( wxT( "%s_%02d" ), loadedFilename, sheetNum ).ToStdString();
|
||||
|
||||
ReplaceIllegalFileNameChars( &filename );
|
||||
filename += wxT( "." ) + KiCadSchematicFileExtension;
|
||||
|
@ -2151,7 +2151,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSheetAndChildSheets(
|
|||
instance.push_back( sheet );
|
||||
sheet->AddInstance( instance );
|
||||
|
||||
wxString pageNumStr = wxString::Format( "%d", getSheetNumber( aCadstarSheetID ) );
|
||||
wxString pageNumStr = wxString::Format( wxT( "%d" ), getSheetNumber( aCadstarSheetID ) );
|
||||
sheet->SetPageNumber( instance, pageNumStr );
|
||||
|
||||
sheet->AutoplaceFields( /* aScreen */ nullptr, /* aManual */ false );
|
||||
|
@ -2166,7 +2166,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadChildSheets( LAYER_ID aCadstarSheetID,
|
|||
const SCH_SHEET_PATH& aSheet )
|
||||
{
|
||||
wxCHECK_MSG( m_sheetMap.find( aCadstarSheetID ) != m_sheetMap.end(), ,
|
||||
"FIXME! Parent sheet should be loaded before attempting to load subsheets" );
|
||||
wxT( "FIXME! Parent sheet should be loaded before attempting to load subsheets" ) );
|
||||
|
||||
for( std::pair<BLOCK_ID, BLOCK> blockPair : Schematic.Blocks )
|
||||
{
|
||||
|
@ -2227,7 +2227,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadChildSheets( LAYER_ID aCadstarSheetID,
|
|||
/*
|
||||
// Add the block label as a separate field
|
||||
SCH_FIELD blockNameField( getKiCadPoint( block.BlockLabel.Position ), 2,
|
||||
loadedSheet, wxString( "Block name" ) );
|
||||
loadedSheet, wxString( wxT( "Block name" ) ) );
|
||||
blockNameField.SetText( block.Name );
|
||||
blockNameField.SetVisible( true );
|
||||
|
||||
|
@ -2306,9 +2306,9 @@ int CADSTAR_SCH_ARCHIVE_LOADER::getSheetNumber( LAYER_ID aCadstarSheetID )
|
|||
|
||||
void CADSTAR_SCH_ARCHIVE_LOADER::loadItemOntoKiCadSheet( LAYER_ID aCadstarSheetID, SCH_ITEM* aItem )
|
||||
{
|
||||
wxCHECK_MSG( aItem, /*void*/, "aItem is null" );
|
||||
wxCHECK_MSG( aItem, /*void*/, wxT( "aItem is null" ) );
|
||||
|
||||
if( aCadstarSheetID == "ALL_SHEETS" )
|
||||
if( aCadstarSheetID == wxT( "ALL_SHEETS" ) )
|
||||
{
|
||||
SCH_ITEM* duplicateItem;
|
||||
|
||||
|
@ -2323,10 +2323,10 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadItemOntoKiCadSheet( LAYER_ID aCadstarSheetI
|
|||
delete aItem;
|
||||
aItem = duplicateItem;
|
||||
}
|
||||
else if( aCadstarSheetID == "NO_SHEET" )
|
||||
else if( aCadstarSheetID == wxT( "NO_SHEET" ) )
|
||||
{
|
||||
wxASSERT_MSG(
|
||||
false, "Trying to add an item to NO_SHEET? This might be a documentation symbol." );
|
||||
false, wxT( "Trying to add an item to NO_SHEET? This might be a documentation symbol." ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2337,7 +2337,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadItemOntoKiCadSheet( LAYER_ID aCadstarSheetI
|
|||
else
|
||||
{
|
||||
delete aItem;
|
||||
wxASSERT_MSG( false, "Unknown Sheet ID." );
|
||||
wxASSERT_MSG( false, wxT( "Unknown Sheet ID." ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2558,7 +2558,7 @@ CADSTAR_SCH_ARCHIVE_LOADER::mirrorX( const ALIGNMENT& aCadstarAlignment )
|
|||
case ALIGNMENT::TOPCENTER: return aCadstarAlignment;
|
||||
|
||||
// Shouldn't be here
|
||||
default: wxFAIL_MSG( "Unknown Cadstar Alignment" ); return aCadstarAlignment;
|
||||
default: wxFAIL_MSG( wxT( "Unknown Cadstar Alignment" ) ); return aCadstarAlignment;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2580,7 +2580,7 @@ CADSTAR_SCH_ARCHIVE_LOADER::rotate180( const ALIGNMENT& aCadstarAlignment )
|
|||
case ALIGNMENT::CENTERRIGHT: return ALIGNMENT::CENTERLEFT;
|
||||
|
||||
// Shouldn't be here
|
||||
default: wxFAIL_MSG( "Unknown Cadstar Alignment" ); return aCadstarAlignment;
|
||||
default: wxFAIL_MSG( wxT( "Unknown Cadstar Alignment" ) ); return aCadstarAlignment;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2713,7 +2713,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings( EDA_TEXT* aKiCadT
|
|||
angleDeciDeg = 900;
|
||||
textAlignment = rotate180( textAlignment );
|
||||
break;
|
||||
default: wxFAIL_MSG( "Unknown Quadrant" );
|
||||
default: wxFAIL_MSG( wxT( "Unknown Quadrant" ) );
|
||||
}
|
||||
|
||||
aKiCadTextItem->SetTextAngle( angleDeciDeg );
|
||||
|
@ -2754,7 +2754,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::applyTextSettings( EDA_TEXT* aKiCadT
|
|||
return;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Unexpected item type" );
|
||||
wxFAIL_MSG( wxT( "Unexpected item type" ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -352,7 +352,7 @@ void CADSTAR_SCH_ARCHIVE_PARSER::TERMINAL::Parse( XNODE* aNode, PARSER_CONTEXT*
|
|||
TerminalCodeID = GetXmlAttributeIDString( aNode, 1 );
|
||||
|
||||
XNODE* cNode = aNode->GetChildren();
|
||||
wxString location = wxString::Format( "TERMINAL %ld", ID );
|
||||
wxString location = wxString::Format( wxT( "TERMINAL %ld" ), ID );
|
||||
|
||||
if( !cNode )
|
||||
THROW_MISSING_NODE_IO_ERROR( wxT( "PT" ), location );
|
||||
|
|
|
@ -68,7 +68,7 @@ SCH_SHEET* CADSTAR_SCH_ARCHIVE_PLUGIN::Load( const wxString& aFileName, SCHEMATI
|
|||
|
||||
if( aAppendToMe )
|
||||
{
|
||||
wxCHECK_MSG( aSchematic->IsValid(), nullptr, "Can't append to a schematic with no root!" );
|
||||
wxCHECK_MSG( aSchematic->IsValid(), nullptr, wxT( "Can't append to a schematic with no root!" ) );
|
||||
rootSheet = &aSchematic->Root();
|
||||
}
|
||||
else
|
||||
|
@ -88,7 +88,7 @@ SCH_SHEET* CADSTAR_SCH_ARCHIVE_PLUGIN::Load( const wxString& aFileName, SCHEMATI
|
|||
|
||||
SYMBOL_LIB_TABLE* libTable = aSchematic->Prj().SchSymbolLibTable();
|
||||
|
||||
wxCHECK_MSG( libTable, NULL, "Could not load symbol lib table." );
|
||||
wxCHECK_MSG( libTable, NULL, wxT( "Could not load symbol lib table." ) );
|
||||
|
||||
// Lets come up with a nice library name
|
||||
wxString libName = aSchematic->Prj().GetProjectName();
|
||||
|
@ -100,7 +100,7 @@ SCH_SHEET* CADSTAR_SCH_ARCHIVE_PLUGIN::Load( const wxString& aFileName, SCHEMATI
|
|||
}
|
||||
|
||||
if( libName.IsEmpty() )
|
||||
libName = "noname";
|
||||
libName = wxT( "noname" );
|
||||
|
||||
libName = LIB_ID::FixIllegalChars( libName, true );
|
||||
|
||||
|
@ -114,11 +114,11 @@ SCH_SHEET* CADSTAR_SCH_ARCHIVE_PLUGIN::Load( const wxString& aFileName, SCHEMATI
|
|||
{
|
||||
// Create a new empty symbol library.
|
||||
sch_plugin->CreateSymbolLib( libFileName.GetFullPath() );
|
||||
wxString libTableUri = "${KIPRJMOD}/" + libFileName.GetFullName();
|
||||
wxString libTableUri = wxT( "${KIPRJMOD}/" ) + libFileName.GetFullName();
|
||||
|
||||
// Add the new library to the project symbol library table.
|
||||
libTable->InsertRow(
|
||||
new SYMBOL_LIB_TABLE_ROW( libName, libTableUri, wxString( "KiCad" ) ) );
|
||||
new SYMBOL_LIB_TABLE_ROW( libName, libTableUri, wxString( wxT( "KiCad" ) ) ) );
|
||||
|
||||
// Save project symbol library table.
|
||||
wxFileName fn(
|
||||
|
|
|
@ -70,15 +70,15 @@ using namespace std;
|
|||
* Map of EAGLE pin type values to KiCad pin type values
|
||||
*/
|
||||
static const std::map<wxString, ELECTRICAL_PINTYPE> pinDirectionsMap = {
|
||||
{ "sup", ELECTRICAL_PINTYPE::PT_POWER_IN },
|
||||
{ "pas", ELECTRICAL_PINTYPE::PT_PASSIVE },
|
||||
{ "out", ELECTRICAL_PINTYPE::PT_OUTPUT },
|
||||
{ "in", ELECTRICAL_PINTYPE::PT_INPUT },
|
||||
{ "nc", ELECTRICAL_PINTYPE::PT_NC },
|
||||
{ "io", ELECTRICAL_PINTYPE::PT_BIDI },
|
||||
{ "oc", ELECTRICAL_PINTYPE::PT_OPENCOLLECTOR },
|
||||
{ "hiz", ELECTRICAL_PINTYPE::PT_TRISTATE },
|
||||
{ "pwr", ELECTRICAL_PINTYPE::PT_POWER_IN },
|
||||
{ wxT( "sup" ), ELECTRICAL_PINTYPE::PT_POWER_IN },
|
||||
{ wxT( "pas" ), ELECTRICAL_PINTYPE::PT_PASSIVE },
|
||||
{ wxT( "out" ), ELECTRICAL_PINTYPE::PT_OUTPUT },
|
||||
{ wxT( "in" ), ELECTRICAL_PINTYPE::PT_INPUT },
|
||||
{ wxT( "nc" ), ELECTRICAL_PINTYPE::PT_NC },
|
||||
{ wxT( "io" ), ELECTRICAL_PINTYPE::PT_BIDI },
|
||||
{ wxT( "oc" ), ELECTRICAL_PINTYPE::PT_OPENCOLLECTOR },
|
||||
{ wxT( "hiz" ), ELECTRICAL_PINTYPE::PT_TRISTATE },
|
||||
{ wxT( "pwr" ), ELECTRICAL_PINTYPE::PT_POWER_IN },
|
||||
};
|
||||
|
||||
|
||||
|
@ -143,9 +143,9 @@ wxString SCH_EAGLE_PLUGIN::getLibName()
|
|||
}
|
||||
|
||||
if( m_libName.IsEmpty() )
|
||||
m_libName = "noname";
|
||||
m_libName = wxT( "noname" );
|
||||
|
||||
m_libName += "-eagle-import";
|
||||
m_libName += wxT( "-eagle-import" );
|
||||
m_libName = LIB_ID::FixIllegalChars( m_libName, true );
|
||||
}
|
||||
|
||||
|
@ -196,15 +196,15 @@ void SCH_EAGLE_PLUGIN::loadLayerDefs( wxXmlNode* aLayers )
|
|||
* </layers>
|
||||
*/
|
||||
|
||||
if( elayer.name == "Nets" )
|
||||
if( elayer.name == wxT( "Nets" ) )
|
||||
{
|
||||
m_layerMap[elayer.number] = LAYER_WIRE;
|
||||
}
|
||||
else if( elayer.name == "Info" || elayer.name == "Guide" )
|
||||
else if( elayer.name == wxT( "Info" ) || elayer.name == wxT( "Guide" ) )
|
||||
{
|
||||
m_layerMap[elayer.number] = LAYER_NOTES;
|
||||
}
|
||||
else if( elayer.name == "Busses" )
|
||||
else if( elayer.name == wxT( "Busses" ) )
|
||||
{
|
||||
m_layerMap[elayer.number] = LAYER_BUS;
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ static SYMBOL_ORIENTATION_T kiCadComponentRotation( float eagleDegrees )
|
|||
switch( roti )
|
||||
{
|
||||
default:
|
||||
wxASSERT_MSG( false, wxString::Format( "Unhandled orientation (%d degrees)", roti ) );
|
||||
wxASSERT_MSG( false, wxString::Format( wxT( "Unhandled orientation (%d degrees)" ), roti ) );
|
||||
KI_FALLTHROUGH;
|
||||
|
||||
case 0:
|
||||
|
@ -371,19 +371,19 @@ SCH_EAGLE_PLUGIN::~SCH_EAGLE_PLUGIN()
|
|||
|
||||
const wxString SCH_EAGLE_PLUGIN::GetName() const
|
||||
{
|
||||
return "EAGLE";
|
||||
return wxT( "EAGLE" );
|
||||
}
|
||||
|
||||
|
||||
const wxString SCH_EAGLE_PLUGIN::GetFileExtension() const
|
||||
{
|
||||
return "sch";
|
||||
return wxT( "sch" );
|
||||
}
|
||||
|
||||
|
||||
const wxString SCH_EAGLE_PLUGIN::GetLibraryFileExtension() const
|
||||
{
|
||||
return "lbr";
|
||||
return wxT( "lbr" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -448,7 +448,7 @@ SCH_SHEET* SCH_EAGLE_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchema
|
|||
|
||||
if( aAppendToMe )
|
||||
{
|
||||
wxCHECK_MSG( aSchematic->IsValid(), nullptr, "Can't append to a schematic with no root!" );
|
||||
wxCHECK_MSG( aSchematic->IsValid(), nullptr, wxT( "Can't append to a schematic with no root!" ) );
|
||||
m_rootSheet = &aSchematic->Root();
|
||||
}
|
||||
else
|
||||
|
@ -467,7 +467,7 @@ SCH_SHEET* SCH_EAGLE_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchema
|
|||
|
||||
SYMBOL_LIB_TABLE* libTable = m_schematic->Prj().SchSymbolLibTable();
|
||||
|
||||
wxCHECK_MSG( libTable, nullptr, "Could not load symbol lib table." );
|
||||
wxCHECK_MSG( libTable, nullptr, wxT( "Could not load symbol lib table." ) );
|
||||
|
||||
m_pi.set( SCH_IO_MGR::FindPlugin( SCH_IO_MGR::SCH_KICAD ) );
|
||||
m_properties = std::make_unique<PROPERTIES>();
|
||||
|
@ -479,11 +479,11 @@ SCH_SHEET* SCH_EAGLE_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchema
|
|||
{
|
||||
// Create a new empty symbol library.
|
||||
m_pi->CreateSymbolLib( getLibFileName().GetFullPath() );
|
||||
wxString libTableUri = "${KIPRJMOD}/" + getLibFileName().GetFullName();
|
||||
wxString libTableUri = wxT( "${KIPRJMOD}/" ) + getLibFileName().GetFullName();
|
||||
|
||||
// Add the new library to the project symbol library table.
|
||||
libTable->InsertRow(
|
||||
new SYMBOL_LIB_TABLE_ROW( getLibName(), libTableUri, wxString( "KiCad" ) ) );
|
||||
new SYMBOL_LIB_TABLE_ROW( getLibName(), libTableUri, wxString( wxT( "KiCad" ) ) ) );
|
||||
|
||||
// Save project symbol library table.
|
||||
wxFileName fn( m_schematic->Prj().GetProjectPath(),
|
||||
|
@ -505,13 +505,13 @@ SCH_SHEET* SCH_EAGLE_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchema
|
|||
|
||||
// If the attribute is found, store the Eagle version;
|
||||
// otherwise, store the dummy "0.0" version.
|
||||
m_version = currentNode->GetAttribute( "version", "0.0" );
|
||||
m_version = currentNode->GetAttribute( wxT( "version" ), wxT( "0.0" ) );
|
||||
|
||||
// Map all children into a readable dictionary
|
||||
NODE_MAP children = MapChildren( currentNode );
|
||||
|
||||
// Load drawing
|
||||
loadDrawing( children["drawing"] );
|
||||
loadDrawing( children[wxT( "drawing" )] );
|
||||
|
||||
m_pi->SaveLibrary( getLibFileName().GetFullPath() );
|
||||
|
||||
|
@ -532,7 +532,7 @@ void SCH_EAGLE_PLUGIN::loadDrawing( wxXmlNode* aDrawingNode )
|
|||
|
||||
// wxXmlNode* grid = drawingChildren["grid"]
|
||||
|
||||
auto layers = drawingChildren["layers"];
|
||||
auto layers = drawingChildren[wxT( "layers" )];
|
||||
|
||||
if( layers )
|
||||
loadLayerDefs( layers );
|
||||
|
@ -542,7 +542,7 @@ void SCH_EAGLE_PLUGIN::loadDrawing( wxXmlNode* aDrawingNode )
|
|||
// wxXmlNode* settings = drawingChildren["settings"]
|
||||
|
||||
// Load schematic
|
||||
auto schematic = drawingChildren["schematic"];
|
||||
auto schematic = drawingChildren[wxT( "schematic" )];
|
||||
|
||||
if( schematic )
|
||||
loadSchematic( schematic );
|
||||
|
@ -555,7 +555,7 @@ void SCH_EAGLE_PLUGIN::countNets( wxXmlNode* aSchematicNode )
|
|||
NODE_MAP schematicChildren = MapChildren( aSchematicNode );
|
||||
|
||||
// Loop through all the sheets
|
||||
wxXmlNode* sheetNode = getChildrenNodes( schematicChildren, "sheets" );
|
||||
wxXmlNode* sheetNode = getChildrenNodes( schematicChildren, wxT( "sheets" ) );
|
||||
|
||||
while( sheetNode )
|
||||
{
|
||||
|
@ -563,11 +563,11 @@ void SCH_EAGLE_PLUGIN::countNets( wxXmlNode* aSchematicNode )
|
|||
|
||||
// Loop through all nets
|
||||
// From the DTD: "Net is an electrical connection in a schematic."
|
||||
wxXmlNode* netNode = getChildrenNodes( sheetChildren, "nets" );
|
||||
wxXmlNode* netNode = getChildrenNodes( sheetChildren, wxT( "nets" ) );
|
||||
|
||||
while( netNode )
|
||||
{
|
||||
wxString netName = netNode->GetAttribute( "name" );
|
||||
wxString netName = netNode->GetAttribute( wxT( "name" ) );
|
||||
|
||||
if( m_netCounts.count( netName ) )
|
||||
m_netCounts[netName] = m_netCounts[netName] + 1;
|
||||
|
@ -587,9 +587,9 @@ void SCH_EAGLE_PLUGIN::loadSchematic( wxXmlNode* aSchematicNode )
|
|||
{
|
||||
// Map all children into a readable dictionary
|
||||
NODE_MAP schematicChildren = MapChildren( aSchematicNode );
|
||||
wxXmlNode* partNode = getChildrenNodes( schematicChildren, "parts" );
|
||||
wxXmlNode* libraryNode = getChildrenNodes( schematicChildren, "libraries" );
|
||||
wxXmlNode* sheetNode = getChildrenNodes( schematicChildren, "sheets" );
|
||||
wxXmlNode* partNode = getChildrenNodes( schematicChildren, wxT( "parts" ) );
|
||||
wxXmlNode* libraryNode = getChildrenNodes( schematicChildren, wxT( "libraries" ) );
|
||||
wxXmlNode* sheetNode = getChildrenNodes( schematicChildren, wxT( "sheets" ) );
|
||||
|
||||
if( !sheetNode )
|
||||
return;
|
||||
|
@ -618,13 +618,13 @@ void SCH_EAGLE_PLUGIN::loadSchematic( wxXmlNode* aSchematicNode )
|
|||
while( libraryNode )
|
||||
{
|
||||
NODE_MAP libraryChildren = MapChildren( libraryNode );
|
||||
wxXmlNode* devicesetNode = getChildrenNodes( libraryChildren, "devicesets" );
|
||||
wxXmlNode* devicesetNode = getChildrenNodes( libraryChildren, wxT( "devicesets" ) );
|
||||
|
||||
while( devicesetNode )
|
||||
{
|
||||
NODE_MAP deviceSetChildren = MapChildren( devicesetNode );
|
||||
wxXmlNode* deviceNode = getChildrenNodes( deviceSetChildren, "devices" );
|
||||
wxXmlNode* gateNode = getChildrenNodes( deviceSetChildren, "gates" );
|
||||
wxXmlNode* deviceNode = getChildrenNodes( deviceSetChildren, wxT( "devices" ) );
|
||||
wxXmlNode* gateNode = getChildrenNodes( deviceSetChildren, wxT( "gates" ) );
|
||||
|
||||
m_totalCount += count_nodes( deviceNode ) * count_nodes( gateNode );
|
||||
|
||||
|
@ -635,22 +635,22 @@ void SCH_EAGLE_PLUGIN::loadSchematic( wxXmlNode* aSchematicNode )
|
|||
}
|
||||
|
||||
// Rewind
|
||||
libraryNode = getChildrenNodes( schematicChildren, "libraries" );
|
||||
libraryNode = getChildrenNodes( schematicChildren, wxT( "libraries" ) );
|
||||
|
||||
while( sheetNode )
|
||||
{
|
||||
NODE_MAP sheetChildren = MapChildren( sheetNode );
|
||||
|
||||
m_totalCount += count_nodes( getChildrenNodes( sheetChildren, "instances" ) );
|
||||
m_totalCount += count_nodes( getChildrenNodes( sheetChildren, "busses" ) );
|
||||
m_totalCount += count_nodes( getChildrenNodes( sheetChildren, "nets" ) );
|
||||
m_totalCount += count_nodes( getChildrenNodes( sheetChildren, "plain" ) );
|
||||
m_totalCount += count_nodes( getChildrenNodes( sheetChildren, wxT( "instances" ) ) );
|
||||
m_totalCount += count_nodes( getChildrenNodes( sheetChildren, wxT( "busses" ) ) );
|
||||
m_totalCount += count_nodes( getChildrenNodes( sheetChildren, wxT( "nets" ) ) );
|
||||
m_totalCount += count_nodes( getChildrenNodes( sheetChildren, wxT( "plain" ) ) );
|
||||
|
||||
sheetNode = sheetNode->GetNext();
|
||||
}
|
||||
|
||||
// Rewind
|
||||
sheetNode = getChildrenNodes( schematicChildren, "sheets" );
|
||||
sheetNode = getChildrenNodes( schematicChildren, wxT( "sheets" ) );
|
||||
}
|
||||
|
||||
while( partNode )
|
||||
|
@ -669,7 +669,7 @@ void SCH_EAGLE_PLUGIN::loadSchematic( wxXmlNode* aSchematicNode )
|
|||
while( libraryNode )
|
||||
{
|
||||
// Read the library name
|
||||
wxString libName = libraryNode->GetAttribute( "name" );
|
||||
wxString libName = libraryNode->GetAttribute( wxT( "name" ) );
|
||||
|
||||
EAGLE_LIBRARY* elib = &m_eagleLibs[libName];
|
||||
elib->name = libName;
|
||||
|
@ -686,7 +686,7 @@ void SCH_EAGLE_PLUGIN::loadSchematic( wxXmlNode* aSchematicNode )
|
|||
countNets( aSchematicNode );
|
||||
|
||||
// Loop through all the sheets
|
||||
int sheet_count = countChildren( sheetNode->GetParent(), "sheet" );
|
||||
int sheet_count = countChildren( sheetNode->GetParent(), wxT( "sheet" ) );
|
||||
|
||||
// If eagle schematic has multiple sheets then create corresponding subsheets on the root sheet
|
||||
if( sheet_count > 1 )
|
||||
|
@ -714,7 +714,7 @@ void SCH_EAGLE_PLUGIN::loadSchematic( wxXmlNode* aSchematicNode )
|
|||
sheetpath.push_back( m_currentSheet );
|
||||
|
||||
m_rootSheet->AddInstance( sheetpath );
|
||||
m_rootSheet->SetPageNumber( sheetpath, wxString::Format( "%d", i ) );
|
||||
m_rootSheet->SetPageNumber( sheetpath, wxString::Format( wxT( "%d" ), i ) );
|
||||
|
||||
sheetNode = sheetNode->GetNext();
|
||||
x += 2;
|
||||
|
@ -801,7 +801,7 @@ void SCH_EAGLE_PLUGIN::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
|
|||
NODE_MAP sheetChildren = MapChildren( aSheetNode );
|
||||
|
||||
// Get description node
|
||||
wxXmlNode* descriptionNode = getChildrenNodes( sheetChildren, "description" );
|
||||
wxXmlNode* descriptionNode = getChildrenNodes( sheetChildren, wxT( "description" ) );
|
||||
|
||||
wxString des;
|
||||
std::string filename;
|
||||
|
@ -811,13 +811,13 @@ void SCH_EAGLE_PLUGIN::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
|
|||
if( descriptionNode )
|
||||
{
|
||||
des = descriptionNode->GetContent();
|
||||
des.Replace( "\n", "_", true );
|
||||
des.Replace( wxT( "\n" ), wxT( "_" ), true );
|
||||
sheetNameField.SetText( des );
|
||||
filename = des.ToStdString();
|
||||
}
|
||||
else
|
||||
{
|
||||
filename = wxString::Format( "%s_%d", m_filename.GetName(), aSheetIndex );
|
||||
filename = wxString::Format( wxT( "%s_%d" ), m_filename.GetName(), aSheetIndex );
|
||||
sheetNameField.SetText( filename );
|
||||
}
|
||||
|
||||
|
@ -834,7 +834,7 @@ void SCH_EAGLE_PLUGIN::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
|
|||
|
||||
|
||||
// Loop through all of the symbol instances.
|
||||
wxXmlNode* instanceNode = getChildrenNodes( sheetChildren, "instances" );
|
||||
wxXmlNode* instanceNode = getChildrenNodes( sheetChildren, wxT( "instances" ) );
|
||||
|
||||
while( instanceNode )
|
||||
{
|
||||
|
@ -848,14 +848,14 @@ void SCH_EAGLE_PLUGIN::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
|
|||
// From the DTD: "Buses receive names which determine which signals they include.
|
||||
// A bus is a drawing object. It does not create any electrical connections.
|
||||
// These are always created by means of the nets and their names."
|
||||
wxXmlNode* busNode = getChildrenNodes( sheetChildren, "busses" );
|
||||
wxXmlNode* busNode = getChildrenNodes( sheetChildren, wxT( "busses" ) );
|
||||
|
||||
while( busNode )
|
||||
{
|
||||
checkpoint();
|
||||
|
||||
// Get the bus name
|
||||
wxString busName = translateEagleBusName( busNode->GetAttribute( "name" ) );
|
||||
wxString busName = translateEagleBusName( busNode->GetAttribute( wxT( "name" ) ) );
|
||||
|
||||
// Load segments of this bus
|
||||
loadSegments( busNode, busName, wxString() );
|
||||
|
@ -866,15 +866,15 @@ void SCH_EAGLE_PLUGIN::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
|
|||
|
||||
// Loop through all nets
|
||||
// From the DTD: "Net is an electrical connection in a schematic."
|
||||
wxXmlNode* netNode = getChildrenNodes( sheetChildren, "nets" );
|
||||
wxXmlNode* netNode = getChildrenNodes( sheetChildren, wxT( "nets" ) );
|
||||
|
||||
while( netNode )
|
||||
{
|
||||
checkpoint();
|
||||
|
||||
// Get the net name and class
|
||||
wxString netName = netNode->GetAttribute( "name" );
|
||||
wxString netClass = netNode->GetAttribute( "class" );
|
||||
wxString netName = netNode->GetAttribute( wxT( "name" ) );
|
||||
wxString netClass = netNode->GetAttribute( wxT( "class" ) );
|
||||
|
||||
// Load segments of this net
|
||||
loadSegments( netNode, netName, netClass );
|
||||
|
@ -889,7 +889,7 @@ void SCH_EAGLE_PLUGIN::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
|
|||
/* moduleinst is a design block definition and is an EagleCad 8 feature,
|
||||
*
|
||||
* // Loop through all moduleinsts
|
||||
* wxXmlNode* moduleinstNode = getChildrenNodes( sheetChildren, "moduleinsts" );
|
||||
* wxXmlNode* moduleinstNode = getChildrenNodes( sheetChildren, wxT( "moduleinsts" ) );
|
||||
*
|
||||
* while( moduleinstNode )
|
||||
* {
|
||||
|
@ -898,7 +898,7 @@ void SCH_EAGLE_PLUGIN::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
|
|||
* }
|
||||
*/
|
||||
|
||||
wxXmlNode* plainNode = getChildrenNodes( sheetChildren, "plain" );
|
||||
wxXmlNode* plainNode = getChildrenNodes( sheetChildren, wxT( "plain" ) );
|
||||
|
||||
while( plainNode )
|
||||
{
|
||||
|
@ -906,15 +906,15 @@ void SCH_EAGLE_PLUGIN::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
|
|||
|
||||
wxString nodeName = plainNode->GetName();
|
||||
|
||||
if( nodeName == "text" )
|
||||
if( nodeName == wxT( "text" ) )
|
||||
{
|
||||
m_currentSheet->GetScreen()->Append( loadPlainText( plainNode ) );
|
||||
}
|
||||
else if( nodeName == "wire" )
|
||||
else if( nodeName == wxT( "wire" ) )
|
||||
{
|
||||
m_currentSheet->GetScreen()->Append( loadWire( plainNode ) );
|
||||
}
|
||||
else if( nodeName == "frame" )
|
||||
else if( nodeName == wxT( "frame" ) )
|
||||
{
|
||||
std::vector<SCH_LINE*> lines;
|
||||
|
||||
|
@ -1022,7 +1022,7 @@ void SCH_EAGLE_PLUGIN::loadSegments( wxXmlNode* aSegmentsNode, const wxString& n
|
|||
wxXmlNode* currentSegment = aSegmentsNode->GetChildren();
|
||||
SCH_SCREEN* screen = m_currentSheet->GetScreen();
|
||||
|
||||
int segmentCount = countChildren( aSegmentsNode, "segment" );
|
||||
int segmentCount = countChildren( aSegmentsNode, wxT( "segment" ) );
|
||||
|
||||
// wxCHECK( screen, [>void<] );
|
||||
while( currentSegment )
|
||||
|
@ -1038,7 +1038,7 @@ void SCH_EAGLE_PLUGIN::loadSegments( wxXmlNode* aSegmentsNode, const wxString& n
|
|||
|
||||
while( segmentAttribute )
|
||||
{
|
||||
if( segmentAttribute->GetName() == "wire" )
|
||||
if( segmentAttribute->GetName() == wxT( "wire" ) )
|
||||
{
|
||||
SCH_LINE* wire = loadWire( segmentAttribute );
|
||||
|
||||
|
@ -1075,11 +1075,11 @@ void SCH_EAGLE_PLUGIN::loadSegments( wxXmlNode* aSegmentsNode, const wxString& n
|
|||
{
|
||||
wxString nodeName = segmentAttribute->GetName();
|
||||
|
||||
if( nodeName == "junction" )
|
||||
if( nodeName == wxT( "junction" ) )
|
||||
{
|
||||
screen->Append( loadJunction( segmentAttribute ) );
|
||||
}
|
||||
else if( nodeName == "label" )
|
||||
else if( nodeName == wxT( "label" ) )
|
||||
{
|
||||
SCH_TEXT* label = loadLabel( segmentAttribute, netName );
|
||||
screen->Append( label );
|
||||
|
@ -1088,13 +1088,13 @@ void SCH_EAGLE_PLUGIN::loadSegments( wxXmlNode* aSegmentsNode, const wxString& n
|
|||
segDesc.labels.push_back( label );
|
||||
labelled = true;
|
||||
}
|
||||
else if( nodeName == "pinref" )
|
||||
else if( nodeName == wxT( "pinref" ) )
|
||||
{
|
||||
segmentAttribute->GetAttribute( "gate" ); // REQUIRED
|
||||
wxString part = segmentAttribute->GetAttribute( "part" ); // REQUIRED
|
||||
wxString pin = segmentAttribute->GetAttribute( "pin" ); // REQUIRED
|
||||
segmentAttribute->GetAttribute( wxT( "gate" ) ); // REQUIRED
|
||||
wxString part = segmentAttribute->GetAttribute( wxT( "part" ) ); // REQUIRED
|
||||
wxString pin = segmentAttribute->GetAttribute( wxT( "pin" ) ); // REQUIRED
|
||||
|
||||
auto powerPort = m_powerPorts.find( "#" + part );
|
||||
auto powerPort = m_powerPorts.find( wxT( "#" ) + part );
|
||||
|
||||
if( powerPort != m_powerPorts.end()
|
||||
&& powerPort->second == EscapeString( pin, CTX_NETNAME ) )
|
||||
|
@ -1102,7 +1102,7 @@ void SCH_EAGLE_PLUGIN::loadSegments( wxXmlNode* aSegmentsNode, const wxString& n
|
|||
labelled = true;
|
||||
}
|
||||
}
|
||||
else if( nodeName == "wire" )
|
||||
else if( nodeName == wxT( "wire" ) )
|
||||
{
|
||||
// already handled;
|
||||
}
|
||||
|
@ -1296,7 +1296,7 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
|||
wxString libraryname = epart->library;
|
||||
wxString gatename = epart->deviceset + epart->device + einstance.gate;
|
||||
wxString symbolname = wxString( epart->deviceset + epart->device );
|
||||
symbolname.Replace( "*", "" );
|
||||
symbolname.Replace( wxT( "*" ), wxT( "" ) );
|
||||
wxString kisymbolname = EscapeString( symbolname, CTX_LIBID );
|
||||
|
||||
int unit = m_eagleLibs[libraryname].GateUnit[gatename];
|
||||
|
@ -1355,8 +1355,8 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
|||
// EAGLE allows references to be single digits. This breaks KiCad netlisting, which requires
|
||||
// parts to have non-digit + digit annotation. If the reference begins with a number,
|
||||
// we prepend 'UNK' (unknown) for the symbol designator
|
||||
if( reference.find_first_not_of( "0123456789" ) == wxString::npos )
|
||||
reference.Prepend( "UNK" );
|
||||
if( reference.find_first_not_of( wxT( "0123456789" ) ) == wxString::npos )
|
||||
reference.Prepend( wxT( "UNK" ) );
|
||||
|
||||
SCH_SHEET_PATH sheetpath;
|
||||
m_rootSheet->LocatePathOfScreen( screen, &sheetpath );
|
||||
|
@ -1386,7 +1386,7 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
|||
for( const auto& a : epart->variant )
|
||||
{
|
||||
SCH_FIELD* field = symbol->AddField( *symbol->GetField( VALUE_FIELD ) );
|
||||
field->SetName( "VARIANT_" + a.first );
|
||||
field->SetName( wxT( "VARIANT_" ) + a.first );
|
||||
field->SetText( a.second );
|
||||
field->SetVisible( false );
|
||||
}
|
||||
|
@ -1399,17 +1399,17 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
|||
// Parse attributes for the instance
|
||||
while( attributeNode )
|
||||
{
|
||||
if( attributeNode->GetName() == "attribute" )
|
||||
if( attributeNode->GetName() == wxT( "attribute" ) )
|
||||
{
|
||||
EATTR attr = EATTR( attributeNode );
|
||||
SCH_FIELD* field = nullptr;
|
||||
|
||||
if( attr.name.Lower() == "name" )
|
||||
if( attr.name.Lower() == wxT( "name" ) )
|
||||
{
|
||||
field = symbol->GetField( REFERENCE_FIELD );
|
||||
nameAttributeFound = true;
|
||||
}
|
||||
else if( attr.name.Lower() == "value" )
|
||||
else if( attr.name.Lower() == wxT( "value" ) )
|
||||
{
|
||||
field = symbol->GetField( VALUE_FIELD );
|
||||
valueAttributeFound = true;
|
||||
|
@ -1446,15 +1446,15 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode )
|
|||
absdegrees );
|
||||
}
|
||||
}
|
||||
else if( attributeNode->GetName() == "variant" )
|
||||
else if( attributeNode->GetName() == wxT( "variant" ) )
|
||||
{
|
||||
wxString variant, value;
|
||||
|
||||
if( attributeNode->GetAttribute( "name", &variant )
|
||||
&& attributeNode->GetAttribute( "value", &value ) )
|
||||
if( attributeNode->GetAttribute( wxT( "name" ), &variant )
|
||||
&& attributeNode->GetAttribute( wxT( "value" ), &value ) )
|
||||
{
|
||||
SCH_FIELD* field = symbol->AddField( *symbol->GetField( VALUE_FIELD ) );
|
||||
field->SetName( "VARIANT_" + variant );
|
||||
field->SetName( wxT( "VARIANT_" ) + variant );
|
||||
field->SetText( value );
|
||||
field->SetVisible( false );
|
||||
}
|
||||
|
@ -1501,27 +1501,27 @@ EAGLE_LIBRARY* SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode,
|
|||
NODE_MAP libraryChildren = MapChildren( aLibraryNode );
|
||||
|
||||
// Loop through the symbols and load each of them
|
||||
wxXmlNode* symbolNode = getChildrenNodes( libraryChildren, "symbols" );
|
||||
wxXmlNode* symbolNode = getChildrenNodes( libraryChildren, wxT( "symbols" ) );
|
||||
|
||||
while( symbolNode )
|
||||
{
|
||||
wxString symbolName = symbolNode->GetAttribute( "name" );
|
||||
wxString symbolName = symbolNode->GetAttribute( wxT( "name" ) );
|
||||
aEagleLibrary->SymbolNodes[symbolName] = symbolNode;
|
||||
symbolNode = symbolNode->GetNext();
|
||||
}
|
||||
|
||||
// Loop through the device sets and load each of them
|
||||
wxXmlNode* devicesetNode = getChildrenNodes( libraryChildren, "devicesets" );
|
||||
wxXmlNode* devicesetNode = getChildrenNodes( libraryChildren, wxT( "devicesets" ) );
|
||||
|
||||
while( devicesetNode )
|
||||
{
|
||||
// Get Device set information
|
||||
EDEVICE_SET edeviceset = EDEVICE_SET( devicesetNode );
|
||||
|
||||
wxString prefix = edeviceset.prefix ? edeviceset.prefix.Get() : "";
|
||||
wxString prefix = edeviceset.prefix ? edeviceset.prefix.Get() : wxT( "" );
|
||||
|
||||
NODE_MAP deviceSetChildren = MapChildren( devicesetNode );
|
||||
wxXmlNode* deviceNode = getChildrenNodes( deviceSetChildren, "devices" );
|
||||
wxXmlNode* deviceNode = getChildrenNodes( deviceSetChildren, wxT( "devices" ) );
|
||||
|
||||
// For each device in the device set:
|
||||
while( deviceNode )
|
||||
|
@ -1531,7 +1531,7 @@ EAGLE_LIBRARY* SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode,
|
|||
|
||||
// Create symbol name from deviceset and device names.
|
||||
wxString symbolName = edeviceset.name + edevice.name;
|
||||
symbolName.Replace( "*", "" );
|
||||
symbolName.Replace( wxT( "*" ), wxT( "" ) );
|
||||
wxASSERT( !symbolName.IsEmpty() );
|
||||
symbolName = EscapeString( symbolName, CTX_LIBID );
|
||||
|
||||
|
@ -1542,8 +1542,8 @@ EAGLE_LIBRARY* SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode,
|
|||
unique_ptr<LIB_SYMBOL> libSymbol( new LIB_SYMBOL( symbolName ) );
|
||||
|
||||
// Process each gate in the deviceset for this device.
|
||||
wxXmlNode* gateNode = getChildrenNodes( deviceSetChildren, "gates" );
|
||||
int gates_count = countChildren( deviceSetChildren["gates"], "gate" );
|
||||
wxXmlNode* gateNode = getChildrenNodes( deviceSetChildren, wxT( "gates" ) );
|
||||
int gates_count = countChildren( deviceSetChildren[wxT( "gates" )], wxT( "gate" ) );
|
||||
libSymbol->SetUnitCount( gates_count );
|
||||
libSymbol->LockUnits( true );
|
||||
|
||||
|
@ -1605,7 +1605,7 @@ EAGLE_LIBRARY* SCH_EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLibraryNode,
|
|||
bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode, std::unique_ptr<LIB_SYMBOL>& aSymbol,
|
||||
EDEVICE* aDevice, int aGateNumber, const wxString& aGateName )
|
||||
{
|
||||
wxString symbolName = aSymbolNode->GetAttribute( "name" );
|
||||
wxString symbolName = aSymbolNode->GetAttribute( wxT( "name" ) );
|
||||
std::vector<LIB_ITEM*> items;
|
||||
|
||||
wxXmlNode* currentNode = aSymbolNode->GetChildren();
|
||||
|
@ -1619,11 +1619,11 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode, std::unique_ptr<LIB_S
|
|||
{
|
||||
wxString nodeName = currentNode->GetName();
|
||||
|
||||
if( nodeName == "circle" )
|
||||
if( nodeName == wxT( "circle" ) )
|
||||
{
|
||||
aSymbol->AddDrawItem( loadSymbolCircle( aSymbol, currentNode, aGateNumber ) );
|
||||
}
|
||||
else if( nodeName == "pin" )
|
||||
else if( nodeName == wxT( "pin" ) )
|
||||
{
|
||||
EPIN ePin = EPIN( currentNode );
|
||||
std::unique_ptr<LIB_PIN> pin( loadPin( aSymbol, currentNode, &ePin, aGateNumber ) );
|
||||
|
@ -1639,7 +1639,7 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode, std::unique_ptr<LIB_S
|
|||
{
|
||||
pin->SetType( pinDir.second );
|
||||
|
||||
if( pinDir.first == "sup" ) // power supply symbol
|
||||
if( pinDir.first == wxT( "sup" ) ) // power supply symbol
|
||||
ispower = true;
|
||||
|
||||
break;
|
||||
|
@ -1679,30 +1679,30 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode, std::unique_ptr<LIB_S
|
|||
else
|
||||
{
|
||||
pin->SetUnit( aGateNumber );
|
||||
pin->SetNumber( wxString::Format( "%i", pincount ) );
|
||||
pin->SetNumber( wxString::Format( wxT( "%i" ), pincount ) );
|
||||
aSymbol->AddDrawItem( pin.release() );
|
||||
}
|
||||
}
|
||||
else if( nodeName == "polygon" )
|
||||
else if( nodeName == wxT( "polygon" ) )
|
||||
{
|
||||
aSymbol->AddDrawItem( loadSymbolPolyLine( aSymbol, currentNode, aGateNumber ) );
|
||||
}
|
||||
else if( nodeName == "rectangle" )
|
||||
else if( nodeName == wxT( "rectangle" ) )
|
||||
{
|
||||
aSymbol->AddDrawItem( loadSymbolRectangle( aSymbol, currentNode, aGateNumber ) );
|
||||
}
|
||||
else if( nodeName == "text" )
|
||||
else if( nodeName == wxT( "text" ) )
|
||||
{
|
||||
std::unique_ptr<LIB_TEXT> libtext( loadSymbolText( aSymbol, currentNode,
|
||||
aGateNumber ) );
|
||||
|
||||
if( libtext->GetText().Upper() == ">NAME" )
|
||||
if( libtext->GetText().Upper() == wxT( ">NAME" ) )
|
||||
{
|
||||
LIB_FIELD* field = aSymbol->GetFieldById( REFERENCE_FIELD );
|
||||
loadFieldAttributes( field, libtext.get() );
|
||||
foundName = true;
|
||||
}
|
||||
else if( libtext->GetText().Upper() == ">VALUE" )
|
||||
else if( libtext->GetText().Upper() == wxT( ">VALUE" ) )
|
||||
{
|
||||
LIB_FIELD* field = aSymbol->GetFieldById( VALUE_FIELD );
|
||||
loadFieldAttributes( field, libtext.get() );
|
||||
|
@ -1713,11 +1713,11 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode, std::unique_ptr<LIB_S
|
|||
aSymbol->AddDrawItem( libtext.release() );
|
||||
}
|
||||
}
|
||||
else if( nodeName == "wire" )
|
||||
else if( nodeName == wxT( "wire" ) )
|
||||
{
|
||||
aSymbol->AddDrawItem( loadSymbolWire( aSymbol, currentNode, aGateNumber ) );
|
||||
}
|
||||
else if( nodeName == "frame" )
|
||||
else if( nodeName == wxT( "frame" ) )
|
||||
{
|
||||
std::vector<LIB_ITEM*> frameItems;
|
||||
|
||||
|
@ -1731,7 +1731,7 @@ bool SCH_EAGLE_PLUGIN::loadSymbol( wxXmlNode* aSymbolNode, std::unique_ptr<LIB_S
|
|||
}
|
||||
|
||||
/*
|
||||
* else if( nodeName == "description" )
|
||||
* else if( nodeName == wxT( "description" ) )
|
||||
* {
|
||||
* }
|
||||
* else if( nodeName == "dimension" )
|
||||
|
@ -1880,7 +1880,7 @@ LIB_SHAPE* SCH_EAGLE_PLUGIN::loadSymbolPolyLine( std::unique_ptr<LIB_SYMBOL>& aS
|
|||
|
||||
while( vertex )
|
||||
{
|
||||
if( vertex->GetName() == "vertex" ) // skip <xmlattr> node
|
||||
if( vertex->GetName() == wxT( "vertex" ) ) // skip <xmlattr> node
|
||||
{
|
||||
EVERTEX evertex( vertex );
|
||||
pt = wxPoint( evertex.x.ToSchUnits(), evertex.y.ToSchUnits() );
|
||||
|
@ -1913,7 +1913,7 @@ LIB_PIN* SCH_EAGLE_PLUGIN::loadPin( std::unique_ptr<LIB_SYMBOL>& aSymbol, wxXmlN
|
|||
case 90: pin->SetOrientation( 'U' ); break;
|
||||
case 180: pin->SetOrientation( 'L' ); break;
|
||||
case 270: pin->SetOrientation( 'D' ); break;
|
||||
default: wxFAIL_MSG( wxString::Format( "Unhandled orientation (%d degrees).", roti ) );
|
||||
default: wxFAIL_MSG( wxString::Format( wxT( "Unhandled orientation (%d degrees)." ), roti ) );
|
||||
}
|
||||
|
||||
pin->SetLength( Mils2iu( 300 ) ); // Default pin length when not defined.
|
||||
|
@ -1922,13 +1922,13 @@ LIB_PIN* SCH_EAGLE_PLUGIN::loadPin( std::unique_ptr<LIB_SYMBOL>& aSymbol, wxXmlN
|
|||
{
|
||||
wxString length = aEPin->length.Get();
|
||||
|
||||
if( length == "short" )
|
||||
if( length == wxT( "short" ) )
|
||||
pin->SetLength( Mils2iu( 100 ) );
|
||||
else if( length == "middle" )
|
||||
else if( length == wxT( "middle" ) )
|
||||
pin->SetLength( Mils2iu( 200 ) );
|
||||
else if( length == "long" )
|
||||
else if( length == wxT( "long" ) )
|
||||
pin->SetLength( Mils2iu( 300 ) );
|
||||
else if( length == "point" )
|
||||
else if( length == wxT( "point" ) )
|
||||
pin->SetLength( Mils2iu( 0 ) );
|
||||
}
|
||||
|
||||
|
@ -1937,16 +1937,16 @@ LIB_PIN* SCH_EAGLE_PLUGIN::loadPin( std::unique_ptr<LIB_SYMBOL>& aSymbol, wxXmlN
|
|||
{
|
||||
wxString visible = aEPin->visible.Get();
|
||||
|
||||
if( visible == "off" )
|
||||
if( visible == wxT( "off" ) )
|
||||
{
|
||||
pin->SetNameTextSize( 0 );
|
||||
pin->SetNumberTextSize( 0 );
|
||||
}
|
||||
else if( visible == "pad" )
|
||||
else if( visible == wxT( "pad" ) )
|
||||
{
|
||||
pin->SetNameTextSize( 0 );
|
||||
}
|
||||
else if( visible == "pin" )
|
||||
else if( visible == wxT( "pin" ) )
|
||||
{
|
||||
pin->SetNumberTextSize( 0 );
|
||||
}
|
||||
|
@ -1962,11 +1962,11 @@ LIB_PIN* SCH_EAGLE_PLUGIN::loadPin( std::unique_ptr<LIB_SYMBOL>& aSymbol, wxXmlN
|
|||
{
|
||||
wxString function = aEPin->function.Get();
|
||||
|
||||
if( function == "dot" )
|
||||
if( function == wxT( "dot" ) )
|
||||
pin->SetShape( GRAPHIC_PINSHAPE::INVERTED );
|
||||
else if( function == "clk" )
|
||||
else if( function == wxT( "clk" ) )
|
||||
pin->SetShape( GRAPHIC_PINSHAPE::CLOCK );
|
||||
else if( function == "dotclk" )
|
||||
else if( function == wxT( "dotclk" ) )
|
||||
pin->SetShape( GRAPHIC_PINSHAPE::INVERTED_CLOCK );
|
||||
}
|
||||
|
||||
|
@ -1992,7 +1992,7 @@ LIB_TEXT* SCH_EAGLE_PLUGIN::loadSymbolText( std::unique_ptr<LIB_SYMBOL>& aSymbol
|
|||
std::replace( text.begin(), text.end(), '\n', '_' );
|
||||
std::replace( text.begin(), text.end(), '\r', '_' );
|
||||
|
||||
libtext->SetText( text.IsEmpty() ? "~" : text );
|
||||
libtext->SetText( text.IsEmpty() ? wxT( "~" ) : text );
|
||||
loadTextAttributes( libtext.get(), etext );
|
||||
|
||||
return libtext.release();
|
||||
|
@ -2184,7 +2184,7 @@ SCH_TEXT* SCH_EAGLE_PLUGIN::loadPlainText( wxXmlNode* aSchText )
|
|||
const wxString& thetext = aSchText->GetNodeContent();
|
||||
|
||||
wxString adjustedText;
|
||||
wxStringTokenizer tokenizer( thetext, "\r\n" );
|
||||
wxStringTokenizer tokenizer( thetext, wxT( "\r\n" ) );
|
||||
|
||||
// Strip the whitespace from both ends of each line.
|
||||
while( tokenizer.HasMoreTokens() )
|
||||
|
@ -2199,7 +2199,7 @@ SCH_TEXT* SCH_EAGLE_PLUGIN::loadPlainText( wxXmlNode* aSchText )
|
|||
adjustedText += tmp;
|
||||
}
|
||||
|
||||
schtext->SetText( adjustedText.IsEmpty() ? "\" \"" : escapeName( adjustedText ) );
|
||||
schtext->SetText( adjustedText.IsEmpty() ? wxT( "\"" ) : escapeName( adjustedText ) );
|
||||
schtext->SetPosition( wxPoint( etext.x.ToSchUnits(), -etext.y.ToSchUnits() ) );
|
||||
loadTextAttributes( schtext.get(), etext );
|
||||
schtext->SetItalic( false );
|
||||
|
@ -2331,8 +2331,8 @@ bool SCH_EAGLE_PLUGIN::CheckHeader( const wxString& aFileName )
|
|||
wxString thirdline = tempFile.GetNextLine();
|
||||
tempFile.Close();
|
||||
|
||||
return firstline.StartsWith( "<?xml" ) && secondline.StartsWith( "<!DOCTYPE eagle SYSTEM" )
|
||||
&& thirdline.StartsWith( "<eagle version" );
|
||||
return firstline.StartsWith( wxT( "<?xml" ) ) && secondline.StartsWith( wxT( "<!DOCTYPE eagle SYSTEM" ) )
|
||||
&& thirdline.StartsWith( wxT( "<eagle version" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -3022,9 +3022,9 @@ wxString SCH_EAGLE_PLUGIN::translateEagleBusName( const wxString& aEagleName ) c
|
|||
if( NET_SETTINGS::ParseBusVector( aEagleName, nullptr, nullptr ) )
|
||||
return aEagleName;
|
||||
|
||||
wxString ret = "{";
|
||||
wxString ret = wxT( "{" );
|
||||
|
||||
wxStringTokenizer tokenizer( aEagleName, "," );
|
||||
wxStringTokenizer tokenizer( aEagleName, wxT( "," ) );
|
||||
|
||||
while( tokenizer.HasMoreTokens() )
|
||||
{
|
||||
|
@ -3036,13 +3036,13 @@ wxString SCH_EAGLE_PLUGIN::translateEagleBusName( const wxString& aEagleName ) c
|
|||
// to close it out before appending the space.
|
||||
|
||||
if( member.Freq( '!' ) % 2 > 0 )
|
||||
member << "!";
|
||||
member << wxT( "!" );
|
||||
|
||||
ret << member << " ";
|
||||
ret << member << wxT( " " );
|
||||
}
|
||||
|
||||
ret.Trim( true );
|
||||
ret << "}";
|
||||
ret << wxT( "}" );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ SCH_SCREEN::~SCH_SCREEN()
|
|||
SCHEMATIC* SCH_SCREEN::Schematic() const
|
||||
{
|
||||
wxCHECK_MSG( GetParent() && GetParent()->Type() == SCHEMATIC_T, nullptr,
|
||||
"SCH_SCREEN must have a SCHEMATIC parent!" );
|
||||
wxT( "SCH_SCREEN must have a SCHEMATIC parent!" ) );
|
||||
|
||||
return static_cast<SCHEMATIC*>( GetParent() );
|
||||
}
|
||||
|
@ -180,13 +180,13 @@ void SCH_SCREEN::Append( SCH_ITEM* aItem )
|
|||
int cnt = 1;
|
||||
wxString newName;
|
||||
|
||||
newName.Printf( "%s_%d", symbol->GetLibId().GetUniStringLibItemName(),
|
||||
newName.Printf( wxT( "%s_%d" ), symbol->GetLibId().GetUniStringLibItemName(),
|
||||
cnt );
|
||||
|
||||
while( m_libSymbols.find( newName ) != m_libSymbols.end() )
|
||||
{
|
||||
cnt += 1;
|
||||
newName.Printf( "%s_%d", symbol->GetLibId().GetUniStringLibItemName(),
|
||||
newName.Printf( wxT( "%s_%d" ), symbol->GetLibId().GetUniStringLibItemName(),
|
||||
cnt );
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ void SCH_SCREEN::Append( SCH_ITEM* aItem )
|
|||
|
||||
void SCH_SCREEN::Append( SCH_SCREEN* aScreen )
|
||||
{
|
||||
wxCHECK_RET( aScreen, "Invalid screen object." );
|
||||
wxCHECK_RET( aScreen, wxT( "Invalid screen object." ) );
|
||||
|
||||
// No need to descend the hierarchy. Once the top level screen is copied, all of its
|
||||
// children are copied as well.
|
||||
|
@ -609,7 +609,7 @@ bool SCH_SCREEN::IsTerminalPoint( const wxPoint& aPosition, int aLayer ) const
|
|||
|
||||
void SCH_SCREEN::UpdateSymbolLinks( REPORTER* aReporter )
|
||||
{
|
||||
wxCHECK_RET( Schematic(), "Cannot call SCH_SCREEN::UpdateSymbolLinks with no SCHEMATIC" );
|
||||
wxCHECK_RET( Schematic(), wxT( "Cannot call SCH_SCREEN::UpdateSymbolLinks with no SCHEMATIC" ) );
|
||||
|
||||
wxString msg;
|
||||
std::unique_ptr< LIB_SYMBOL > libSymbol;
|
||||
|
@ -1237,7 +1237,7 @@ void SCH_SCREENS::buildScreenList( SCH_SHEET* aSheet )
|
|||
{
|
||||
SCH_SCREEN* screen = aSheet->GetScreen();
|
||||
|
||||
wxCHECK_RET( screen, "No screen for aSheet" );
|
||||
wxCHECK_RET( screen, wxT( "No screen for aSheet" ) );
|
||||
|
||||
addScreenToList( screen, aSheet );
|
||||
|
||||
|
@ -1256,7 +1256,7 @@ void SCH_SCREENS::ClearAnnotationOfNewSheetPaths( SCH_SHEET_LIST& aInitialSheetP
|
|||
|
||||
SCHEMATIC* sch = first->Schematic();
|
||||
|
||||
wxCHECK_RET( sch, "Null schematic in SCH_SCREENS::ClearAnnotationOfNewSheetPaths" );
|
||||
wxCHECK_RET( sch, wxT( "Null schematic in SCH_SCREENS::ClearAnnotationOfNewSheetPaths" ) );
|
||||
|
||||
// Clear the annotation for symbols inside new sheetpaths not already in aInitialSheetList
|
||||
SCH_SCREENS screensList( sch->Root() ); // The list of screens, shared by sheet paths
|
||||
|
@ -1398,7 +1398,7 @@ void SCH_SCREENS::UpdateSymbolLinks( REPORTER* aReporter )
|
|||
|
||||
SCHEMATIC* sch = first->Schematic();
|
||||
|
||||
wxCHECK_RET( sch, "Null schematic in SCH_SCREENS::UpdateSymbolLinks" );
|
||||
wxCHECK_RET( sch, wxT( "Null schematic in SCH_SCREENS::UpdateSymbolLinks" ) );
|
||||
|
||||
SCH_SHEET_LIST sheets = sch->GetSheets();
|
||||
|
||||
|
@ -1521,7 +1521,7 @@ void SCH_SCREENS::BuildClientSheetPathList()
|
|||
|
||||
SCHEMATIC* sch = first->Schematic();
|
||||
|
||||
wxCHECK_RET( sch, "Null schematic in SCH_SCREENS::BuildClientSheetPathList" );
|
||||
wxCHECK_RET( sch, wxT( "Null schematic in SCH_SCREENS::BuildClientSheetPathList" ) );
|
||||
|
||||
for( SCH_SCREEN* curr_screen = GetFirst(); curr_screen; curr_screen = GetNext() )
|
||||
curr_screen->GetClientSheetPaths().clear();
|
||||
|
|
|
@ -206,7 +206,7 @@ int SCH_SHEET::GetScreenCount() const
|
|||
|
||||
bool SCH_SHEET::IsRootSheet() const
|
||||
{
|
||||
wxCHECK_MSG( Schematic(), false, "Can't call IsRootSheet without setting a schematic" );
|
||||
wxCHECK_MSG( Schematic(), false, wxT( "Can't call IsRootSheet without setting a schematic" ) );
|
||||
|
||||
return &Schematic()->Root() == this;
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ bool SCH_SHEET::ResolveTextVar( wxString* token, int aDepth ) const
|
|||
{
|
||||
if( sheet.Last() == this ) // Current sheet path found
|
||||
{
|
||||
*token = wxString::Format( "%s", sheet.GetPageNumber() );
|
||||
*token = wxString::Format( wxT( "%s" ), sheet.GetPageNumber() );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ wxString SCH_SHEET_PATH::PathAsString() const
|
|||
// Start at 1 to avoid the root sheet, which does not need to be added to the path.
|
||||
// Its timestamp changes anyway.
|
||||
for( unsigned i = 1; i < size(); i++ )
|
||||
s += at( i )->m_Uuid.AsString() + "/";
|
||||
s += at( i )->m_Uuid.AsString() + wxT( "/" );
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ bool SCH_SHEET_PATH::TestForRecursion( const wxString& aSrcFileName, const wxStr
|
|||
|
||||
SCHEMATIC* sch = LastScreen()->Schematic();
|
||||
|
||||
wxCHECK_MSG( sch, false, "No SCHEMATIC found in SCH_SHEET_PATH::TestForRecursion!" );
|
||||
wxCHECK_MSG( sch, false, wxT( "No SCHEMATIC found in SCH_SHEET_PATH::TestForRecursion!" ) );
|
||||
|
||||
wxFileName rootFn = sch->GetFileName();
|
||||
wxFileName srcFn = aSrcFileName;
|
||||
|
@ -769,7 +769,7 @@ void SCH_SHEET_LIST::AnnotatePowerSymbols()
|
|||
{
|
||||
if( references[ii].GetRef()[0] != '#' )
|
||||
{
|
||||
wxString new_ref = "#" + references[ii].GetRef();
|
||||
wxString new_ref = wxT( "#" ) + references[ii].GetRef();
|
||||
references[ii].SetRef( new_ref );
|
||||
}
|
||||
}
|
||||
|
@ -840,7 +840,7 @@ bool SCH_SHEET_LIST::TestForRecursion( const SCH_SHEET_LIST& aSrcSheetHierarchy,
|
|||
|
||||
SCHEMATIC* sch = at( 0 ).LastScreen()->Schematic();
|
||||
|
||||
wxCHECK_MSG( sch, false, "No SCHEMATIC found in SCH_SHEET_LIST::TestForRecursion!" );
|
||||
wxCHECK_MSG( sch, false, wxT( "No SCHEMATIC found in SCH_SHEET_LIST::TestForRecursion!" ) );
|
||||
|
||||
wxFileName rootFn = sch->GetFileName();
|
||||
wxFileName destFn = aDestFileName;
|
||||
|
@ -932,7 +932,7 @@ void SCH_SHEET_LIST::UpdateSymbolInstances(
|
|||
|
||||
if( it == aSymbolInstances.end() )
|
||||
{
|
||||
wxLogTrace( traceSchSheetPaths, "No symbol instance found for path '%s'", path );
|
||||
wxLogTrace( traceSchSheetPaths, wxT( "No symbol instance found for path '%s'" ), path );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -967,12 +967,12 @@ void SCH_SHEET_LIST::UpdateSheetInstances( const std::vector<SCH_SHEET_INSTANCE>
|
|||
|
||||
if( it == aSheetInstances.end() )
|
||||
{
|
||||
wxLogTrace( traceSchSheetPaths, "No sheet instance found for path '%s'",
|
||||
wxLogTrace( traceSchSheetPaths, wxT( "No sheet instance found for path '%s'" ),
|
||||
path.PathWithoutRootUuid().AsString() );
|
||||
continue;
|
||||
}
|
||||
|
||||
wxLogTrace( traceSchSheetPaths, "Setting sheet '%s' instance '%s' page number '%s'",
|
||||
wxLogTrace( traceSchSheetPaths, wxT( "Setting sheet '%s' instance '%s' page number '%s'" ),
|
||||
( sheet->GetName().IsEmpty() ) ? wxT( "root" ) : sheet->GetName(),
|
||||
path.PathWithoutRootUuid().AsString(), it->m_PageNumber );
|
||||
sheet->AddInstance( path );
|
||||
|
@ -1044,7 +1044,7 @@ void SCH_SHEET_LIST::SetInitialPageNumbers()
|
|||
wxCHECK2( sheet, continue );
|
||||
|
||||
sheet->AddInstance( instance );
|
||||
tmp.Printf( "%d", pageNumber );
|
||||
tmp.Printf( wxT( "%d" ), pageNumber );
|
||||
sheet->SetPageNumber( instance, tmp );
|
||||
pageNumber += 1;
|
||||
}
|
||||
|
|
|
@ -408,9 +408,9 @@ void SCH_SYMBOL::AddHierarchicalReference( const KIID_PATH& aPath, const wxStrin
|
|||
{
|
||||
if( m_instanceReferences[ii].m_Path == aPath )
|
||||
{
|
||||
wxLogTrace( traceSchSheetPaths, "Removing symbol instance:\n"
|
||||
" sheet path %s\n"
|
||||
" reference %s, unit %d from symbol %s.",
|
||||
wxLogTrace( traceSchSheetPaths, wxT( "Removing symbol instance:\n" )
|
||||
wxT( " sheet path %s\n" )
|
||||
wxT( " reference %s, unit %d from symbol %s." ),
|
||||
aPath.AsString(),
|
||||
m_instanceReferences[ii].m_Reference,
|
||||
m_instanceReferences[ii].m_Unit,
|
||||
|
@ -428,9 +428,9 @@ void SCH_SYMBOL::AddHierarchicalReference( const KIID_PATH& aPath, const wxStrin
|
|||
instance.m_Value = aValue;
|
||||
instance.m_Footprint = aFootprint;
|
||||
|
||||
wxLogTrace( traceSchSheetPaths, "Adding symbol instance:\n"
|
||||
" sheet path %s\n"
|
||||
" reference %s, unit %d to symbol %s.",
|
||||
wxLogTrace( traceSchSheetPaths, wxT( "Adding symbol instance:\n" )
|
||||
wxT( " sheet path %s\n" )
|
||||
wxT( " reference %s, unit %d to symbol %s." ),
|
||||
aPath.AsString(),
|
||||
aRef,
|
||||
aUnit,
|
||||
|
@ -871,7 +871,7 @@ std::vector<SCH_PIN*> SCH_SYMBOL::GetPins( const SCH_SHEET_PATH* aSheet ) const
|
|||
|
||||
if( aSheet == nullptr )
|
||||
{
|
||||
wxCHECK_MSG( Schematic(), pins, "Can't call GetPins on a symbol with no schematic" );
|
||||
wxCHECK_MSG( Schematic(), pins, wxT( "Can't call GetPins on a symbol with no schematic" ) );
|
||||
|
||||
aSheet = &Schematic()->CurrentSheet();
|
||||
}
|
||||
|
@ -1089,7 +1089,7 @@ bool SCH_SYMBOL::ReplaceInstanceSheetPath( const KIID_PATH& aOldSheetPath,
|
|||
if( it != m_instanceReferences.end() )
|
||||
{
|
||||
wxLogTrace( traceSchSheetPaths,
|
||||
"Replacing sheet path %s\n with sheet path %s\n for symbol %s.",
|
||||
wxT( "Replacing sheet path %s\n with sheet path %s\n for symbol %s." ),
|
||||
aOldSheetPath.AsString(), aNewSheetPath.AsString(), m_Uuid.AsString() );
|
||||
|
||||
it->m_Path = aNewSheetPath;
|
||||
|
@ -1097,7 +1097,7 @@ bool SCH_SYMBOL::ReplaceInstanceSheetPath( const KIID_PATH& aOldSheetPath,
|
|||
}
|
||||
|
||||
wxLogTrace( traceSchSheetPaths,
|
||||
"Could not find sheet path %s\n to replace with sheet path %s\n for symbol %s.",
|
||||
wxT( "Could not find sheet path %s\n to replace with sheet path %s\n for symbol %s." ),
|
||||
aOldSheetPath.AsString(), aNewSheetPath.AsString(), m_Uuid.AsString() );
|
||||
|
||||
return false;
|
||||
|
@ -1204,7 +1204,7 @@ void SCH_SYMBOL::SetOrientation( int aOrientation )
|
|||
|
||||
default:
|
||||
transform = false;
|
||||
wxFAIL_MSG( "Invalid schematic symbol orientation type." );
|
||||
wxFAIL_MSG( wxT( "Invalid schematic symbol orientation type." ) );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1261,7 +1261,7 @@ int SCH_SYMBOL::GetOrientation()
|
|||
}
|
||||
|
||||
// Error: orientation not found in list (should not happen)
|
||||
wxFAIL_MSG( "Schematic symbol orientation matrix internal error." );
|
||||
wxFAIL_MSG( wxT( "Schematic symbol orientation matrix internal error." ) );
|
||||
m_transform = transform;
|
||||
|
||||
return SYM_NORMAL;
|
||||
|
|
|
@ -92,7 +92,7 @@ bool IncrementLabelMember( wxString& name, int aIncrement )
|
|||
{
|
||||
name.Remove( ii + 1 );
|
||||
//write out a format string with correct number of leading zeroes
|
||||
outputFormat.Printf( "%%0%dd", dCount );
|
||||
outputFormat.Printf( wxT( "%%0%dd" ), dCount );
|
||||
//write out the number using the format string
|
||||
outputNumber.Printf( outputFormat, number );
|
||||
name << outputNumber << suffix;
|
||||
|
@ -154,7 +154,7 @@ LABEL_SPIN_STYLE LABEL_SPIN_STYLE::RotateCW()
|
|||
case LABEL_SPIN_STYLE::UP: newSpin = LABEL_SPIN_STYLE::RIGHT; break;
|
||||
case LABEL_SPIN_STYLE::RIGHT: newSpin = LABEL_SPIN_STYLE::BOTTOM; break;
|
||||
case LABEL_SPIN_STYLE::BOTTOM: newSpin = LABEL_SPIN_STYLE::LEFT; break;
|
||||
default: wxLogWarning( "RotateCW encountered unknown current spin style" ); break;
|
||||
default: wxLogWarning( wxT( "RotateCW encountered unknown current spin style" ) ); break;
|
||||
}
|
||||
|
||||
return LABEL_SPIN_STYLE( newSpin );
|
||||
|
@ -171,7 +171,7 @@ LABEL_SPIN_STYLE LABEL_SPIN_STYLE::RotateCCW()
|
|||
case LABEL_SPIN_STYLE::BOTTOM: newSpin = LABEL_SPIN_STYLE::RIGHT; break;
|
||||
case LABEL_SPIN_STYLE::RIGHT: newSpin = LABEL_SPIN_STYLE::UP; break;
|
||||
case LABEL_SPIN_STYLE::UP: newSpin = LABEL_SPIN_STYLE::LEFT; break;
|
||||
default: wxLogWarning( "RotateCCW encountered unknown current spin style" ); break;
|
||||
default: wxLogWarning( wxT( "RotateCCW encountered unknown current spin style" ) ); break;
|
||||
}
|
||||
|
||||
return LABEL_SPIN_STYLE( newSpin );
|
||||
|
@ -188,7 +188,7 @@ LABEL_SPIN_STYLE LABEL_SPIN_STYLE::MirrorX()
|
|||
case LABEL_SPIN_STYLE::BOTTOM: newSpin = LABEL_SPIN_STYLE::UP; break;
|
||||
case LABEL_SPIN_STYLE::LEFT: break;
|
||||
case LABEL_SPIN_STYLE::RIGHT: break;
|
||||
default: wxLogWarning( "MirrorX encountered unknown current spin style" ); break;
|
||||
default: wxLogWarning( wxT( "MirrorX encountered unknown current spin style" ) ); break;
|
||||
}
|
||||
|
||||
return LABEL_SPIN_STYLE( newSpin );
|
||||
|
@ -205,7 +205,7 @@ LABEL_SPIN_STYLE LABEL_SPIN_STYLE::MirrorY()
|
|||
case LABEL_SPIN_STYLE::RIGHT: newSpin = LABEL_SPIN_STYLE::LEFT; break;
|
||||
case LABEL_SPIN_STYLE::UP: break;
|
||||
case LABEL_SPIN_STYLE::BOTTOM: break;
|
||||
default: wxLogWarning( "MirrorY encountered unknown current spin style" ); break;
|
||||
default: wxLogWarning( wxT( "MirrorY encountered unknown current spin style" ) ); break;
|
||||
}
|
||||
|
||||
return LABEL_SPIN_STYLE( newSpin );
|
||||
|
@ -336,7 +336,7 @@ void SCH_TEXT::SetLabelSpinStyle( LABEL_SPIN_STYLE aSpinStyle )
|
|||
switch( aSpinStyle )
|
||||
{
|
||||
default:
|
||||
wxASSERT_MSG( 1, "Bad spin style" );
|
||||
wxASSERT_MSG( 1, wxT( "Bad spin style" ) );
|
||||
break;
|
||||
|
||||
case LABEL_SPIN_STYLE::RIGHT: // Horiz Normal Orientation
|
||||
|
@ -647,13 +647,13 @@ wxString SCH_TEXT::GetShownText( int aDepth ) const
|
|||
|
||||
wxString text = EDA_TEXT::GetShownText();
|
||||
|
||||
if( text == "~" ) // Legacy placeholder for empty string
|
||||
if( text == wxT( "~" ) ) // Legacy placeholder for empty string
|
||||
{
|
||||
text = "";
|
||||
}
|
||||
else if( HasTextVars() )
|
||||
{
|
||||
wxCHECK_MSG( Schematic(), wxEmptyString, "No parent SCHEMATIC set for SCH_TEXT!" );
|
||||
wxCHECK_MSG( Schematic(), wxEmptyString, wxT( "No parent SCHEMATIC set for SCH_TEXT!" ) );
|
||||
|
||||
PROJECT* project = nullptr;
|
||||
|
||||
|
@ -859,7 +859,7 @@ bool SCH_LABEL::IsType( const KICAD_T aScanTypes[] ) const
|
|||
if( SCH_ITEM::IsType( aScanTypes ) )
|
||||
return true;
|
||||
|
||||
wxCHECK_MSG( Schematic(), false, "No parent SCHEMATIC set for SCH_LABEL!" );
|
||||
wxCHECK_MSG( Schematic(), false, wxT( "No parent SCHEMATIC set for SCH_LABEL!" ) );
|
||||
|
||||
SCH_SHEET_PATH current = Schematic()->CurrentSheet();
|
||||
|
||||
|
@ -1065,7 +1065,7 @@ void SCH_GLOBALLABEL::SetLabelSpinStyle( LABEL_SPIN_STYLE aSpinStyle )
|
|||
switch( aSpinStyle )
|
||||
{
|
||||
default:
|
||||
wxASSERT_MSG( 1, "Bad spin style" );
|
||||
wxASSERT_MSG( 1, wxT( "Bad spin style" ) );
|
||||
m_spin_style = LABEL_SPIN_STYLE::RIGHT;
|
||||
KI_FALLTHROUGH;
|
||||
|
||||
|
@ -1268,7 +1268,7 @@ bool SCH_GLOBALLABEL::ResolveTextVar( wxString* token, int aDepth ) const
|
|||
|
||||
if( it == Schematic()->GetPageRefsMap().end() )
|
||||
{
|
||||
ref = "?";
|
||||
ref = wxT( "?" );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1572,7 +1572,7 @@ void SCH_HIERLABEL::SetLabelSpinStyle( LABEL_SPIN_STYLE aSpinStyle )
|
|||
switch( aSpinStyle )
|
||||
{
|
||||
default:
|
||||
wxLogWarning( "SetLabelSpinStyle bad spin style" );
|
||||
wxLogWarning( wxT( "SetLabelSpinStyle bad spin style" ) );
|
||||
break;
|
||||
|
||||
case LABEL_SPIN_STYLE::LEFT:
|
||||
|
@ -1606,7 +1606,7 @@ void SCH_HIERLABEL::SetLabelSpinStyle( LABEL_SPIN_STYLE aSpinStyle )
|
|||
|
||||
void SCH_HIERLABEL::Print( const RENDER_SETTINGS* aSettings, const wxPoint& offset )
|
||||
{
|
||||
wxCHECK_RET( Schematic(), "No parent SCHEMATIC set for SCH_LABEL!" );
|
||||
wxCHECK_RET( Schematic(), wxT( "No parent SCHEMATIC set for SCH_LABEL!" ) );
|
||||
|
||||
static std::vector <wxPoint> Poly;
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ void SCHEMATIC::SetProject( PROJECT* aPrj )
|
|||
|
||||
void SCHEMATIC::SetRoot( SCH_SHEET* aRootSheet )
|
||||
{
|
||||
wxCHECK_RET( aRootSheet, "Call to SetRoot with null SCH_SHEET!" );
|
||||
wxCHECK_RET( aRootSheet, wxT( "Call to SetRoot with null SCH_SHEET!" ) );
|
||||
|
||||
m_rootSheet = aRootSheet;
|
||||
|
||||
|
@ -131,7 +131,7 @@ bool SCHEMATIC::ResolveTextVar( wxString* token, int aDepth ) const
|
|||
}
|
||||
else if( token->IsSameAs( wxT( "##" ) ) )
|
||||
{
|
||||
*token = wxString::Format( "%i", Root().CountSheets() );
|
||||
*token = wxString::Format( wxT( "%i" ), Root().CountSheets() );
|
||||
return true;
|
||||
}
|
||||
else if( token->IsSameAs( wxT( "SHEETNAME" ) ) )
|
||||
|
@ -267,7 +267,7 @@ bool SCHEMATIC::ResolveCrossReference( wxString* token, int aDepth ) const
|
|||
if( refSymbol->ResolveTextVar( &remainder, aDepth + 1 ) )
|
||||
*token = remainder;
|
||||
else
|
||||
*token = refSymbol->GetRef( &sheetPath, true ) + ":" + remainder;
|
||||
*token = refSymbol->GetRef( &sheetPath, true ) + wxT( ":" ) + remainder;
|
||||
|
||||
return true; // Cross-reference is resolved whether or not the actual textvar was
|
||||
}
|
||||
|
@ -323,13 +323,13 @@ wxString SCHEMATIC::ConvertRefsToKIIDs( const wxString& aSource ) const
|
|||
|
||||
if( ref == refSymbol->GetRef( &references[ jj ].GetSheetPath(), true ) )
|
||||
{
|
||||
token = refSymbol->m_Uuid.AsString() + ":" + remainder;
|
||||
token = refSymbol->m_Uuid.AsString() + wxT( ":" ) + remainder;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
newbuf.append( "${" + token + "}" );
|
||||
newbuf.append( wxT( "${" ) + token + wxT( "}" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -376,11 +376,11 @@ wxString SCHEMATIC::ConvertKIIDsToRefs( const wxString& aSource ) const
|
|||
if( refItem && refItem->Type() == SCH_SYMBOL_T )
|
||||
{
|
||||
SCH_SYMBOL* refSymbol = static_cast<SCH_SYMBOL*>( refItem );
|
||||
token = refSymbol->GetRef( &refSheetPath, true ) + ":" + remainder;
|
||||
token = refSymbol->GetRef( &refSheetPath, true ) + wxT( ":" ) + remainder;
|
||||
}
|
||||
}
|
||||
|
||||
newbuf.append( "${" + token + "}" );
|
||||
newbuf.append( wxT( "${" ) + token + wxT( "}" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -124,7 +124,7 @@ bool SCH_EDIT_FRAME::LoadSheetFromFile( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHier
|
|||
|
||||
if( !fileName.IsAbsolute() && !fileName.MakeAbsolute() )
|
||||
{
|
||||
wxFAIL_MSG( wxString::Format( "Cannot make file name '%s' path absolute.", aFileName ) );
|
||||
wxFAIL_MSG( wxString::Format( wxT( "Cannot make file name '%s' path absolute." ), aFileName ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -181,7 +181,7 @@ bool SCH_EDIT_FRAME::LoadSheetFromFile( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHier
|
|||
topLevelSheetPath = fileName.GetPathWithSep();
|
||||
|
||||
if( wxFileName::GetPathSeparator() == '\\' )
|
||||
topLevelSheetPath.Replace( "\\", "/" );
|
||||
topLevelSheetPath.Replace( wxT( "\\" ), wxT( "/" ) );
|
||||
}
|
||||
|
||||
// Make sure any new sheet changes do not cause any recursion issues.
|
||||
|
@ -353,7 +353,7 @@ bool SCH_EDIT_FRAME::LoadSheetFromFile( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHier
|
|||
wxString thisURI = thisRow->GetFullURI( true );
|
||||
wxString otherURI = otherRow->GetFullURI( false);
|
||||
|
||||
if( otherURI.Contains( "${KIPRJMOD}" ) || otherURI.Contains( "$(KIPRJMOD)" ) )
|
||||
if( otherURI.Contains( wxT( "${KIPRJMOD}" ) ) || otherURI.Contains( wxT( "$(KIPRJMOD)" ) ) )
|
||||
{
|
||||
// Cannot use relative paths here, "${KIPRJMOD}../path-to-cache-lib" does
|
||||
// not expand to a valid symbol library path.
|
||||
|
@ -403,7 +403,7 @@ bool SCH_EDIT_FRAME::LoadSheetFromFile( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHier
|
|||
wxString uri = table.GetFullURI( libName, false );
|
||||
wxFileName newLib;
|
||||
|
||||
if( uri.Contains( "${KIPRJMOD}" ) || uri.Contains( "$(KIPRJMOD)" ) )
|
||||
if( uri.Contains( wxT( "${KIPRJMOD}" ) ) || uri.Contains( wxT( "$(KIPRJMOD)" ) ) )
|
||||
{
|
||||
// Cannot use relative paths here, "${KIPRJMOD}../path-to-cache-lib" does
|
||||
// not expand to a valid symbol library path.
|
||||
|
@ -434,7 +434,7 @@ bool SCH_EDIT_FRAME::LoadSheetFromFile( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHier
|
|||
}
|
||||
|
||||
SCH_SCREEN* newScreen = newSheet->GetScreen();
|
||||
wxCHECK_MSG( newScreen, false, "No screen defined for sheet." );
|
||||
wxCHECK_MSG( newScreen, false, wxT( "No screen defined for sheet." ) );
|
||||
|
||||
if( libTableChanged )
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@ wxString NETLIST_EXPORTER_PSPICE_SIM::ComponentToVector(
|
|||
// Replace these forbidden chars to find the actual spice net name
|
||||
NETLIST_EXPORTER_PSPICE::ReplaceForbiddenChars( spicenet );
|
||||
|
||||
return wxString::Format( "V(%s)", spicenet );
|
||||
return wxString::Format( wxT( "V(%s)" ), spicenet );
|
||||
}
|
||||
|
||||
else if( aType & SPT_CURRENT )
|
||||
|
@ -59,13 +59,13 @@ wxString NETLIST_EXPORTER_PSPICE_SIM::ComponentToVector(
|
|||
|
||||
if( device.length() > 0 && device[0] == 'x' )
|
||||
{
|
||||
return "current probe of .subckt not yet implemented";
|
||||
return wxT( "current probe of .subckt not yet implemented" );
|
||||
}
|
||||
else
|
||||
{
|
||||
return wxString::Format( "@%s[%s]",
|
||||
return wxString::Format( wxT( "@%s[%s]" ),
|
||||
device,
|
||||
param.IsEmpty() ? "i" : param );
|
||||
param.IsEmpty() ? wxT( "i" ) : param );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ SIM_PLOT_TYPE NETLIST_EXPORTER_PSPICE_SIM::VectorToSignal(
|
|||
if( !internalDevParameter.Matches( vector ) )
|
||||
{
|
||||
// any text is a node name, which returns voltage
|
||||
aSignal = "V(" + aVector + ")";
|
||||
aSignal = wxT( "V(" ) + aVector + wxT( ")" );
|
||||
return SPT_VOLTAGE;
|
||||
}
|
||||
else
|
||||
|
@ -96,8 +96,8 @@ SIM_PLOT_TYPE NETLIST_EXPORTER_PSPICE_SIM::VectorToSignal(
|
|||
{
|
||||
// this is a branch current
|
||||
paramType[0] = 'I';
|
||||
aSignal = paramType + "(";
|
||||
aSignal += internalDevParameter.GetMatch( vector, 1 ).Upper() + ")";
|
||||
aSignal = paramType + wxT( "(" );
|
||||
aSignal += internalDevParameter.GetMatch( vector, 1 ).Upper() + wxT( ")" );
|
||||
return SPT_CURRENT;
|
||||
}
|
||||
else
|
||||
|
@ -110,10 +110,10 @@ SIM_PLOT_TYPE NETLIST_EXPORTER_PSPICE_SIM::VectorToSignal(
|
|||
|
||||
const std::vector<wxString>& NETLIST_EXPORTER_PSPICE_SIM::GetCurrents( SPICE_PRIMITIVE aPrimitive )
|
||||
{
|
||||
static const std::vector<wxString> passive = { "I" };
|
||||
static const std::vector<wxString> diode = { "Id" };
|
||||
static const std::vector<wxString> bjt = { "Ib", "Ic", "Ie" };
|
||||
static const std::vector<wxString> mos = { "Ig", "Id", "Is" };
|
||||
static const std::vector<wxString> passive = { wxT( "I" ) };
|
||||
static const std::vector<wxString> diode = { wxT( "Id" ) };
|
||||
static const std::vector<wxString> bjt = { wxT( "Ib" ), wxT( "Ic" ), wxT( "Ie" ) };
|
||||
static const std::vector<wxString> mos = { wxT( "Ig" ), wxT( "Id" ), wxT( "Is" ) };
|
||||
static const std::vector<wxString> empty;
|
||||
|
||||
switch( aPrimitive )
|
||||
|
@ -148,7 +148,7 @@ wxString NETLIST_EXPORTER_PSPICE_SIM::GetSheetSimCommand()
|
|||
for( const auto& dir : GetDirectives() )
|
||||
{
|
||||
if( IsSimCommand( dir ) )
|
||||
simCmd += wxString::Format( "%s\r\n", dir );
|
||||
simCmd += wxString::Format( wxT( "%s\r\n" ), dir );
|
||||
}
|
||||
|
||||
return simCmd;
|
||||
|
@ -170,15 +170,15 @@ SIM_TYPE NETLIST_EXPORTER_PSPICE_SIM::GetSimType()
|
|||
SIM_TYPE NETLIST_EXPORTER_PSPICE_SIM::CommandToSimType( const wxString& aCmd )
|
||||
{
|
||||
const std::vector<std::pair<wxString, SIM_TYPE>> simCmds = {
|
||||
{ "^.ac\\M.*", ST_AC },
|
||||
{ "^.dc\\M.*", ST_DC },
|
||||
{ "^.tran\\M.*", ST_TRANSIENT },
|
||||
{ "^.op\\M.*", ST_OP },
|
||||
{ "^.disto\\M.*", ST_DISTORTION },
|
||||
{ "^.noise\\M.*", ST_NOISE },
|
||||
{ "^.pz\\M.*", ST_POLE_ZERO },
|
||||
{ "^.sens\\M.*", ST_SENSITIVITY },
|
||||
{ "^.tf\\M.*", ST_TRANS_FUNC } };
|
||||
{ wxT( "^.ac\\M.*" ), ST_AC },
|
||||
{ wxT( "^.dc\\M.*" ), ST_DC },
|
||||
{ wxT( "^.tran\\M.*" ), ST_TRANSIENT },
|
||||
{ wxT( "^.op\\M.*" ), ST_OP },
|
||||
{ wxT( "^.disto\\M.*" ), ST_DISTORTION },
|
||||
{ wxT( "^.noise\\M.*" ), ST_NOISE },
|
||||
{ wxT( "^.pz\\M.*" ), ST_POLE_ZERO },
|
||||
{ wxT( "^.sens\\M.*" ), ST_SENSITIVITY },
|
||||
{ wxT( "^.tf\\M.*" ), ST_TRANS_FUNC } };
|
||||
wxRegEx simCmd;
|
||||
|
||||
for( const auto& c : simCmds )
|
||||
|
@ -196,7 +196,7 @@ SIM_TYPE NETLIST_EXPORTER_PSPICE_SIM::CommandToSimType( const wxString& aCmd )
|
|||
bool NETLIST_EXPORTER_PSPICE_SIM::ParseDCCommand( const wxString& aCmd, SPICE_DC_PARAMS* aSource1,
|
||||
SPICE_DC_PARAMS* aSource2 )
|
||||
{
|
||||
if( !aCmd.Lower().StartsWith( ".dc" ) )
|
||||
if( !aCmd.Lower().StartsWith( wxT( ".dc" ) ) )
|
||||
return false;
|
||||
|
||||
wxString cmd = aCmd.Mid( 3 ).Trim().Trim( false );
|
||||
|
@ -251,7 +251,7 @@ void NETLIST_EXPORTER_PSPICE_SIM::writeDirectives( OUTPUTFORMATTER* aFormatter,
|
|||
// Skip them
|
||||
wxString netname = ComponentToVector( netMap.first, SPT_VOLTAGE );
|
||||
|
||||
if( netname == "V(0)" || netname == "V(GND)" )
|
||||
if( netname == wxT( "V(0)" ) || netname == wxT( "V(GND)" ) )
|
||||
continue;
|
||||
|
||||
aFormatter->Print( 0, ".save %s\n", TO_UTF8( netname ) );
|
||||
|
|
|
@ -83,7 +83,7 @@ void NGSPICE::Init( const SPICE_SIMULATOR_SETTINGS* aSettings )
|
|||
|
||||
for( const std::string& command : GetSettingCommands() )
|
||||
{
|
||||
wxLogTrace( traceNgspice, "Sending Ngspice configuration command '%s'.", command );
|
||||
wxLogTrace( traceNgspice, wxT( "Sending Ngspice configuration command '%s'." ), command );
|
||||
Command( command );
|
||||
}
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ std::vector<std::string> NGSPICE::GetSettingCommands() const
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( wxString::Format( "Undefined NGSPICE_MODEL_MODE %d.",
|
||||
wxFAIL_MSG( wxString::Format( wxT( "Undefined NGSPICE_MODEL_MODE %d." ),
|
||||
settings->GetModelMode() ) );
|
||||
break;
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ void NGSPICE::init_dll()
|
|||
|
||||
// when running eeschema.app
|
||||
wxFileName( stdPaths.GetExecutablePath() ).GetPath().ToStdString() +
|
||||
"/../../../../../Contents/PlugIns/sim"
|
||||
wxT( "/../../../../../Contents/PlugIns/sim" )
|
||||
};
|
||||
#else // Unix systems
|
||||
const vector<string> dllPaths = { "/usr/local/lib" };
|
||||
|
@ -451,18 +451,18 @@ void NGSPICE::init_dll()
|
|||
for( const auto& path : dllPaths )
|
||||
{
|
||||
dllFile.SetPath( path );
|
||||
wxLogTrace( traceNgspice, "libngspice search path: %s", dllFile.GetFullPath() );
|
||||
wxLogTrace( traceNgspice, wxT( "libngspice search path: %s" ), dllFile.GetFullPath() );
|
||||
m_dll.Load( dllFile.GetFullPath(), wxDL_VERBATIM | wxDL_QUIET | wxDL_NOW );
|
||||
|
||||
if( m_dll.IsLoaded() )
|
||||
{
|
||||
wxLogTrace( traceNgspice, "libngspice path found in: %s", dllFile.GetFullPath() );
|
||||
wxLogTrace( traceNgspice, wxT( "libngspice path found in: %s" ), dllFile.GetFullPath() );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( !m_dll.IsLoaded() ) // try also the system libraries
|
||||
m_dll.Load( wxDynamicLibrary::CanonicalizeName( "ngspice" ) );
|
||||
m_dll.Load( wxDynamicLibrary::CanonicalizeName( wxT( "ngspice" ) ) );
|
||||
#else
|
||||
// First, try the system libraries
|
||||
m_dll.Load( NGSPICE_DLL_FILE, wxDL_VERBATIM | wxDL_QUIET | wxDL_NOW );
|
||||
|
@ -473,12 +473,12 @@ void NGSPICE::init_dll()
|
|||
for( const auto& path : dllPaths )
|
||||
{
|
||||
dllFile.SetPath( path );
|
||||
wxLogTrace( traceNgspice, "libngspice search path: %s", dllFile.GetFullPath() );
|
||||
wxLogTrace( traceNgspice, wxT( "libngspice search path: %s" ), dllFile.GetFullPath() );
|
||||
m_dll.Load( dllFile.GetFullPath(), wxDL_VERBATIM | wxDL_QUIET | wxDL_NOW );
|
||||
|
||||
if( m_dll.IsLoaded() )
|
||||
{
|
||||
wxLogTrace( traceNgspice, "libngspice path found in: %s", dllFile.GetFullPath() );
|
||||
wxLogTrace( traceNgspice, wxT( "libngspice path found in: %s" ), dllFile.GetFullPath() );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -535,11 +535,11 @@ void NGSPICE::init_dll()
|
|||
|
||||
for( const auto& path : spiceinitPaths )
|
||||
{
|
||||
wxLogTrace( traceNgspice, "ngspice init script search path: %s", path );
|
||||
wxLogTrace( traceNgspice, wxT( "ngspice init script search path: %s" ), path );
|
||||
|
||||
if( loadSpinit( path + "/spiceinit" ) )
|
||||
{
|
||||
wxLogTrace( traceNgspice, "ngspice path found in: %s", path );
|
||||
wxLogTrace( traceNgspice, wxT( "ngspice path found in: %s" ), path );
|
||||
foundSpiceinit = true;
|
||||
break;
|
||||
}
|
||||
|
@ -600,11 +600,11 @@ string NGSPICE::findCmPath() const
|
|||
|
||||
for( const auto& path : cmPaths )
|
||||
{
|
||||
wxLogTrace( traceNgspice, "ngspice code models search path: %s", path );
|
||||
wxLogTrace( traceNgspice, wxT( "ngspice code models search path: %s" ), path );
|
||||
|
||||
if( wxFileName::FileExists( path + "/spice2poly.cm" ) )
|
||||
if( wxFileName::FileExists( path + wxT( "/spice2poly.cm" ) ) )
|
||||
{
|
||||
wxLogTrace( traceNgspice, "ngspice code models found in: %s", path );
|
||||
wxLogTrace( traceNgspice, wxT( "ngspice code models found in: %s" ), path );
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ static wxString formatFloat( double x, int nDigits )
|
|||
|
||||
if( nDigits )
|
||||
{
|
||||
fmt.Printf( "%%.0%df", nDigits );
|
||||
fmt.Printf( wxT( "%%.0%df" ), nDigits );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -168,28 +168,28 @@ SYMBOL_EDIT_FRAME::SYMBOL_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
m_auimgr.SetManagedWindow( this );
|
||||
|
||||
CreateInfoBar();
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" )
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( wxT( "MainToolbar" ) )
|
||||
.Top().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" )
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( wxT( "MsgPanel" ) )
|
||||
.Bottom().Layer( 6 ) );
|
||||
|
||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" )
|
||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( wxT( "OptToolbar" ) )
|
||||
.Left().Layer( 3 ) );
|
||||
m_auimgr.AddPane( m_treePane, EDA_PANE().Palette().Name( "SymbolTree" )
|
||||
m_auimgr.AddPane( m_treePane, EDA_PANE().Palette().Name( wxT( "SymbolTree" ) )
|
||||
.Left().Layer( 2 )
|
||||
.Caption( _( "Libraries" ) )
|
||||
.MinSize( 250, -1 ).BestSize( 250, -1 ) );
|
||||
m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( "ToolsToolbar" )
|
||||
m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( wxT( "ToolsToolbar" ) )
|
||||
.Right().Layer( 2 ) );
|
||||
|
||||
m_auimgr.AddPane( GetCanvas(), wxAuiPaneInfo().Name( "DrawFrame" )
|
||||
m_auimgr.AddPane( GetCanvas(), wxAuiPaneInfo().Name( wxT( "DrawFrame" ) )
|
||||
.CentrePane() );
|
||||
|
||||
FinishAUIInitialization();
|
||||
|
||||
if( m_settings->m_LibWidth > 0 )
|
||||
{
|
||||
wxAuiPaneInfo& treePane = m_auimgr.GetPane( "SymbolTree" );
|
||||
wxAuiPaneInfo& treePane = m_auimgr.GetPane( wxT( "SymbolTree" ) );
|
||||
|
||||
// wxAUI hack: force width by setting MinSize() and then Fixed()
|
||||
// thanks to ZenJu http://trac.wxwidgets.org/ticket/13180
|
||||
|
@ -265,7 +265,7 @@ SYMBOL_EDIT_FRAME::~SYMBOL_EDIT_FRAME()
|
|||
|
||||
void SYMBOL_EDIT_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
||||
{
|
||||
wxCHECK_RET( m_settings, "Call to SYMBOL_EDIT_FRAME::LoadSettings with null m_boardAdapter" );
|
||||
wxCHECK_RET( m_settings, wxT( "Call to SYMBOL_EDIT_FRAME::LoadSettings with null m_boardAdapter" ) );
|
||||
|
||||
SCH_BASE_FRAME::LoadSettings( GetSettings() );
|
||||
|
||||
|
@ -280,7 +280,7 @@ void SYMBOL_EDIT_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
|||
|
||||
void SYMBOL_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
||||
{
|
||||
wxCHECK_RET( m_settings, "Call to SYMBOL_EDIT_FRAME::LoadSettings with null m_boardAdapter" );
|
||||
wxCHECK_RET( m_settings, wxT( "Call to SYMBOL_EDIT_FRAME::LoadSettings with null m_boardAdapter" ) );
|
||||
|
||||
GetGalDisplayOptions().m_axesEnabled = true;
|
||||
|
||||
|
@ -807,7 +807,7 @@ void SYMBOL_EDIT_FRAME::OnModify()
|
|||
|
||||
m_treePane->GetLibTree()->RefreshLibTree();
|
||||
|
||||
if( !GetTitle().StartsWith( "*" ) )
|
||||
if( !GetTitle().StartsWith( wxT( "*" ) ) )
|
||||
updateTitle();
|
||||
}
|
||||
|
||||
|
@ -968,7 +968,7 @@ void SYMBOL_EDIT_FRAME::SyncLibraries( bool aShowProgress, const wxString& aForc
|
|||
// Try to select the parent library, in case the symbol is not found
|
||||
if( !found && selected.IsValid() )
|
||||
{
|
||||
selected.SetLibItemName( "" );
|
||||
selected.SetLibItemName( wxT( "" ) );
|
||||
found = m_libMgr->GetAdapter()->FindItem( selected );
|
||||
|
||||
if( found )
|
||||
|
@ -1375,7 +1375,7 @@ bool SYMBOL_EDIT_FRAME::addLibTableEntry( const wxString& aLibFile, TABLE_SCOPE
|
|||
|
||||
while( libTable->HasLibrary( libNickname ) )
|
||||
{
|
||||
tmp.Printf( "%s%d", fn.GetName(), suffix );
|
||||
tmp.Printf( wxT( "%s%d" ), fn.GetName(), suffix );
|
||||
libNickname = tmp;
|
||||
suffix += 1;
|
||||
}
|
||||
|
@ -1449,7 +1449,7 @@ bool SYMBOL_EDIT_FRAME::replaceLibTableEntry( const wxString& aLibNickname,
|
|||
wxString normalizedPath = NormalizePath( aLibFile, &envVars, projectPath );
|
||||
|
||||
row->SetFullURI( normalizedPath );
|
||||
row->SetType( "KiCad" );
|
||||
row->SetType( wxT( "KiCad" ) );
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -342,7 +342,7 @@ bool SYMBOL_EDIT_FRAME::LoadOneLibrarySymbolAux( LIB_SYMBOL* aEntry, const wxStr
|
|||
|
||||
if( aEntry->GetName().IsEmpty() )
|
||||
{
|
||||
wxLogWarning( "Symbol in library '%s' has empty name field.", aLibrary );
|
||||
wxLogWarning( wxT( "Symbol in library '%s' has empty name field." ), aLibrary );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -437,7 +437,7 @@ void SYMBOL_EDIT_FRAME::CreateNewSymbol()
|
|||
wxString name = dlg.GetName();
|
||||
|
||||
// Currently, symbol names cannot include a space, that breaks libraries:
|
||||
name.Replace( " ", "_" );
|
||||
name.Replace( wxT( " " ), wxT( "_" ) );
|
||||
|
||||
// Test if there is a symbol with this name already.
|
||||
if( !lib.empty() && m_libMgr->SymbolExists( name, lib ) )
|
||||
|
@ -686,7 +686,7 @@ void SYMBOL_EDIT_FRAME::saveSymbolAs()
|
|||
wxString new_name = nameTextCtrl->GetValue();
|
||||
new_name.Trim( true );
|
||||
new_name.Trim( false );
|
||||
new_name.Replace( " ", "_" );
|
||||
new_name.Replace( wxT( " " ), wxT( "_" ) );
|
||||
|
||||
if( new_name.IsEmpty() )
|
||||
{
|
||||
|
@ -864,7 +864,7 @@ void SYMBOL_EDIT_FRAME::DuplicateSymbol( bool aFromClipboard )
|
|||
}
|
||||
catch( IO_ERROR& e )
|
||||
{
|
||||
wxLogMessage( "Can not paste: %s", e.Problem() );
|
||||
wxLogMessage( wxT( "Can not paste: %s" ), e.Problem() );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -911,7 +911,7 @@ void SYMBOL_EDIT_FRAME::ensureUniqueName( LIB_SYMBOL* aSymbol, const wxString& a
|
|||
|
||||
// Append a number to the name until the name is unique in the library.
|
||||
while( m_libMgr->SymbolExists( newName, aLibrary ) )
|
||||
newName.Printf( "%s_%d", aSymbol->GetName(), i++ );
|
||||
newName.Printf( wxT( "%s_%d" ), aSymbol->GetName(), i++ );
|
||||
|
||||
aSymbol->SetName( newName );
|
||||
}
|
||||
|
@ -978,7 +978,7 @@ void SYMBOL_EDIT_FRAME::Revert( bool aConfirm )
|
|||
|
||||
void SYMBOL_EDIT_FRAME::RevertAll()
|
||||
{
|
||||
wxCHECK_RET( m_libMgr, "Library manager object not created." );
|
||||
wxCHECK_RET( m_libMgr, wxT( "Library manager object not created." ) );
|
||||
|
||||
Revert( false );
|
||||
m_libMgr->RevertAll();
|
||||
|
@ -1075,7 +1075,7 @@ bool SYMBOL_EDIT_FRAME::saveLibrary( const wxString& aLibrary, bool aNewFile )
|
|||
ClearMsgPanel();
|
||||
|
||||
// Copy .kicad_symb file to .bak.
|
||||
if( !backupFile( fn, "bak" ) )
|
||||
if( !backupFile( fn, wxT( "bak" ) ) )
|
||||
return false;
|
||||
|
||||
if( !m_libMgr->SaveLibrary( aLibrary, fn.GetFullPath(), fileType ) )
|
||||
|
|
|
@ -48,8 +48,8 @@ void SYMBOL_EDIT_FRAME::ImportSymbol()
|
|||
}
|
||||
|
||||
wxString wildcards = AllSymbolLibFilesWildcard()
|
||||
+ "|" + KiCadSymbolLibFileWildcard()
|
||||
+ "|" + LegacySymbolLibFileWildcard();
|
||||
+ wxT( "|" ) + KiCadSymbolLibFileWildcard()
|
||||
+ wxT( "|" ) + LegacySymbolLibFileWildcard();
|
||||
|
||||
wxFileDialog dlg( this, _( "Import Symbol" ), m_mruPath, wxEmptyString,
|
||||
wildcards, wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
void SYMBOL_EDIT_FRAME::SaveCopyInUndoList( EDA_ITEM* aItem, UNDO_REDO aUndoType, bool aAppend )
|
||||
{
|
||||
wxASSERT_MSG( !aAppend, "Append not needed/supported for symbol editor" );
|
||||
wxASSERT_MSG( !aAppend, wxT( "Append not needed/supported for symbol editor" ) );
|
||||
|
||||
if( !aItem )
|
||||
return;
|
||||
|
|
|
@ -106,7 +106,7 @@ void SYMBOL_LIBRARY_MANAGER::Preload( PROGRESS_REPORTER& aReporter )
|
|||
dlg.MessageSet( _( "Errors loading symbols:" ) );
|
||||
|
||||
wxString msg = loader.GetErrors();
|
||||
msg.Replace( "\n", "<BR>" );
|
||||
msg.Replace( wxT( "\n" ), wxT( "<BR>" ) );
|
||||
|
||||
dlg.AddHTML_Text( msg );
|
||||
dlg.ShowModal();
|
||||
|
@ -191,7 +191,7 @@ bool SYMBOL_LIBRARY_MANAGER::SaveLibrary( const wxString& aLibrary, const wxStri
|
|||
bool res = true; // assume all libraries are successfully saved
|
||||
|
||||
PROPERTIES properties;
|
||||
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, "" );
|
||||
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, wxT( "" ) );
|
||||
|
||||
auto it = m_libs.find( aLibrary );
|
||||
|
||||
|
@ -238,7 +238,7 @@ bool SYMBOL_LIBRARY_MANAGER::SaveLibrary( const wxString& aLibrary, const wxStri
|
|||
std::shared_ptr< LIB_SYMBOL > oldParent = symbol->GetParent().lock();
|
||||
|
||||
wxCHECK_MSG( oldParent, false,
|
||||
wxString::Format( "Derived symbol '%s' found with undefined parent.",
|
||||
wxString::Format( wxT( "Derived symbol '%s' found with undefined parent." ),
|
||||
symbol->GetName() ) );
|
||||
|
||||
LIB_SYMBOL* libParent = pi->LoadSymbol( aLibrary, oldParent->GetName(),
|
||||
|
@ -408,7 +408,7 @@ LIB_SYMBOL* SYMBOL_LIBRARY_MANAGER::GetBufferedSymbol( const wxString& aAlias,
|
|||
{
|
||||
std::shared_ptr< LIB_SYMBOL > parent = symbol->GetParent().lock();
|
||||
wxCHECK_MSG( parent, nullptr,
|
||||
wxString::Format( "Derived symbol '%s' found with undefined parent.",
|
||||
wxString::Format( wxT( "Derived symbol '%s' found with undefined parent." ),
|
||||
symbol->GetName() ) );
|
||||
|
||||
// Check if the parent symbol buffer has already be created.
|
||||
|
@ -660,17 +660,17 @@ bool SYMBOL_LIBRARY_MANAGER::LibraryExists( const wxString& aLibrary, bool aChec
|
|||
|
||||
wxString SYMBOL_LIBRARY_MANAGER::GetUniqueLibraryName() const
|
||||
{
|
||||
wxString name = "New_Library";
|
||||
wxString name = wxT( "New_Library" );
|
||||
|
||||
if( !LibraryExists( name ) )
|
||||
return name;
|
||||
|
||||
name += "_";
|
||||
name += wxT( "_" );
|
||||
|
||||
for( unsigned int i = 0; i < std::numeric_limits<unsigned int>::max(); ++i )
|
||||
{
|
||||
if( !LibraryExists( name + wxString::Format( "%u", i ) ) )
|
||||
return name + wxString::Format( "%u", i );
|
||||
if( !LibraryExists( name + wxString::Format( wxT( "%u" ), i ) ) )
|
||||
return name + wxString::Format( wxT( "%u" ), i );
|
||||
}
|
||||
|
||||
wxFAIL;
|
||||
|
@ -797,7 +797,7 @@ SYMBOL_LIBRARY_MANAGER::LIB_BUFFER& SYMBOL_LIBRARY_MANAGER::getLibraryBuffer(
|
|||
std::shared_ptr< LIB_SYMBOL > oldParent = symbol->GetParent().lock();
|
||||
|
||||
wxCHECK_MSG( oldParent, buf,
|
||||
wxString::Format( "Derived symbol '%s' found with undefined parent.",
|
||||
wxString::Format( wxT( "Derived symbol '%s' found with undefined parent." ),
|
||||
symbol->GetName() ) );
|
||||
|
||||
LIB_SYMBOL* libParent = buf.GetSymbol( oldParent->GetName() );
|
||||
|
@ -957,7 +957,7 @@ bool SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer( std::shared_ptr<SYMBOL_BUFF
|
|||
wxCHECK( libSymbol && originalSymbol, false );
|
||||
SYMBOL_LIB_TABLE::SAVE_T result;
|
||||
PROPERTIES properties;
|
||||
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, "" );
|
||||
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, wxT( "" ) );
|
||||
|
||||
// Delete the original symbol if the symbol name has been changed.
|
||||
if( libSymbol->GetName() != originalSymbol->GetName() )
|
||||
|
@ -1049,7 +1049,7 @@ bool SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer( std::shared_ptr<SYMBOL_BUFF
|
|||
|
||||
// set properties to prevent save file on every symbol save
|
||||
PROPERTIES properties;
|
||||
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, "" );
|
||||
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, wxT( "" ) );
|
||||
|
||||
// Delete the original symbol if the symbol name has been changed.
|
||||
if( libSymbol->GetName() != originalSymbol->GetName() )
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
using namespace LIB_TABLE_T;
|
||||
|
||||
|
||||
static const wxString global_tbl_name( "sym-lib-table" );
|
||||
static const wxString global_tbl_name( wxT( "sym-lib-table" ) );
|
||||
|
||||
|
||||
const char* SYMBOL_LIB_TABLE::PropPowerSymsOnly = "pwr_sym_only";
|
||||
|
@ -289,7 +289,7 @@ void SYMBOL_LIB_TABLE::EnumerateSymbolLib( const wxString& aNickname, wxArrayStr
|
|||
wxString options = row->GetOptions();
|
||||
|
||||
if( aPowerSymbolsOnly )
|
||||
row->SetOptions( row->GetOptions() + " " + PropPowerSymsOnly );
|
||||
row->SetOptions( row->GetOptions() + wxT( " " ) + PropPowerSymsOnly );
|
||||
|
||||
row->SetLoaded( false );
|
||||
row->plugin->EnumerateSymbolLib( aAliasNames, row->GetFullURI( true ), row->GetProperties() );
|
||||
|
@ -327,7 +327,7 @@ void SYMBOL_LIB_TABLE::LoadSymbolLib( std::vector<LIB_SYMBOL*>& aSymbolList,
|
|||
wxString options = row->GetOptions();
|
||||
|
||||
if( aPowerSymbolsOnly )
|
||||
row->SetOptions( row->GetOptions() + " " + PropPowerSymsOnly );
|
||||
row->SetOptions( row->GetOptions() + wxT( " " ) + PropPowerSymsOnly );
|
||||
|
||||
row->SetLoaded( false );
|
||||
row->plugin->EnumerateSymbolLib( aSymbolList, row->GetFullURI( true ), row->GetProperties() );
|
||||
|
@ -483,7 +483,7 @@ LIB_SYMBOL* SYMBOL_LIB_TABLE::LoadSymbolWithOptionalNickname( const LIB_ID& aLib
|
|||
|
||||
const wxString SYMBOL_LIB_TABLE::GlobalPathEnvVariableName()
|
||||
{
|
||||
return "KICAD6_SYMBOL_DIR";
|
||||
return wxT( "KICAD6_SYMBOL_DIR" );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ SYMBOL_LIB::SYMBOL_LIB( SCH_LIB_TYPE aType, const wxString& aFileName,
|
|||
fileName = aFileName;
|
||||
|
||||
if( !fileName.IsOk() )
|
||||
fileName = "unnamed.lib";
|
||||
fileName = wxT( "unnamed.lib" );
|
||||
|
||||
m_plugin.reset( SCH_IO_MGR::FindPlugin( m_pluginType ) );
|
||||
m_properties = std::make_unique<PROPERTIES>();
|
||||
|
@ -75,7 +75,7 @@ SYMBOL_LIB::~SYMBOL_LIB()
|
|||
|
||||
void SYMBOL_LIB::Save( bool aSaveDocFile )
|
||||
{
|
||||
wxCHECK_RET( m_plugin != nullptr, wxString::Format( "no plugin defined for library `%s`.",
|
||||
wxCHECK_RET( m_plugin != nullptr, wxString::Format( wxT( "no plugin defined for library `%s`." ),
|
||||
fileName.GetFullPath() ) );
|
||||
|
||||
PROPERTIES props;
|
||||
|
@ -192,7 +192,7 @@ void SYMBOL_LIB::AddSymbol( LIB_SYMBOL* aSymbol )
|
|||
|
||||
LIB_SYMBOL* SYMBOL_LIB::RemoveSymbol( LIB_SYMBOL* aEntry )
|
||||
{
|
||||
wxCHECK_MSG( aEntry != nullptr, nullptr, "NULL pointer cannot be removed from library." );
|
||||
wxCHECK_MSG( aEntry != nullptr, nullptr, wxT( "NULL pointer cannot be removed from library." ) );
|
||||
|
||||
m_plugin->DeleteSymbol( fileName.GetFullPath(), aEntry->GetName(), m_properties.get() );
|
||||
|
||||
|
@ -432,7 +432,7 @@ int SYMBOL_LIBS::GetModifyHash()
|
|||
void SYMBOL_LIBS::LibNamesAndPaths( PROJECT* aProject, bool doSave,
|
||||
wxString* aPaths, wxArrayString* aNames )
|
||||
{
|
||||
wxCHECK_RET( aProject, "Null PROJECT in LibNamesAndPaths" );
|
||||
wxCHECK_RET( aProject, wxT( "Null PROJECT in LibNamesAndPaths" ) );
|
||||
|
||||
PROJECT_FILE& project = aProject->GetProjectFile();
|
||||
|
||||
|
@ -459,7 +459,7 @@ const wxString SYMBOL_LIBS::CacheName( const wxString& aFullProjectFilename )
|
|||
{
|
||||
wxFileName name = aFullProjectFilename;
|
||||
|
||||
name.SetName( name.GetName() + "-cache" );
|
||||
name.SetName( name.GetName() + wxT( "-cache" ) );
|
||||
name.SetExt( LegacySymbolLibFileExtension );
|
||||
|
||||
if( name.FileExists() )
|
||||
|
@ -510,7 +510,7 @@ void SYMBOL_LIBS::LoadAllLibraries( PROJECT* aProject, bool aShowProgress )
|
|||
// lib_names[] does not store the file extension. Set it.
|
||||
// Remember lib_names[i] can contain a '.' in name, so using a wxFileName
|
||||
// before adding the extension can create incorrect full filename
|
||||
wxString fullname = lib_names[i] + "." + LegacySymbolLibFileExtension;
|
||||
wxString fullname = lib_names[i] + wxT( "." ) + LegacySymbolLibFileExtension;
|
||||
// Now the full name is set, we can use a wxFileName.
|
||||
wxFileName fn( fullname );
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ SYMBOL_TREE_MODEL_ADAPTER::Create( EDA_BASE_FRAME* aParent, LIB_TABLE* aLibs )
|
|||
|
||||
|
||||
SYMBOL_TREE_MODEL_ADAPTER::SYMBOL_TREE_MODEL_ADAPTER( EDA_BASE_FRAME* aParent, LIB_TABLE* aLibs ) :
|
||||
LIB_TREE_MODEL_ADAPTER( aParent, "pinned_symbol_libs" ),
|
||||
LIB_TREE_MODEL_ADAPTER( aParent, wxT( "pinned_symbol_libs" ) ),
|
||||
m_libs( (SYMBOL_LIB_TABLE*) aLibs )
|
||||
{}
|
||||
|
||||
|
@ -104,7 +104,7 @@ void SYMBOL_TREE_MODEL_ADAPTER::AddLibraries( const std::vector<wxString>& aNick
|
|||
dlg.MessageSet( _( "Errors loading symbols:" ) );
|
||||
|
||||
wxString msg = loader.GetErrors();
|
||||
msg.Replace( "\n", "<BR>" );
|
||||
msg.Replace( wxT( "\n" ), wxT( "<BR>" ) );
|
||||
|
||||
dlg.AddHTML_Text( msg );
|
||||
dlg.ShowModal();
|
||||
|
|
|
@ -41,7 +41,7 @@ SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Create( SYMBOL_EDIT_FRAME* aParent,
|
|||
|
||||
SYMBOL_TREE_SYNCHRONIZING_ADAPTER::SYMBOL_TREE_SYNCHRONIZING_ADAPTER( SYMBOL_EDIT_FRAME* aParent,
|
||||
SYMBOL_LIBRARY_MANAGER* aLibMgr ) :
|
||||
LIB_TREE_MODEL_ADAPTER( aParent, "pinned_symbol_libs" ),
|
||||
LIB_TREE_MODEL_ADAPTER( aParent, wxT( "pinned_symbol_libs" ) ),
|
||||
m_frame( aParent ),
|
||||
m_libMgr( aLibMgr ),
|
||||
m_lastSyncHash( -1 )
|
||||
|
@ -226,12 +226,12 @@ void SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue( wxVariant& aVariant, wxDataVie
|
|||
if( node->m_Type == LIB_TREE_NODE::LIB )
|
||||
{
|
||||
if( m_libMgr->IsLibraryModified( node->m_Name ) )
|
||||
aVariant = aVariant.GetString() + " *";
|
||||
aVariant = aVariant.GetString() + wxT( " *" );
|
||||
}
|
||||
else if( node->m_Type == LIB_TREE_NODE::LIBID )
|
||||
{
|
||||
if( m_libMgr->IsSymbolModified( node->m_Name, node->m_Parent->m_Name ) )
|
||||
aVariant = aVariant.GetString() + " *";
|
||||
aVariant = aVariant.GetString() + wxT( " *" );
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -177,17 +177,17 @@ SYMBOL_VIEWER_FRAME::SYMBOL_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAM
|
|||
m_auimgr.SetManagedWindow( this );
|
||||
|
||||
// Manage main toolbar
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" )
|
||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( wxT( "MainToolbar" ) ).Top().Layer( 6 ) );
|
||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( wxT( "MsgPanel" ) )
|
||||
.Bottom().Layer( 6 ) );
|
||||
|
||||
m_auimgr.AddPane( m_libList, EDA_PANE().Palette().Name( "Libraries" ).Left().Layer(3)
|
||||
m_auimgr.AddPane( m_libList, EDA_PANE().Palette().Name( wxT( "Libraries" ) ).Left().Layer(3)
|
||||
.CaptionVisible( false ).MinSize( 80, -1 ).BestSize( m_libListWidth, -1 ) );
|
||||
m_auimgr.AddPane( m_symbolList, EDA_PANE().Palette().Name( "Symbols" ).Left().Layer(1)
|
||||
m_auimgr.AddPane( m_symbolList, EDA_PANE().Palette().Name( wxT( "Symbols" ) ).Left().Layer(1)
|
||||
.CaptionVisible( false ).MinSize( 80, -1 )
|
||||
.BestSize( m_symbolListWidth, -1 ) );
|
||||
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" ).Center() );
|
||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( wxT( "DrawFrame" ) ).Center() );
|
||||
|
||||
m_auimgr.GetPane( m_libList ).Show( aLibraryName.empty() );
|
||||
|
||||
|
|
|
@ -251,11 +251,11 @@ int EE_INSPECTION_TOOL::CheckSymbol( const TOOL_EVENT& aEvent )
|
|||
wxString pinName;
|
||||
wxString nextName;
|
||||
|
||||
if( pin->GetName() != "~" && !pin->GetName().IsEmpty() )
|
||||
pinName = " '" + pin->GetName() + "'";
|
||||
if( pin->GetName() != wxT( "~" ) && !pin->GetName().IsEmpty() )
|
||||
pinName = wxT( " '" ) + pin->GetName() + wxT( "'" );
|
||||
|
||||
if( next->GetName() != "~" && !next->GetName().IsEmpty() )
|
||||
nextName = " '" + next->GetName() + "'";
|
||||
if( next->GetName() != wxT( "~" ) && !next->GetName().IsEmpty() )
|
||||
nextName = wxT( " '" ) + next->GetName() + wxT( "'" );
|
||||
|
||||
if( symbol->HasConversion() && next->GetConvert() )
|
||||
{
|
||||
|
@ -331,10 +331,10 @@ int EE_INSPECTION_TOOL::CheckSymbol( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
wxString pinName = pin->GetName();
|
||||
|
||||
if( pinName.IsEmpty() || pinName == "~" )
|
||||
pinName = "";
|
||||
if( pinName.IsEmpty() || pinName == wxT( "~" ) )
|
||||
pinName = wxT( "" );
|
||||
else
|
||||
pinName = "'" + pinName + "'";
|
||||
pinName = wxT( "'" ) + pinName + wxT( "'" );
|
||||
|
||||
if( !symbol->IsPower()
|
||||
&& pin->GetType() == ELECTRICAL_PINTYPE::PT_POWER_IN
|
||||
|
|
|
@ -123,7 +123,7 @@ public:
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "EDIT_POINTS_FACTORY::Make not implemented for "
|
||||
wxFAIL_MSG( wxT( "EDIT_POINTS_FACTORY::Make not implemented for " )
|
||||
+ shape->SHAPE_T_asString() );
|
||||
}
|
||||
}
|
||||
|
@ -544,7 +544,7 @@ void EE_POINT_EDITOR::updateParentItem() const
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "EE_POINT_EDITOR::updateParentItem not implemented for "
|
||||
wxFAIL_MSG( wxT( "EE_POINT_EDITOR::updateParentItem not implemented for " )
|
||||
+ shape->SHAPE_T_asString() );
|
||||
}
|
||||
}
|
||||
|
@ -736,7 +736,7 @@ void EE_POINT_EDITOR::updatePoints()
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "EE_POINT_EDITOR::updatePoints not implemented for "
|
||||
wxFAIL_MSG( wxT( "EE_POINT_EDITOR::updatePoints not implemented for " )
|
||||
+ shape->SHAPE_T_asString() );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ EDA_RECT EE_SELECTION::GetBoundingBox() const
|
|||
}
|
||||
catch( const boost::bad_pointer& )
|
||||
{
|
||||
wxFAIL_MSG( "Invalid pointer." );
|
||||
wxFAIL_MSG( wxT( "Invalid pointer." ) );
|
||||
}
|
||||
}
|
||||
else if( item->Type() == SCH_SHEET_T )
|
||||
|
|
|
@ -1620,7 +1620,7 @@ bool EE_SELECTION_TOOL::doSelectionMenu( EE_COLLECTOR* aCollector )
|
|||
EDA_ITEM* item = ( *aCollector )[i];
|
||||
text = item->GetSelectMenuText( m_frame->GetUserUnits() );
|
||||
|
||||
wxString menuText = wxString::Format( "&%d. %s\t%d", i + 1, text, i + 1 );
|
||||
wxString menuText = wxString::Format( wxT( "&%d. %s\t%d" ), i + 1, text, i + 1 );
|
||||
menu.Add( menuText, i + 1, item->GetMenuImage() );
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( "PlaceSymbol(): unexpected request" );
|
||||
wxFAIL_MSG( wxT( "PlaceSymbol(): unexpected request" ) );
|
||||
}
|
||||
|
||||
std::string tool = aEvent.GetCommandStr().get();
|
||||
|
@ -654,7 +654,7 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent )
|
|||
break;
|
||||
|
||||
default:
|
||||
wxASSERT_MSG( false, "Unknown item type in SCH_DRAWING_TOOLS::SingleClickPlace" );
|
||||
wxASSERT_MSG( false, wxT( "Unknown item type in SCH_DRAWING_TOOLS::SingleClickPlace" ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -889,7 +889,7 @@ SCH_TEXT* SCH_DRAWING_TOOLS::createNewText( const VECTOR2I& aPosition, int aType
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "SCH_EDIT_FRAME::CreateNewText() unknown layer type" );
|
||||
wxFAIL_MSG( wxT( "SCH_EDIT_FRAME::CreateNewText() unknown layer type" ) );
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -1340,8 +1340,8 @@ int SCH_DRAWING_TOOLS::DrawSheet( const TOOL_EVENT& aEvent )
|
|||
sheet->SetBorderWidth( Mils2iu( cfg->m_Drawing.default_line_thickness ) );
|
||||
sheet->SetBorderColor( cfg->m_Drawing.default_sheet_border_color );
|
||||
sheet->SetBackgroundColor( cfg->m_Drawing.default_sheet_background_color );
|
||||
sheet->GetFields()[ SHEETNAME ].SetText( "Untitled Sheet" );
|
||||
sheet->GetFields()[ SHEETFILENAME ].SetText( "untitled." + KiCadSchematicFileExtension );
|
||||
sheet->GetFields()[ SHEETNAME ].SetText( wxT( "Untitled Sheet" ) );
|
||||
sheet->GetFields()[ SHEETFILENAME ].SetText( wxT( "untitled." ) + KiCadSchematicFileExtension );
|
||||
sizeSheet( sheet, cursorPos );
|
||||
|
||||
m_view->ClearPreview();
|
||||
|
@ -1370,7 +1370,7 @@ int SCH_DRAWING_TOOLS::DrawSheet( const TOOL_EVENT& aEvent )
|
|||
SCH_SHEET_PATH sheetPath = instance;
|
||||
sheetPath.push_back( sheet );
|
||||
sheet->AddInstance( sheetPath );
|
||||
sheet->SetPageNumber( sheetPath, wxString::Format( "%d", pageNum++ ) );
|
||||
sheet->SetPageNumber( sheetPath, wxString::Format( wxT( "%d" ), pageNum++ ) );
|
||||
}
|
||||
|
||||
if( m_frame->EditSheetProperties( static_cast<SCH_SHEET*>( sheet ),
|
||||
|
|
|
@ -1533,7 +1533,7 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
|
|||
break;
|
||||
|
||||
default: // Unexpected item
|
||||
wxFAIL_MSG( wxString( "Cannot edit schematic item type " ) + item->GetClass() );
|
||||
wxFAIL_MSG( wxString( wxT( "Cannot edit schematic item type " ) ) + item->GetClass() );
|
||||
}
|
||||
|
||||
updateItem( item, true );
|
||||
|
@ -1567,10 +1567,10 @@ int SCH_EDIT_TOOL::ChangeTextType( const TOOL_EVENT& aEvent )
|
|||
// fix them here.
|
||||
if( text->Type() == SCH_TEXT_T )
|
||||
{
|
||||
txt.Replace( "\n", "_" );
|
||||
txt.Replace( "\r", "_" );
|
||||
txt.Replace( "\t", "_" );
|
||||
txt.Replace( " ", "_" );
|
||||
txt.Replace( wxT( "\n" ), wxT( "_" ) );
|
||||
txt.Replace( wxT( "\r" ), wxT( "_" ) );
|
||||
txt.Replace( wxT( "\t" ), wxT( "_" ) );
|
||||
txt.Replace( wxT( " " ), wxT( "_" ) );
|
||||
}
|
||||
|
||||
// label strings are "escaped" i.e. a '/' is replaced by "{slash}"
|
||||
|
@ -1585,7 +1585,7 @@ int SCH_EDIT_TOOL::ChangeTextType( const TOOL_EVENT& aEvent )
|
|||
case SCH_TEXT_T: newtext = new SCH_TEXT( position, txt ); break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( wxString::Format( "Invalid text type: %d.", convertTo ) );
|
||||
wxFAIL_MSG( wxString::Format( wxT( "Invalid text type: %d." ), convertTo ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1756,7 +1756,7 @@ int SCH_EDIT_TOOL::EditPageNumber( const TOOL_EVENT& aEvent )
|
|||
wxString pageNumber = instance.GetPageNumber();
|
||||
|
||||
msg.Printf( _( "Enter page number for sheet path%s" ),
|
||||
( sheetPath.Length() > 20 ) ? "\n" + sheetPath : " " + sheetPath );
|
||||
( sheetPath.Length() > 20 ) ? wxT( "\n" ) + sheetPath : wxT( " " ) + sheetPath );
|
||||
|
||||
wxTextEntryDialog dlg( m_frame, msg, _( "Edit Sheet Page Number" ), pageNumber );
|
||||
|
||||
|
|
|
@ -789,9 +789,9 @@ int SCH_EDITOR_CONTROL::SimProbe( const TOOL_EVENT& aEvent )
|
|||
primitive = NETLIST_EXPORTER_PSPICE::GetSpiceField( SF_PRIMITIVE, symbol, 0 );
|
||||
primitive.LowerCase();
|
||||
|
||||
if( primitive == "c" || primitive == "l" || primitive == "r" )
|
||||
if( primitive == wxT( "c" ) || primitive == wxT( "l" ) || primitive == wxT( "r" ) )
|
||||
param = wxT( "I" );
|
||||
else if( primitive == "d" )
|
||||
else if( primitive == wxT( "d" ) )
|
||||
param = wxT( "Id" );
|
||||
else
|
||||
param = wxString::Format( wxT( "I%s" ), pin->GetShownName().Lower() );
|
||||
|
@ -1559,7 +1559,7 @@ SCH_SHEET_PATH SCH_EDITOR_CONTROL::updatePastedSheet( const SCH_SHEET_PATH& aPas
|
|||
if( m_clipboardSheetInstances.count( aClipPath ) > 0 )
|
||||
pageNum = m_clipboardSheetInstances.at( aClipPath ).m_PageNumber;
|
||||
else
|
||||
pageNum = wxString::Format( "%d", static_cast<int>( aPastedSheetsSoFar->size() ) );
|
||||
pageNum = wxString::Format( wxT( "%d" ), static_cast<int>( aPastedSheetsSoFar->size() ) );
|
||||
|
||||
aSheet->SetPageNumber( sheetPath, pageNum );
|
||||
aPastedSheetsSoFar->push_back( sheetPath );
|
||||
|
@ -1929,10 +1929,10 @@ int SCH_EDITOR_CONTROL::Paste( const TOOL_EVENT& aEvent )
|
|||
for( SCH_SHEET_PATH& pastedSheet : pastedSheets[instance] )
|
||||
{
|
||||
int page = 1;
|
||||
wxString pageNum = wxString::Format( "%d", page );
|
||||
wxString pageNum = wxString::Format( wxT( "%d" ), page );
|
||||
|
||||
while( hierarchy.PageNumberExists( pageNum ) )
|
||||
pageNum = wxString::Format( "%d", ++page );
|
||||
pageNum = wxString::Format( wxT( "%d" ), ++page );
|
||||
|
||||
pastedSheet.SetPageNumber( pageNum );
|
||||
hierarchy.push_back( pastedSheet );
|
||||
|
|
|
@ -750,7 +750,7 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( const std::string& aTool, int aType,
|
|||
if( evt->GetCommandId().get() >= ID_POPUP_SCH_UNFOLD_BUS
|
||||
&& evt->GetCommandId().get() <= ID_POPUP_SCH_UNFOLD_BUS_END )
|
||||
{
|
||||
wxASSERT_MSG( !segment, "Bus unfold event received when already drawing!" );
|
||||
wxASSERT_MSG( !segment, wxT( "Bus unfold event received when already drawing!" ) );
|
||||
|
||||
aType = LAYER_WIRE;
|
||||
wxString net = *evt->Parameter<wxString*>();
|
||||
|
|
|
@ -283,7 +283,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
|
||||
if( evt->IsAction( &EE_ACTIONS::restartMove ) )
|
||||
{
|
||||
wxASSERT_MSG( m_anchorPos, "Should be already set from previous cmd" );
|
||||
wxASSERT_MSG( m_anchorPos, wxT( "Should be already set from previous cmd" ) );
|
||||
}
|
||||
else if( placingNewItems )
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ int SCH_NAVIGATE_TOOL::HypertextCommand( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
};
|
||||
|
||||
if( *page == "HYPERTEXT_BACK" )
|
||||
if( *page == wxT( "HYPERTEXT_BACK" ) )
|
||||
{
|
||||
if( m_hypertextStack.size() > 0 )
|
||||
{
|
||||
|
|
|
@ -390,7 +390,7 @@ int SYMBOL_EDITOR_CONTROL::ExportView( const TOOL_EVENT& aEvent )
|
|||
wxString file_ext = wxT( "png" );
|
||||
wxString mask = wxT( "*." ) + file_ext;
|
||||
wxFileName fn( symbol->GetName() );
|
||||
fn.SetExt( "png" );
|
||||
fn.SetExt( wxT( "png" ) );
|
||||
|
||||
wxString projectPath = wxPathOnly( m_frame->Prj().GetProjectFullName() );
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent )
|
|||
break;
|
||||
}
|
||||
default:
|
||||
wxFAIL_MSG( "TwoClickPlace(): unknown type" );
|
||||
wxFAIL_MSG( wxT( "TwoClickPlace(): unknown type" ) );
|
||||
}
|
||||
|
||||
// Restore cursor after dialog
|
||||
|
@ -216,7 +216,7 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent )
|
|||
symbol->AddDrawItem( (LIB_TEXT*) item );
|
||||
break;
|
||||
default:
|
||||
wxFAIL_MSG( "TwoClickPlace(): unknown type" );
|
||||
wxFAIL_MSG( wxT( "TwoClickPlace(): unknown type" ) );
|
||||
}
|
||||
|
||||
item->ClearEditFlags();
|
||||
|
|
|
@ -56,7 +56,7 @@ bool SYMBOL_EDITOR_EDIT_TOOL::Init()
|
|||
SYMBOL_EDITOR_DRAWING_TOOLS* drawingTools = m_toolMgr->GetTool<SYMBOL_EDITOR_DRAWING_TOOLS>();
|
||||
SYMBOL_EDITOR_MOVE_TOOL* moveTool = m_toolMgr->GetTool<SYMBOL_EDITOR_MOVE_TOOL>();
|
||||
|
||||
wxASSERT_MSG( drawingTools, "eeschema.SymbolDrawing tool is not available" );
|
||||
wxASSERT_MSG( drawingTools, wxT( "eeschema.SymbolDrawing tool is not available" ) );
|
||||
|
||||
auto haveSymbolCondition =
|
||||
[&]( const SELECTION& sel )
|
||||
|
@ -445,7 +445,7 @@ int SYMBOL_EDITOR_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( wxT( "Unhandled item <" ) + item->GetClass() + wxT( ">" ) );
|
||||
wxFAIL_MSG( wxT( "Unhandled item <wxT( " ) + item->GetClass() + wxT( " )>" ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -706,7 +706,7 @@ int SYMBOL_EDITOR_EDIT_TOOL::Paste( const TOOL_EVENT& aEvent )
|
|||
return 0;
|
||||
|
||||
std::string text_utf8 = m_toolMgr->GetClipboardUTF8();
|
||||
STRING_LINE_READER reader( text_utf8, "Clipboard" );
|
||||
STRING_LINE_READER reader( text_utf8, wxT( "Clipboard" ) );
|
||||
LIB_SYMBOL* newPart;
|
||||
|
||||
try
|
||||
|
@ -716,7 +716,7 @@ int SYMBOL_EDITOR_EDIT_TOOL::Paste( const TOOL_EVENT& aEvent )
|
|||
catch( IO_ERROR& )
|
||||
{
|
||||
// If it's not a symbol then paste as text
|
||||
newPart = new LIB_SYMBOL( "dummy_part" );
|
||||
newPart = new LIB_SYMBOL( wxT( "dummy_part" ) );
|
||||
LIB_TEXT* newText = new LIB_TEXT( newPart );
|
||||
newText->SetText( wxString::FromUTF8( text_utf8.c_str() ) );
|
||||
newPart->AddDrawItem( newText );
|
||||
|
|
|
@ -351,7 +351,7 @@ void SYMBOL_EDITOR_PIN_TOOL::CreateImagePins( LIB_PIN* aPin )
|
|||
// it does no have the save pin number as the master pin
|
||||
// Because we do not know the actual number, give it a temporary number
|
||||
wxString unknownNum;
|
||||
unknownNum.Printf( "%s-U%c", aPin->GetNumber(), wxChar( 'A' + ii - 1 ) );
|
||||
unknownNum.Printf( wxT( "%s-U%c" ), aPin->GetNumber(), wxChar( 'A' + ii - 1 ) );
|
||||
newPin->SetNumber( unknownNum );
|
||||
|
||||
newPin->SetUnit( ii );
|
||||
|
@ -362,7 +362,7 @@ void SYMBOL_EDITOR_PIN_TOOL::CreateImagePins( LIB_PIN* aPin )
|
|||
}
|
||||
catch( const boost::bad_pointer& e )
|
||||
{
|
||||
wxLogError( "Cannot add new pin to symbol. Boost pointer error %s occurred.",
|
||||
wxLogError( wxT( "Cannot add new pin to symbol. Boost pointer error %s occurred." ),
|
||||
e.what() );
|
||||
delete newPin;
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue