mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-22 20:53:44 +02:00
154 lines
5.8 KiB
Diff
154 lines
5.8 KiB
Diff
diff -ru kicad.3493/eeschema/CMakeLists.txt kicad/eeschema/CMakeLists.txt
|
|
--- kicad.3493/eeschema/CMakeLists.txt 2012-04-08 03:24:18.653600000 +0200
|
|
+++ kicad/eeschema/CMakeLists.txt 2012-04-08 06:50:45.274378556 +0200
|
|
@@ -82,6 +82,7 @@
|
|
eeredraw.cpp
|
|
eeschema.cpp
|
|
eeschema_config.cpp
|
|
+ eeschema_cmdline.cpp
|
|
erc.cpp
|
|
events_called_functions_for_edit.cpp
|
|
files-io.cpp
|
|
diff -ru kicad.3493/eeschema/dialogs/dialog_build_BOM.h kicad/eeschema/dialogs/dialog_build_BOM.h
|
|
--- kicad.3493/eeschema/dialogs/dialog_build_BOM.h 2012-04-08 03:24:18.653600000 +0200
|
|
+++ kicad/eeschema/dialogs/dialog_build_BOM.h 2012-04-08 06:50:45.278378536 +0200
|
|
@@ -17,6 +17,7 @@
|
|
|
|
class DIALOG_BUILD_BOM : public DIALOG_BUILD_BOM_BASE
|
|
{
|
|
+friend class EESCHEMA_CMDLINE;
|
|
private:
|
|
EDA_DRAW_FRAME* m_Parent;
|
|
wxConfig* m_Config;
|
|
diff -ru kicad.3493/eeschema/dialogs/dialog_erc.cpp kicad/eeschema/dialogs/dialog_erc.cpp
|
|
--- kicad.3493/eeschema/dialogs/dialog_erc.cpp 2012-04-08 03:24:18.653600000 +0200
|
|
+++ kicad/eeschema/dialogs/dialog_erc.cpp 2012-04-08 06:50:45.279378530 +0200
|
|
@@ -574,10 +574,10 @@
|
|
_( "Electronic rule check file (.erc)|*.erc" ),
|
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
|
|
|
- if( dlg.ShowModal() == wxID_CANCEL )
|
|
+ if( !g_CmdLineMode && dlg.ShowModal() == wxID_CANCEL )
|
|
return;
|
|
|
|
- if( WriteDiagnosticERC( dlg.GetPath() ) )
|
|
+ if( WriteDiagnosticERC( g_CmdLineMode ? fn.GetFullPath() : dlg.GetPath() ) )
|
|
{
|
|
Close( true );
|
|
ExecuteFile( this, wxGetApp().GetEditorName(), QuoteFullPath( fn ) );
|
|
diff -ru kicad.3493/eeschema/dialogs/dialog_erc.h kicad/eeschema/dialogs/dialog_erc.h
|
|
--- kicad.3493/eeschema/dialogs/dialog_erc.h 2012-04-08 03:24:18.653600000 +0200
|
|
+++ kicad/eeschema/dialogs/dialog_erc.h 2012-04-08 06:50:45.280378524 +0200
|
|
@@ -29,6 +29,7 @@
|
|
|
|
class DIALOG_ERC : public DIALOG_ERC_BASE
|
|
{
|
|
+friend class EESCHEMA_CMDLINE;
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
private:
|
|
diff -ru kicad.3493/eeschema/dialogs/dialog_plot_schematic_DXF.cpp kicad/eeschema/dialogs/dialog_plot_schematic_DXF.cpp
|
|
--- kicad.3493/eeschema/dialogs/dialog_plot_schematic_DXF.cpp 2012-04-08 03:24:18.653600000 +0200
|
|
+++ kicad/eeschema/dialogs/dialog_plot_schematic_DXF.cpp 2012-04-08 06:50:45.281378518 +0200
|
|
@@ -42,6 +42,7 @@
|
|
|
|
class DIALOG_PLOT_SCHEMATIC_DXF : public DIALOG_PLOT_SCHEMATIC_DXF_BASE
|
|
{
|
|
+friend class SCH_EDIT_FRAME;
|
|
private:
|
|
SCH_EDIT_FRAME* m_Parent;
|
|
|
|
@@ -73,6 +74,15 @@
|
|
|
|
|
|
|
|
+void SCH_EDIT_FRAME::CmdLineToPlot_DXF( bool PlotBW, bool PlotSheetRef )
|
|
+{
|
|
+ DIALOG_PLOT_SCHEMATIC_DXF::m_plotColorOpt = !PlotBW;
|
|
+ DIALOG_PLOT_SCHEMATIC_DXF::m_plot_Sheet_Ref = PlotSheetRef;
|
|
+ DIALOG_PLOT_SCHEMATIC_DXF dlg( this );
|
|
+ wxCommandEvent dummy;
|
|
+ dlg.OnPlotAll( dummy );
|
|
+}
|
|
+
|
|
void SCH_EDIT_FRAME::ToPlot_DXF( wxCommandEvent& event )
|
|
{
|
|
DIALOG_PLOT_SCHEMATIC_DXF DXF_frame( this );
|
|
diff -ru kicad.3493/eeschema/dialogs/dialog_plot_schematic_PS.cpp kicad/eeschema/dialogs/dialog_plot_schematic_PS.cpp
|
|
--- kicad.3493/eeschema/dialogs/dialog_plot_schematic_PS.cpp 2012-04-08 03:24:18.653600000 +0200
|
|
+++ kicad/eeschema/dialogs/dialog_plot_schematic_PS.cpp 2012-04-08 06:50:45.282378513 +0200
|
|
@@ -48,6 +48,7 @@
|
|
|
|
class DIALOG_PLOT_SCHEMATIC_PS : public DIALOG_PLOT_SCHEMATIC_PS_BASE
|
|
{
|
|
+friend class SCH_EDIT_FRAME;
|
|
private:
|
|
SCH_EDIT_FRAME* m_Parent;
|
|
|
|
@@ -80,6 +81,15 @@
|
|
bool DIALOG_PLOT_SCHEMATIC_PS::m_plot_Sheet_Ref = true;
|
|
|
|
|
|
+void SCH_EDIT_FRAME::CmdLineToPlot_PS( bool PlotBW, bool PlotSheetRef )
|
|
+{
|
|
+ DIALOG_PLOT_SCHEMATIC_PS::m_plotColorOpt = !PlotBW;
|
|
+ DIALOG_PLOT_SCHEMATIC_PS::m_plot_Sheet_Ref = PlotSheetRef;
|
|
+ DIALOG_PLOT_SCHEMATIC_PS dlg( this );
|
|
+ wxCommandEvent dummy;
|
|
+ dlg.OnPlotAll( dummy );
|
|
+}
|
|
+
|
|
void SCH_EDIT_FRAME::ToPlot_PS( wxCommandEvent& event )
|
|
{
|
|
DIALOG_PLOT_SCHEMATIC_PS dlg( this );
|
|
diff -ru kicad.3493/eeschema/dialogs/dialog_SVG_print.cpp kicad/eeschema/dialogs/dialog_SVG_print.cpp
|
|
--- kicad.3493/eeschema/dialogs/dialog_SVG_print.cpp 2012-04-08 03:24:18.653600000 +0200
|
|
+++ kicad/eeschema/dialogs/dialog_SVG_print.cpp 2012-04-08 06:50:45.283378508 +0200
|
|
@@ -53,6 +53,13 @@
|
|
static bool s_Print_Frame_Ref = true;
|
|
static int s_PlotBlackAndWhite = 0;
|
|
|
|
+void CmdLinePrintSVGDoc( EDA_DRAW_FRAME* frame, bool aPrintAll, bool aPrint_Sheet_Ref, bool aPrintBlackAndWhite )
|
|
+{
|
|
+ class DIALOG_SVG_PRINT* dlg = new DIALOG_SVG_PRINT( frame );
|
|
+ dlg->m_ModeColorOption->SetSelection( aPrintBlackAndWhite );
|
|
+ dlg->PrintSVGDoc( aPrintAll, aPrint_Sheet_Ref );
|
|
+ delete dlg;
|
|
+}
|
|
|
|
/*!
|
|
* DIALOG_SVG_PRINT functions
|
|
diff -ru kicad.3493/eeschema/dialogs/dialog_SVG_print.h kicad/eeschema/dialogs/dialog_SVG_print.h
|
|
--- kicad.3493/eeschema/dialogs/dialog_SVG_print.h 2012-04-08 03:24:18.653600000 +0200
|
|
+++ kicad/eeschema/dialogs/dialog_SVG_print.h 2012-04-08 06:50:45.283378508 +0200
|
|
@@ -11,6 +11,8 @@
|
|
|
|
class DIALOG_SVG_PRINT : public DIALOG_SVG_PRINT_base
|
|
{
|
|
+friend void CmdLinePrintSVGDoc( EDA_DRAW_FRAME* frame, bool aPrintAll, bool aPrint_Sheet_Ref, bool aPrintBlackAndWhite );
|
|
+ private:
|
|
private:
|
|
EDA_DRAW_FRAME* m_Parent;
|
|
wxConfig* m_Config;
|
|
diff -ru kicad.3493/eeschema/eeschema.cpp kicad/eeschema/eeschema.cpp
|
|
--- kicad.3493/eeschema/eeschema.cpp 2012-04-08 03:24:18.653600000 +0200
|
|
+++ kicad/eeschema/eeschema.cpp 2012-04-08 06:51:29.448137537 +0200
|
|
@@ -39,6 +39,7 @@
|
|
#include <general.h>
|
|
#include <protos.h>
|
|
#include <hotkeys.h>
|
|
+#include <eeschema_cmdline.h>
|
|
#include <dialogs/dialog_color_config.h>
|
|
#include <transform.h>
|
|
#include <wildcards_and_files_ext.h>
|
|
@@ -123,6 +124,9 @@
|
|
wxFileName filename;
|
|
SCH_EDIT_FRAME* frame = NULL;
|
|
|
|
+ if ( argc >= 2 && argv[1][0] == '-' )
|
|
+ return g_EESchemaCmdLine.Run();
|
|
+
|
|
InitEDA_Appl( wxT( "Eeschema" ), APP_EESCHEMA_T );
|
|
|
|
if( m_Checker && m_Checker->IsAnotherRunning() )
|