本文整理汇总了C++中PCB_PLOT_PARAMS::GetOutputDirectory方法的典型用法代码示例。如果您正苦于以下问题:C++ PCB_PLOT_PARAMS::GetOutputDirectory方法的具体用法?C++ PCB_PLOT_PARAMS::GetOutputDirectory怎么用?C++ PCB_PLOT_PARAMS::GetOutputDirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PCB_PLOT_PARAMS
的用法示例。
在下文中一共展示了PCB_PLOT_PARAMS::GetOutputDirectory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnInitDialog
void DIALOG_GEN_MODULE_POSITION::OnInitDialog( wxInitDialogEvent& event )
{
// Output directory
m_outputDirectoryName->SetValue( m_plotOpts.GetOutputDirectory() );
m_radioBoxUnits->SetSelection( m_unitsOpt );
m_radioBoxFilesCount->SetSelection( m_fileOpt );
m_sdbSizerButtonsOK->SetDefault();
GetSizer()->SetSizeHints(this);
Centre();
}
示例2: initDialog
void DIALOG_GEN_MODULE_POSITION::initDialog()
{
m_config = Kiface().KifaceSettings();
m_config->Read( PLACEFILE_UNITS_KEY, &m_unitsOpt, 1 );
m_config->Read( PLACEFILE_OPT_KEY, &m_fileOpt, 0 );
// Output directory
m_outputDirectoryName->SetValue( m_plotOpts.GetOutputDirectory() );
m_radioBoxUnits->SetSelection( m_unitsOpt );
m_radioBoxFilesCount->SetSelection( m_fileOpt );
m_sdbSizerButtonsOK->SetDefault();
}
示例3: CreateFiles
bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
{
BOARD * brd = m_parent->GetBoard();
wxFileName fn;
wxString msg;
bool singleFile = OneFileOnly();
int fullcount = 0;
// Count the footprints to place, do not yet create a file
int fpcount = m_parent->DoGenFootprintsPositionFile( wxEmptyString, UnitsMM(),
ForceAllSmd(), 2 );
if( fpcount == 0)
{
wxMessageBox( _( "No modules for automated placement." ) );
return false;
}
// Create output directory if it does not exist (also transform it in
// absolute form). Bail if it fails
wxFileName outputDir = wxFileName::DirName( m_plotOpts.GetOutputDirectory() );
wxString boardFilename = m_parent->GetBoard()->GetFileName();
m_reporter = &m_messagesPanel->Reporter();
if( !EnsureFileDirectoryExists( &outputDir, boardFilename, m_reporter ) )
{
msg.Printf( _( "Could not write plot files to folder \"%s\"." ),
GetChars( outputDir.GetPath() ) );
DisplayError( this, msg );
return false;
}
fn = m_parent->GetBoard()->GetFileName();
fn.SetPath( outputDir.GetPath() );
// Create the the Front or Top side placement file,
// or the single file
int side = 1;
if( singleFile )
{
side = 2;
fn.SetName( fn.GetName() + wxT( "-" ) + wxT("all") );
}
else
fn.SetName( fn.GetName() + wxT( "-" ) + frontSideName );
fn.SetExt( FootprintPlaceFileExtension );
fpcount = m_parent->DoGenFootprintsPositionFile( fn.GetFullPath(), UnitsMM(),
ForceAllSmd(), side );
if( fpcount < 0 )
{
msg.Printf( _( "Unable to create '%s'." ), GetChars( fn.GetFullPath() ) );
wxMessageBox( msg );
m_reporter->Report( msg, REPORTER::RPT_ERROR );
return false;
}
if( singleFile )
msg.Printf( _( "Place file: '%s'." ), GetChars( fn.GetFullPath() ) );
else
msg.Printf( _( "Front side (top side) place file: '%s'." ),
GetChars( fn.GetFullPath() ) );
m_reporter->Report( msg, REPORTER::RPT_INFO );
msg.Printf( _( "Component count: %d." ), fpcount );
m_reporter->Report( msg, REPORTER::RPT_INFO );
if( singleFile )
{
m_reporter->Report( _( "Componment Placement File generation OK." ), REPORTER::RPT_ACTION );
return true;
}
// Create the Back or Bottom side placement file
fullcount = fpcount;
side = 0;
fn = brd->GetFileName();
fn.SetPath( outputDir.GetPath() );
fn.SetName( fn.GetName() + wxT( "-" ) + backSideName );
fn.SetExt( wxT( "pos" ) );
fpcount = m_parent->DoGenFootprintsPositionFile( fn.GetFullPath(), UnitsMM(),
ForceAllSmd(), side );
if( fpcount < 0 )
{
msg.Printf( _( "Unable to create file '%s'." ), GetChars( fn.GetFullPath() ) );
m_reporter->Report( msg, REPORTER::RPT_ERROR );
wxMessageBox( msg );
return false;
}
// Display results
if( !singleFile )
{
msg.Printf( _( "Back side (bottom side) place file: '%s'." ), GetChars( fn.GetFullPath() ) );
m_reporter->Report( msg, REPORTER::RPT_INFO );
//.........这里部分代码省略.........