Browse Source
Initial jobset creation and running within the CLI and GUI.
Initial jobset creation and running within the CLI and GUI.
Incomplete, just pushing this before feature freeze, much fixing leftpcb_db
150 changed files with 9840 additions and 3137 deletions
-
5common/CMakeLists.txt
-
7common/advanced_config.cpp
-
2common/eda_base_frame.cpp
-
100common/gestfich.cpp
-
148common/jobs/job.cpp
-
96common/jobs/job.h
-
18common/jobs/job_dispatcher.cpp
-
9common/jobs/job_dispatcher.h
-
76common/jobs/job_export_pcb_3d.cpp
-
6common/jobs/job_export_pcb_3d.h
-
94common/jobs/job_export_pcb_drill.cpp
-
3common/jobs/job_export_pcb_drill.h
-
44common/jobs/job_export_pcb_dxf.cpp
-
13common/jobs/job_export_pcb_dxf.h
-
2common/jobs/job_export_pcb_gencad.cpp
-
2common/jobs/job_export_pcb_gencad.h
-
54common/jobs/job_export_pcb_gerber.cpp
-
15common/jobs/job_export_pcb_gerber.h
-
24common/jobs/job_export_pcb_gerbers.cpp
-
1common/jobs/job_export_pcb_gerbers.h
-
54common/jobs/job_export_pcb_ipc2581.cpp
-
4common/jobs/job_export_pcb_ipc2581.h
-
50common/jobs/job_export_pcb_pdf.cpp
-
28common/jobs/job_export_pcb_pdf.h
-
27common/jobs/job_export_pcb_plot.cpp
-
72common/jobs/job_export_pcb_plot.h
-
87common/jobs/job_export_pcb_pos.cpp
-
4common/jobs/job_export_pcb_pos.h
-
49common/jobs/job_export_pcb_svg.cpp
-
24common/jobs/job_export_pcb_svg.h
-
48common/jobs/job_export_sch_bom.cpp
-
2common/jobs/job_export_sch_bom.h
-
44common/jobs/job_export_sch_netlist.cpp
-
7common/jobs/job_export_sch_netlist.h
-
133common/jobs/job_export_sch_plot.cpp
-
38common/jobs/job_export_sch_plot.h
-
19common/jobs/job_export_sch_pythonbom.cpp
-
2common/jobs/job_export_sch_pythonbom.h
-
3common/jobs/job_fp_export_svg.cpp
-
3common/jobs/job_fp_upgrade.cpp
-
32common/jobs/job_pcb_drc.cpp
-
1common/jobs/job_pcb_drc.h
-
2common/jobs/job_pcb_render.cpp
-
53common/jobs/job_registry.cpp
-
70common/jobs/job_registry.h
-
30common/jobs/job_sch_erc.cpp
-
1common/jobs/job_sch_erc.h
-
3common/jobs/job_sym_export_svg.cpp
-
2common/jobs/job_sym_upgrade.cpp
-
48common/jobs/jobs_output.h
-
76common/jobs/jobs_output_archive.cpp
-
45common/jobs/jobs_output_archive.h
-
61common/jobs/jobs_output_folder.cpp
-
35common/jobs/jobs_output_folder.h
-
218common/jobs/jobset.cpp
-
111common/jobs/jobset.h
-
34common/jobs/lset_json.h
-
8common/kiway.cpp
-
6common/lset.cpp
-
2common/project/project_local_settings.cpp
-
6common/settings/settings_manager.cpp
-
7common/wildcards_and_files_ext.cpp
-
131eeschema/dialogs/dialog_export_netlist.cpp
-
5eeschema/dialogs/dialog_export_netlist.h
-
17eeschema/dialogs/dialog_export_netlist_base.cpp
-
230eeschema/dialogs/dialog_export_netlist_base.fbp
-
18eeschema/dialogs/dialog_export_netlist_base.h
-
180eeschema/dialogs/dialog_plot_schematic.cpp
-
7eeschema/dialogs/dialog_plot_schematic.h
-
8eeschema/eeschema.cpp
-
27eeschema/eeschema_helpers.cpp
-
4eeschema/eeschema_helpers.h
-
176eeschema/eeschema_jobs_handler.cpp
-
3eeschema/eeschema_jobs_handler.h
-
9include/advanced_config.h
-
17include/cli/exit_codes.h
-
25include/gestfich.h
-
10include/kiway.h
-
1include/lset.h
-
6include/settings/settings_manager.h
-
3include/wildcards_and_files_ext.h
-
7kicad/CMakeLists.txt
-
37kicad/cli/command_jobset.h
-
102kicad/cli/command_jobset_run.cpp
-
35kicad/cli/command_jobset_run.h
-
2kicad/cli/command_pcb_export_3d.cpp
-
6kicad/cli/command_pcb_export_drill.cpp
-
4kicad/cli/command_pcb_export_dxf.cpp
-
1kicad/cli/command_pcb_export_gencad.cpp
-
4kicad/cli/command_pcb_export_gerber.cpp
-
2kicad/cli/command_pcb_export_ipc2581.cpp
-
4kicad/cli/command_pcb_export_pdf.cpp
-
2kicad/cli/command_pcb_export_pos.cpp
-
2kicad/cli/command_pcb_export_svg.cpp
-
2kicad/cli/command_sch_export_bom.cpp
-
2kicad/cli/command_sch_export_netlist.cpp
-
5kicad/cli/command_sch_export_plot.cpp
-
2kicad/cli/command_sch_export_pythonbom.cpp
-
52kicad/dialogs/dialog_job_config_base.cpp
-
221kicad/dialogs/dialog_job_config_base.fbp
@ -0,0 +1,27 @@ |
|||
|
|||
|
|||
#include <jobs/job_export_pcb_plot.h>
|
|||
|
|||
JOB_EXPORT_PCB_PLOT::JOB_EXPORT_PCB_PLOT( PLOT_FORMAT aFormat, const std::string& aType, |
|||
bool aOutputIsDirectory, |
|||
bool aIsCli ) |
|||
: JOB( aType, aOutputIsDirectory, aIsCli ), |
|||
m_plotFormat( aFormat ), |
|||
m_filename(), |
|||
m_colorTheme(), |
|||
m_drawingSheet(), |
|||
m_mirror( false ), |
|||
m_blackAndWhite( false ), |
|||
m_negative( false ), |
|||
m_sketchPadsOnFabLayers( false ), |
|||
m_hideDNPFPsOnFabLayers( false ), |
|||
m_sketchDNPFPsOnFabLayers( true ), |
|||
m_crossoutDNPFPsOnFabLayers( true ), |
|||
m_plotFootprintValues( true ), |
|||
m_plotRefDes( true ), |
|||
m_plotDrawingSheet( true ), |
|||
m_printMaskLayer(), |
|||
m_drillShapeOption( 2 ) |
|||
{ |
|||
|
|||
} |
@ -0,0 +1,72 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
*/ |
|||
|
|||
#pragma once |
|||
|
|||
#include <kicommon.h> |
|||
#include <kicommon.h> |
|||
#include <layer_ids.h> |
|||
#include <lseq.h> |
|||
#include <wx/string.h> |
|||
#include "job.h" |
|||
|
|||
class KICOMMON_API JOB_EXPORT_PCB_PLOT : public JOB |
|||
{ |
|||
public: |
|||
enum class PLOT_FORMAT |
|||
{ |
|||
HPGL, |
|||
GERBER, |
|||
POST, |
|||
DXF, |
|||
PDF, |
|||
SVG |
|||
}; |
|||
|
|||
JOB_EXPORT_PCB_PLOT( PLOT_FORMAT aFormat, const std::string& aType, bool aOutputIsDirectory, bool aIsCli ); |
|||
|
|||
PLOT_FORMAT m_plotFormat; |
|||
|
|||
wxString m_filename; |
|||
wxString m_colorTheme; |
|||
wxString m_drawingSheet; |
|||
|
|||
/** |
|||
* Common Options |
|||
*/ |
|||
bool m_mirror; |
|||
bool m_blackAndWhite; |
|||
bool m_negative; |
|||
|
|||
bool m_sketchPadsOnFabLayers; |
|||
bool m_hideDNPFPsOnFabLayers; |
|||
bool m_sketchDNPFPsOnFabLayers; |
|||
bool m_crossoutDNPFPsOnFabLayers; |
|||
|
|||
bool m_plotFootprintValues; |
|||
bool m_plotRefDes; |
|||
bool m_plotDrawingSheet; |
|||
|
|||
LSEQ m_printMaskLayer; |
|||
|
|||
// How holes in pads/vias are plotted: |
|||
// 0 = no hole, 1 = small shape, 2 = actual shape |
|||
int m_drillShapeOption; |
|||
}; |
@ -0,0 +1,53 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
#include <jobs/job_registry.h>
|
|||
|
|||
bool JOB_REGISTRY::Add( const wxString& aName, JOB_REGISTRY_ENTRY entry ) |
|||
{ |
|||
REGISTRY_MAP_T& registry = getRegistry(); |
|||
|
|||
if( registry.find( aName ) != registry.end() ) |
|||
{ |
|||
return false; |
|||
} |
|||
|
|||
registry[aName] = entry; |
|||
return true; |
|||
} |
|||
|
|||
|
|||
KIWAY::FACE_T JOB_REGISTRY::GetKifaceType( const wxString& aName ) |
|||
{ |
|||
REGISTRY_MAP_T& registry = getRegistry(); |
|||
if( registry.find( aName ) == registry.end() ) |
|||
{ |
|||
return KIWAY::KIWAY_FACE_COUNT; |
|||
} |
|||
|
|||
return registry[aName].kifaceType; |
|||
} |
|||
|
|||
|
|||
JOB_REGISTRY::REGISTRY_MAP_T& JOB_REGISTRY::getRegistry() |
|||
{ |
|||
static REGISTRY_MAP_T map; |
|||
return map; |
|||
} |
@ -0,0 +1,70 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
*/ |
|||
|
|||
#pragma once |
|||
|
|||
#include <jobs/job.h> |
|||
#include <kiway.h> |
|||
|
|||
struct KICOMMON_API JOB_REGISTRY_ENTRY |
|||
{ |
|||
public: |
|||
KIWAY::FACE_T kifaceType; |
|||
std::function<JOB*()> createFunc; |
|||
wxString title; |
|||
}; |
|||
|
|||
class KICOMMON_API JOB_REGISTRY |
|||
{ |
|||
public: |
|||
typedef std::unordered_map<wxString, JOB_REGISTRY_ENTRY> REGISTRY_MAP_T; |
|||
|
|||
static bool Add( const wxString& aName, JOB_REGISTRY_ENTRY entry ); |
|||
|
|||
static KIWAY::FACE_T GetKifaceType( const wxString& aName ); |
|||
|
|||
template <typename T> |
|||
static T* CreateInstance( const wxString& aName ) |
|||
{ |
|||
REGISTRY_MAP_T& registry = getRegistry(); |
|||
if( registry.find( aName ) == registry.end() ) |
|||
{ |
|||
return nullptr; |
|||
} |
|||
|
|||
return registry[aName].createFunc(); |
|||
} |
|||
|
|||
static const REGISTRY_MAP_T& GetRegistry() { |
|||
return getRegistry(); |
|||
} |
|||
|
|||
private: |
|||
// Use Meyer's singleton to prevent SIOF |
|||
static REGISTRY_MAP_T& getRegistry(); |
|||
}; |
|||
|
|||
#define REGISTER_JOB( job_name, title, face, T ) bool job_name##_entry = JOB_REGISTRY::Add( #job_name, \ |
|||
{ face, []() \ |
|||
{ \ |
|||
return new T( true ); \ |
|||
}, \ |
|||
title } ) |
|||
// newline required to appease warning for REGISTER_JOB macro |
@ -0,0 +1,48 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
*/ |
|||
|
|||
#pragma once |
|||
|
|||
#include <kicommon.h> |
|||
#include <vector> |
|||
#include <jobs/job.h> |
|||
|
|||
class KICOMMON_API JOBS_OUTPUT_HANDLER |
|||
{ |
|||
public: |
|||
JOBS_OUTPUT_HANDLER() |
|||
{ |
|||
} |
|||
|
|||
virtual ~JOBS_OUTPUT_HANDLER() {} |
|||
|
|||
virtual bool HandleOutputs( const wxString& baseTempPath, |
|||
const std::vector<JOB_OUTPUT>& aOutputsToHandle ) = 0; |
|||
|
|||
virtual void FromJson( const nlohmann::json& j ) = 0; |
|||
virtual void ToJson( nlohmann::json& j ) const = 0; |
|||
|
|||
|
|||
void SetOutputPath( const wxString& aPath ) { m_outputPath = aPath; } |
|||
wxString GetOutputPath() const { return m_outputPath; } |
|||
|
|||
protected: |
|||
wxString m_outputPath; |
|||
}; |
@ -0,0 +1,76 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
#include <jobs/jobs_output_archive.h>
|
|||
#include <wx/fs_zip.h>
|
|||
#include <wx/wfstream.h>
|
|||
#include <wx/zipstrm.h>
|
|||
#include <gestfich.h>
|
|||
|
|||
JOBS_OUTPUT_ARCHIVE::JOBS_OUTPUT_ARCHIVE() : JOBS_OUTPUT_HANDLER(), |
|||
m_format( FORMAT::ZIP ) |
|||
{ |
|||
} |
|||
|
|||
bool JOBS_OUTPUT_ARCHIVE::HandleOutputs( const wxString& baseTempPath, |
|||
const std::vector<JOB_OUTPUT>& aOutputsToHandle ) |
|||
{ |
|||
bool success = true; |
|||
|
|||
wxFFileOutputStream ostream( m_outputPath ); |
|||
if( !ostream.IsOk() ) // issue to create the file. Perhaps not writable dir
|
|||
{ |
|||
//msg.Printf( _( "Failed to create file '%s'." ), aDestFile );
|
|||
//aReporter.Report( msg, RPT_SEVERITY_ERROR );
|
|||
return false; |
|||
} |
|||
|
|||
wxZipOutputStream zipstream( ostream, -1, wxConvUTF8 ); |
|||
wxString errors; |
|||
|
|||
|
|||
if( !AddDirectoryToZip( zipstream, baseTempPath, errors ) ) |
|||
{ |
|||
success = false; |
|||
} |
|||
|
|||
|
|||
if( !zipstream.Close() ) |
|||
{ |
|||
success = false; |
|||
} |
|||
|
|||
|
|||
return success; |
|||
} |
|||
|
|||
|
|||
void JOBS_OUTPUT_ARCHIVE::FromJson( const nlohmann::json& j ) |
|||
{ |
|||
m_outputPath = j.value( "output_path", "" ); |
|||
m_format = FORMAT::ZIP; |
|||
} |
|||
|
|||
|
|||
void JOBS_OUTPUT_ARCHIVE::ToJson( nlohmann::json& j ) const |
|||
{ |
|||
j["output_path"] = m_outputPath; |
|||
j["format"] = "zip"; |
|||
} |
@ -0,0 +1,45 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
*/ |
|||
|
|||
#pragma once |
|||
|
|||
#include <jobs/jobs_output.h> |
|||
|
|||
class KICOMMON_API JOBS_OUTPUT_ARCHIVE : public JOBS_OUTPUT_HANDLER |
|||
{ |
|||
public: |
|||
JOBS_OUTPUT_ARCHIVE(); |
|||
|
|||
enum class FORMAT |
|||
{ |
|||
ZIP |
|||
}; |
|||
|
|||
bool HandleOutputs( const wxString& baseTempPath, const std::vector<JOB_OUTPUT>& aOutputsToHandle ) override; |
|||
|
|||
void FromJson( const nlohmann::json& j ) override; |
|||
void ToJson( nlohmann::json& j ) const override; |
|||
|
|||
FORMAT GetFormat() const { return m_format; } |
|||
void SetFormat( FORMAT format ) { m_format = format; } |
|||
|
|||
private: |
|||
FORMAT m_format; |
|||
}; |
@ -0,0 +1,61 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
#include <jobs/jobs_output_folder.h>
|
|||
#include <wx/filename.h>
|
|||
#include <gestfich.h>
|
|||
|
|||
JOBS_OUTPUT_FOLDER::JOBS_OUTPUT_FOLDER() : |
|||
JOBS_OUTPUT_HANDLER() |
|||
{ |
|||
|
|||
} |
|||
|
|||
|
|||
bool JOBS_OUTPUT_FOLDER::HandleOutputs( const wxString& baseTempPath, |
|||
const std::vector<JOB_OUTPUT>& aOutputsToHandle ) |
|||
{ |
|||
bool success = true; |
|||
if( !wxFileName::Mkdir( m_outputPath, wxS_DIR_DEFAULT ) ) |
|||
{ |
|||
return false; |
|||
} |
|||
|
|||
wxString errors; |
|||
if( !CopyDirectory( baseTempPath, m_outputPath, errors ) ) |
|||
{ |
|||
success = false; |
|||
} |
|||
|
|||
return success; |
|||
|
|||
} |
|||
|
|||
|
|||
void JOBS_OUTPUT_FOLDER::FromJson( const nlohmann::json& j ) |
|||
{ |
|||
m_outputPath = j.value( "output_path", "" ); |
|||
} |
|||
|
|||
|
|||
void JOBS_OUTPUT_FOLDER::ToJson( nlohmann::json& j ) const |
|||
{ |
|||
j["output_path"] = m_outputPath; |
|||
} |
@ -0,0 +1,35 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
*/ |
|||
|
|||
#pragma once |
|||
|
|||
#include <jobs/jobs_output.h> |
|||
|
|||
class JOBS_OUTPUT_FOLDER : public JOBS_OUTPUT_HANDLER |
|||
{ |
|||
public: |
|||
JOBS_OUTPUT_FOLDER(); |
|||
|
|||
bool HandleOutputs( const wxString& baseTempPath, |
|||
const std::vector<JOB_OUTPUT>& aOutputsToHandle ) override; |
|||
|
|||
void FromJson( const nlohmann::json& j ) override; |
|||
void ToJson( nlohmann::json& j ) const override; |
|||
}; |
@ -0,0 +1,218 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
#include <nlohmann/json.hpp>
|
|||
|
|||
#include <settings/parameters.h>
|
|||
#include <wildcards_and_files_ext.h>
|
|||
|
|||
#include <jobs/jobset.h>
|
|||
#include <jobs/job_registry.h>
|
|||
#include <jobs/jobs_output_folder.h>
|
|||
#include <jobs/jobs_output_archive.h>
|
|||
#include <kiid.h>
|
|||
|
|||
#include <algorithm>
|
|||
|
|||
const int jobsFileSchemaVersion = 1; |
|||
|
|||
NLOHMANN_JSON_SERIALIZE_ENUM( JOBSET_OUTPUT_TYPE, |
|||
{ |
|||
{ JOBSET_OUTPUT_TYPE::FOLDER, "folder" }, |
|||
{ JOBSET_OUTPUT_TYPE::ARCHIVE, "archive" } |
|||
} ) |
|||
|
|||
KICOMMON_API void to_json( nlohmann::json& j, const JOBSET_JOB& f ) |
|||
{ |
|||
j = nlohmann::json{ { "id", f.m_id }, |
|||
{ "type", f.m_type }, |
|||
{ "settings", nlohmann::json::object( {} ) } |
|||
}; |
|||
|
|||
f.m_job->ToJson( j.at( "settings" ) ); |
|||
} |
|||
|
|||
|
|||
KICOMMON_API void from_json( const nlohmann::json& j, JOBSET_JOB& f ) |
|||
{ |
|||
j.at( "type" ).get_to( f.m_type ); |
|||
j.at( "id" ).get_to( f.m_id ); |
|||
|
|||
nlohmann::json settings_obj = j.at( "settings" ); |
|||
|
|||
f.m_job = JOB_REGISTRY::CreateInstance<JOB>( f.m_type ); |
|||
|
|||
if( f.m_job != nullptr ) |
|||
{ |
|||
f.m_job->FromJson( settings_obj ); |
|||
} |
|||
} |
|||
|
|||
|
|||
KICOMMON_API void to_json( nlohmann::json& j, const JOBSET_OUTPUT& f ) |
|||
{ |
|||
j = nlohmann::json{ { "type", f.m_type }, { "settings", nlohmann::json::object( {} ) } }; |
|||
|
|||
f.m_outputHandler->ToJson( j.at( "settings" ) ); |
|||
} |
|||
|
|||
|
|||
KICOMMON_API void from_json( const nlohmann::json& j, JOBSET_OUTPUT& f ) |
|||
{ |
|||
j.at( "type" ).get_to( f.m_type ); |
|||
f.m_only = j.value( "only", std::vector<wxString>() ); |
|||
|
|||
nlohmann::json settings_obj = j.at( "settings" ); |
|||
|
|||
if( f.m_type == JOBSET_OUTPUT_TYPE::FOLDER ) |
|||
{ |
|||
f.m_outputHandler = new JOBS_OUTPUT_FOLDER(); |
|||
} |
|||
else if( f.m_type == JOBSET_OUTPUT_TYPE::ARCHIVE ) |
|||
{ |
|||
f.m_outputHandler = new JOBS_OUTPUT_ARCHIVE(); |
|||
} |
|||
|
|||
if( f.m_outputHandler != nullptr ) |
|||
{ |
|||
f.m_outputHandler->FromJson( settings_obj ); |
|||
} |
|||
} |
|||
|
|||
|
|||
bool JOBSET_JOB::operator==( const JOBSET_JOB & rhs ) const |
|||
{ |
|||
return rhs.m_type == m_type; |
|||
} |
|||
|
|||
|
|||
bool JOBSET_OUTPUT::operator==( const JOBSET_OUTPUT& rhs ) const |
|||
{ |
|||
return rhs.m_type == m_type; |
|||
} |
|||
|
|||
|
|||
JOBSET::JOBSET( const wxString& aFilename ) : |
|||
JSON_SETTINGS( aFilename, SETTINGS_LOC::NONE, jobsFileSchemaVersion ), |
|||
m_dirty( false ) |
|||
{ |
|||
m_params.emplace_back( new PARAM_LIST<JOBSET_JOB>( "jobs", &m_jobs, {} ) ); |
|||
m_params.emplace_back( new PARAM_LIST<JOBSET_OUTPUT>( "outputs", &m_outputs, {} ) ); |
|||
|
|||
m_fileNameWithoutPath = wxFileName( aFilename ).GetFullName(); |
|||
} |
|||
|
|||
|
|||
wxString JOBSET::getFileExt() const |
|||
{ |
|||
return FILEEXT::KiCadJobSetFileExtension; |
|||
} |
|||
|
|||
|
|||
void JOBSET::AddNewJob( wxString aType, JOB* aJob ) |
|||
{ |
|||
m_jobs.emplace_back( KIID().AsString(), aType, aJob ); |
|||
SetDirty(); |
|||
} |
|||
|
|||
|
|||
JOBSET_OUTPUT JOBSET::AddNewJobOutput( JOBSET_OUTPUT_TYPE aType, |
|||
JOBS_OUTPUT_HANDLER* aJobOutput ) |
|||
{ |
|||
m_outputs.emplace_back( KIID().AsString(), aType, aJobOutput ); |
|||
SetDirty(); |
|||
|
|||
return m_outputs.back(); |
|||
} |
|||
|
|||
|
|||
void JOBSET::RemoveOutput( JOBSET_OUTPUT* aOutput ) |
|||
{ |
|||
std::erase_if( m_outputs, |
|||
[&]( JOBSET_OUTPUT const& output ) |
|||
{ |
|||
return output.m_id == aOutput->m_id; |
|||
} ); |
|||
} |
|||
|
|||
|
|||
bool JOBSET::SaveToFile( const wxString& aDirectory, bool aForce ) |
|||
{ |
|||
bool success = JSON_SETTINGS::SaveToFile( aDirectory, aForce ); |
|||
if( success ) |
|||
{ |
|||
m_dirty = false; |
|||
} |
|||
|
|||
return success; |
|||
} |
|||
|
|||
|
|||
JOBSET_OUTPUT* JOBSET::GetOutput( wxString& aOutput ) |
|||
{ |
|||
auto it = std::find_if( m_outputs.begin(), m_outputs.end(), |
|||
[&]( const JOBSET_OUTPUT& output ) |
|||
{ |
|||
if( output.m_id == aOutput ) |
|||
return true; |
|||
|
|||
return false; |
|||
} ); |
|||
|
|||
if( it != m_outputs.end() ) |
|||
return &(*it); |
|||
|
|||
return nullptr; |
|||
} |
|||
|
|||
|
|||
std::vector<JOBSET_JOB> JOBSET::GetJobsForOutput( JOBSET_OUTPUT* aOutput ) |
|||
{ |
|||
wxASSERT( aOutput != nullptr ); |
|||
|
|||
if( aOutput->m_only.size() == 0 ) |
|||
{ |
|||
return m_jobs; |
|||
} |
|||
|
|||
std::vector<JOBSET_JOB> result; |
|||
for( wxString& onlyId : aOutput->m_only ) |
|||
{ |
|||
auto it = std::find_if( m_jobs.begin(), m_jobs.end(), |
|||
[&]( const JOBSET_JOB& job ) |
|||
{ |
|||
if( job.m_id == onlyId ) |
|||
return true; |
|||
|
|||
return false; |
|||
} ); |
|||
|
|||
if( it != m_jobs.end() ) |
|||
result.push_back( *it ); |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
|
|||
|
|||
#if !defined( __MINGW32__ )
|
|||
template class KICOMMON_API PARAM_LIST<JOBSET_JOB>; |
|||
template class KICOMMON_API PARAM_LIST<JOBSET_OUTPUT>; |
|||
#endif
|
@ -0,0 +1,111 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
*/ |
|||
|
|||
#ifndef JOBS_FILE_H |
|||
#define JOBS_FILE_H |
|||
|
|||
#include <jobs/job.h> |
|||
#include <jobs/jobs_output.h> |
|||
#include <settings/json_settings.h> |
|||
#include <settings/parameters.h> |
|||
#include <ctime> |
|||
|
|||
struct KICOMMON_API JOBSET_JOB |
|||
{ |
|||
wxString m_id; |
|||
wxString m_type; |
|||
JOB* m_job; |
|||
|
|||
bool operator==( const JOBSET_JOB& rhs ) const; |
|||
}; |
|||
|
|||
enum class JOBSET_OUTPUT_TYPE |
|||
{ |
|||
FOLDER, |
|||
ARCHIVE |
|||
}; |
|||
|
|||
struct KICOMMON_API JOBSET_OUTPUT |
|||
{ |
|||
wxString m_id; |
|||
JOBSET_OUTPUT_TYPE m_type; |
|||
JOBS_OUTPUT_HANDLER* m_outputHandler; |
|||
std::vector<wxString> m_only; |
|||
|
|||
bool operator==( const JOBSET_OUTPUT& rhs ) const; |
|||
}; |
|||
|
|||
class KICOMMON_API JOBSET : public JSON_SETTINGS |
|||
{ |
|||
public: |
|||
JOBSET( const wxString& aFilename ); |
|||
|
|||
virtual ~JOBSET() {} |
|||
|
|||
std::vector<JOBSET_JOB>& GetJobs() |
|||
{ |
|||
return m_jobs; |
|||
} |
|||
|
|||
std::vector<JOBSET_JOB> GetJobsForOutput( JOBSET_OUTPUT* aOutput ); |
|||
|
|||
std::vector<JOBSET_OUTPUT>& GetOutputs() { return m_outputs; } |
|||
|
|||
JOBSET_OUTPUT* GetOutput( wxString& aOutput ); |
|||
|
|||
bool SaveToFile( const wxString& aDirectory = "", bool aForce = false ) override; |
|||
|
|||
void SetDirty() { m_dirty = true; } |
|||
bool GetDirty() const { return m_dirty; } |
|||
|
|||
wxString GetFullName() const { return m_fileNameWithoutPath; } |
|||
|
|||
void AddNewJob( wxString aType, JOB* aJob ); |
|||
JOBSET_OUTPUT AddNewJobOutput( JOBSET_OUTPUT_TYPE aType, |
|||
JOBS_OUTPUT_HANDLER* aJobOutput ); |
|||
|
|||
void RemoveOutput( JOBSET_OUTPUT* aOutput ); |
|||
|
|||
protected: |
|||
wxString getFileExt() const override; |
|||
|
|||
private: |
|||
std::vector<JOBSET_JOB> m_jobs; |
|||
std::vector<JOBSET_OUTPUT> m_outputs; |
|||
|
|||
bool m_dirty; |
|||
wxString m_fileNameWithoutPath; |
|||
}; |
|||
|
|||
KICOMMON_API void to_json( nlohmann::json& j, const JOBSET_JOB& f ); |
|||
KICOMMON_API void from_json( const nlohmann::json& j, JOBSET_JOB& f ); |
|||
|
|||
KICOMMON_API void to_json( nlohmann::json& j, const JOBSET_OUTPUT& f ); |
|||
KICOMMON_API void from_json( const nlohmann::json& j, JOBSET_OUTPUT& f ); |
|||
|
|||
#if defined( __MINGW32__ ) |
|||
template class KICOMMON_API PARAM_LIST<struct JOBSET_JOB>; |
|||
template class KICOMMON_API PARAM_LIST<struct JOBSET_JOB>; |
|||
#else |
|||
extern template class APIVISIBLE PARAM_LIST<JOBSET_JOB>; |
|||
extern template class APIVISIBLE PARAM_LIST<JOBSET_JOB>; |
|||
#endif |
|||
|
|||
#endif |
@ -0,0 +1,34 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
*/ |
|||
|
|||
#include <lset.h> |
|||
#include <nlohmann/json_fwd.hpp> |
|||
|
|||
|
|||
void to_json( nlohmann::json& aJson, const LSET& aLset ) |
|||
{ |
|||
aJson = nlohmann::json( aLset.FmtHex() ); |
|||
} |
|||
|
|||
|
|||
void from_json( const nlohmann::json& aJson, LSET& aLset ) |
|||
{ |
|||
aLset.ParseHex( aJson.get<std::string>() ); |
|||
} |
@ -0,0 +1,37 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
*/ |
|||
|
|||
#ifndef COMMAND_JOBS_H |
|||
#define COMMAND_JOBS_H |
|||
|
|||
#include "command.h" |
|||
|
|||
namespace CLI |
|||
{ |
|||
struct JOBSET_COMMAND : public COMMAND |
|||
{ |
|||
JOBSET_COMMAND() : COMMAND( "jobset" ) |
|||
{ |
|||
m_argParser.add_description( UTF8STDSTR( _( "Jobset" ) ) ); |
|||
} |
|||
}; |
|||
} |
|||
|
|||
#endif |
@ -0,0 +1,102 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
#include "command_jobset_run.h"
|
|||
#include <cli/exit_codes.h>
|
|||
#include <kiface_base.h>
|
|||
#include <layer_ids.h>
|
|||
#include <string_utils.h>
|
|||
#include <wx/crt.h>
|
|||
#include <jobs/jobset.h>
|
|||
#include <jobs/job_registry.h>
|
|||
#include <pgm_base.h>
|
|||
#include <settings/settings_manager.h>
|
|||
|
|||
#include <macros.h>
|
|||
#include <wx/tokenzr.h>
|
|||
#include <jobs_runner.h>
|
|||
#include <reporter.h>
|
|||
|
|||
#define ARG_STOP_ON_ERROR "--stop-on-error"
|
|||
#define ARG_JOB_FILE "--file"
|
|||
#define ARG_OUTPUT "--output"
|
|||
|
|||
CLI::JOBSET_RUN_COMMAND::JOBSET_RUN_COMMAND() : COMMAND( "run" ) |
|||
{ |
|||
addCommonArgs( true, false, false, false ); |
|||
|
|||
m_argParser.add_description( UTF8STDSTR( _( "Runs a jobset file" ) ) ); |
|||
|
|||
m_argParser.add_argument( ARG_STOP_ON_ERROR ) |
|||
.help( UTF8STDSTR( |
|||
_( "Stops processing jobs as they are executed sequentially on the first failure of a job" ) ) ) |
|||
.flag(); |
|||
|
|||
m_argParser.add_argument( ARG_JOB_FILE, "-f" ) |
|||
.help( UTF8STDSTR( _( "Jobset file to be run" ) ) ) |
|||
.default_value( std::string( "" ) ) |
|||
.metavar( "JOB_FILE" ); |
|||
|
|||
m_argParser.add_argument( ARG_OUTPUT ) |
|||
.help( UTF8STDSTR( _( "Jobset file output to generate, leave blank for all outputs defined in the jobset" ) ) ) |
|||
.default_value( std::string( "" ) ) |
|||
.metavar( "OUTPUT" ); |
|||
} |
|||
|
|||
|
|||
int CLI::JOBSET_RUN_COMMAND::doPerform( KIWAY& aKiway ) |
|||
{ |
|||
bool bail = m_argParser.get<bool>( ARG_STOP_ON_ERROR ); |
|||
wxString jobsFilePath = From_UTF8( m_argParser.get<std::string>( ARG_JOB_FILE ).c_str() ); |
|||
wxString projectFile = m_argInput.ToStdString(); |
|||
|
|||
wxString outputKey = From_UTF8( m_argParser.get<std::string>( ARG_OUTPUT ).c_str() ); |
|||
|
|||
if( !Pgm().GetSettingsManager().LoadProject( projectFile ) ) |
|||
{ |
|||
return CLI::EXIT_CODES::ERR_INVALID_INPUT_FILE; |
|||
} |
|||
|
|||
JOBSET jobFile( jobsFilePath.ToStdString() ); |
|||
|
|||
jobFile.LoadFromFile(); |
|||
|
|||
JOBS_RUNNER jobsRunner( &aKiway, &jobFile, &CLI_REPORTER::GetInstance() ); |
|||
|
|||
int return_code = CLI::EXIT_CODES::SUCCESS; |
|||
|
|||
if( !outputKey.IsEmpty() ) |
|||
{ |
|||
JOBSET_OUTPUT* output = jobFile.GetOutput( outputKey ); |
|||
if( output == nullptr || !jobsRunner.RunJobsForOutput( output, bail ) ) |
|||
{ |
|||
return_code = CLI::EXIT_CODES::ERR_JOBS_RUN_FAILED; |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
if( !jobsRunner.RunJobsAllOutputs( bail ) ) |
|||
{ |
|||
return_code = CLI::EXIT_CODES::ERR_JOBS_RUN_FAILED; |
|||
} |
|||
} |
|||
|
|||
return return_code; |
|||
} |
@ -0,0 +1,35 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2024 Mark Roszko <mark.roszko@gmail.com> |
|||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors. |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify it |
|||
* under the terms of the GNU General Public License as published by the |
|||
* Free Software Foundation, either version 3 of the License, or (at your |
|||
* option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, but |
|||
* WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License along |
|||
* with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
*/ |
|||
|
|||
#pragma once |
|||
|
|||
#include "command_pcb_export_base.h" |
|||
|
|||
namespace CLI |
|||
{ |
|||
class JOBSET_RUN_COMMAND : public COMMAND |
|||
{ |
|||
public: |
|||
JOBSET_RUN_COMMAND(); |
|||
|
|||
protected: |
|||
int doPerform( KIWAY& aKiway ) override; |
|||
}; |
|||
} |
@ -0,0 +1,52 @@ |
|||
///////////////////////////////////////////////////////////////////////////
|
|||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
|||
// http://www.wxformbuilder.org/
|
|||
//
|
|||
// PLEASE DO *NOT* EDIT THIS FILE!
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "dialog_job_config_base.h"
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
DIALOG_JOB_CONFIG_BASE::DIALOG_JOB_CONFIG_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) |
|||
{ |
|||
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); |
|||
|
|||
m_mainSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Options"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticText1->Wrap( -1 ); |
|||
m_mainSizer->Add( m_staticText1, 0, wxALL, 5 ); |
|||
|
|||
m_jobOptionsPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); |
|||
m_jobOptionsSizer = new wxFlexGridSizer( 0, 2, 0, 0 ); |
|||
m_jobOptionsSizer->SetFlexibleDirection( wxBOTH ); |
|||
m_jobOptionsSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); |
|||
|
|||
|
|||
m_jobOptionsPanel->SetSizer( m_jobOptionsSizer ); |
|||
m_jobOptionsPanel->Layout(); |
|||
m_jobOptionsSizer->Fit( m_jobOptionsPanel ); |
|||
m_mainSizer->Add( m_jobOptionsPanel, 1, wxEXPAND | wxALL, 5 ); |
|||
|
|||
m_sdbSizer1 = new wxStdDialogButtonSizer(); |
|||
m_sdbSizer1Save = new wxButton( this, wxID_SAVE ); |
|||
m_sdbSizer1->AddButton( m_sdbSizer1Save ); |
|||
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); |
|||
m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); |
|||
m_sdbSizer1->Realize(); |
|||
|
|||
m_mainSizer->Add( m_sdbSizer1, 0, wxEXPAND, 5 ); |
|||
|
|||
|
|||
this->SetSizer( m_mainSizer ); |
|||
this->Layout(); |
|||
m_mainSizer->Fit( this ); |
|||
|
|||
this->Centre( wxBOTH ); |
|||
} |
|||
|
|||
DIALOG_JOB_CONFIG_BASE::~DIALOG_JOB_CONFIG_BASE() |
|||
{ |
|||
} |
@ -0,0 +1,221 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
|||
<wxFormBuilder_Project> |
|||
<FileVersion major="1" minor="18"/> |
|||
<object class="Project" expanded="true"> |
|||
<property name="code_generation">C++</property> |
|||
<property name="cpp_class_decoration">; </property> |
|||
<property name="cpp_disconnect_events">1</property> |
|||
<property name="cpp_event_generation">connect</property> |
|||
<property name="cpp_help_provider">none</property> |
|||
<property name="cpp_namespace"></property> |
|||
<property name="cpp_precompiled_header"></property> |
|||
<property name="cpp_use_array_enum">0</property> |
|||
<property name="cpp_use_enum">0</property> |
|||
<property name="embedded_files_path">res</property> |
|||
<property name="encoding">UTF-8</property> |
|||
<property name="file">dialog_job_config_base</property> |
|||
<property name="first_id">1000</property> |
|||
<property name="internationalize">0</property> |
|||
<property name="lua_skip_events">1</property> |
|||
<property name="lua_ui_table">UI</property> |
|||
<property name="name">DIALOG_JOB_CONFIG_BASE</property> |
|||
<property name="path">.</property> |
|||
<property name="php_disconnect_events">0</property> |
|||
<property name="php_disconnect_mode">source_name</property> |
|||
<property name="php_skip_events">1</property> |
|||
<property name="python_disconnect_events">0</property> |
|||
<property name="python_disconnect_mode">source_name</property> |
|||
<property name="python_image_path_wrapper_function_name"></property> |
|||
<property name="python_indent_with_spaces"></property> |
|||
<property name="python_skip_events">1</property> |
|||
<property name="relative_path">1</property> |
|||
<property name="use_microsoft_bom">0</property> |
|||
<property name="use_native_eol">0</property> |
|||
<object class="Dialog" expanded="true"> |
|||
<property name="aui_managed">0</property> |
|||
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property> |
|||
<property name="bg"></property> |
|||
<property name="center">wxBOTH</property> |
|||
<property name="context_help"></property> |
|||
<property name="context_menu">1</property> |
|||
<property name="drag_accept_files">0</property> |
|||
<property name="enabled">1</property> |
|||
<property name="event_handler">impl_virtual</property> |
|||
<property name="extra_style"></property> |
|||
<property name="fg"></property> |
|||
<property name="font"></property> |
|||
<property name="hidden">0</property> |
|||
<property name="id">wxID_ANY</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">DIALOG_JOB_CONFIG_BASE</property> |
|||
<property name="pos"></property> |
|||
<property name="size"></property> |
|||
<property name="style">wxDEFAULT_DIALOG_STYLE</property> |
|||
<property name="subclass">DIALOG_SHIM; dialog_shim.h; forward_declare</property> |
|||
<property name="title"></property> |
|||
<property name="tooltip"></property> |
|||
<property name="two_step_creation">0</property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<object class="wxBoxSizer" expanded="true"> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">m_mainSizer</property> |
|||
<property name="orient">wxVERTICAL</property> |
|||
<property name="permission">protected</property> |
|||
<object class="sizeritem" expanded="true"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxALL</property> |
|||
<property name="proportion">0</property> |
|||
<object class="wxStaticText" expanded="true"> |
|||
<property name="BottomDockable">1</property> |
|||
<property name="LeftDockable">1</property> |
|||
<property name="RightDockable">1</property> |
|||
<property name="TopDockable">1</property> |
|||
<property name="aui_layer">0</property> |
|||
<property name="aui_name"></property> |
|||
<property name="aui_position">0</property> |
|||
<property name="aui_row">0</property> |
|||
<property name="best_size"></property> |
|||
<property name="bg"></property> |
|||
<property name="caption"></property> |
|||
<property name="caption_visible">1</property> |
|||
<property name="center_pane">0</property> |
|||
<property name="close_button">1</property> |
|||
<property name="context_help"></property> |
|||
<property name="context_menu">1</property> |
|||
<property name="default_pane">0</property> |
|||
<property name="dock">Dock</property> |
|||
<property name="dock_fixed">0</property> |
|||
<property name="docking">Left</property> |
|||
<property name="drag_accept_files">0</property> |
|||
<property name="enabled">1</property> |
|||
<property name="fg"></property> |
|||
<property name="floatable">1</property> |
|||
<property name="font"></property> |
|||
<property name="gripper">0</property> |
|||
<property name="hidden">0</property> |
|||
<property name="id">wxID_ANY</property> |
|||
<property name="label">Options</property> |
|||
<property name="markup">0</property> |
|||
<property name="max_size"></property> |
|||
<property name="maximize_button">0</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="min_size"></property> |
|||
<property name="minimize_button">0</property> |
|||
<property name="minimum_size"></property> |
|||
<property name="moveable">1</property> |
|||
<property name="name">m_staticText1</property> |
|||
<property name="pane_border">1</property> |
|||
<property name="pane_position"></property> |
|||
<property name="pane_size"></property> |
|||
<property name="permission">public</property> |
|||
<property name="pin_button">1</property> |
|||
<property name="pos"></property> |
|||
<property name="resize">Resizable</property> |
|||
<property name="show">1</property> |
|||
<property name="size"></property> |
|||
<property name="style"></property> |
|||
<property name="subclass">; ; forward_declare</property> |
|||
<property name="toolbar_pane">0</property> |
|||
<property name="tooltip"></property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style"></property> |
|||
<property name="wrap">-1</property> |
|||
</object> |
|||
</object> |
|||
<object class="sizeritem" expanded="true"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxEXPAND | wxALL</property> |
|||
<property name="proportion">1</property> |
|||
<object class="wxPanel" expanded="true"> |
|||
<property name="BottomDockable">1</property> |
|||
<property name="LeftDockable">1</property> |
|||
<property name="RightDockable">1</property> |
|||
<property name="TopDockable">1</property> |
|||
<property name="aui_layer">0</property> |
|||
<property name="aui_name"></property> |
|||
<property name="aui_position">0</property> |
|||
<property name="aui_row">0</property> |
|||
<property name="best_size"></property> |
|||
<property name="bg"></property> |
|||
<property name="caption"></property> |
|||
<property name="caption_visible">1</property> |
|||
<property name="center_pane">0</property> |
|||
<property name="close_button">1</property> |
|||
<property name="context_help"></property> |
|||
<property name="context_menu">1</property> |
|||
<property name="default_pane">0</property> |
|||
<property name="dock">Dock</property> |
|||
<property name="dock_fixed">0</property> |
|||
<property name="docking">Left</property> |
|||
<property name="drag_accept_files">0</property> |
|||
<property name="enabled">1</property> |
|||
<property name="fg"></property> |
|||
<property name="floatable">1</property> |
|||
<property name="font"></property> |
|||
<property name="gripper">0</property> |
|||
<property name="hidden">0</property> |
|||
<property name="id">wxID_ANY</property> |
|||
<property name="max_size"></property> |
|||
<property name="maximize_button">0</property> |
|||
<property name="maximum_size"></property> |
|||
<property name="min_size"></property> |
|||
<property name="minimize_button">0</property> |
|||
<property name="minimum_size"></property> |
|||
<property name="moveable">1</property> |
|||
<property name="name">m_jobOptionsPanel</property> |
|||
<property name="pane_border">1</property> |
|||
<property name="pane_position"></property> |
|||
<property name="pane_size"></property> |
|||
<property name="permission">protected</property> |
|||
<property name="pin_button">1</property> |
|||
<property name="pos"></property> |
|||
<property name="resize">Resizable</property> |
|||
<property name="show">1</property> |
|||
<property name="size"></property> |
|||
<property name="subclass">; ; forward_declare</property> |
|||
<property name="toolbar_pane">0</property> |
|||
<property name="tooltip"></property> |
|||
<property name="window_extra_style"></property> |
|||
<property name="window_name"></property> |
|||
<property name="window_style">wxTAB_TRAVERSAL</property> |
|||
<object class="wxFlexGridSizer" expanded="true"> |
|||
<property name="cols">2</property> |
|||
<property name="flexible_direction">wxBOTH</property> |
|||
<property name="growablecols"></property> |
|||
<property name="growablerows"></property> |
|||
<property name="hgap">0</property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">m_jobOptionsSizer</property> |
|||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property> |
|||
<property name="permission">protected</property> |
|||
<property name="rows">0</property> |
|||
<property name="vgap">0</property> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
<object class="sizeritem" expanded="true"> |
|||
<property name="border">5</property> |
|||
<property name="flag">wxEXPAND</property> |
|||
<property name="proportion">0</property> |
|||
<object class="wxStdDialogButtonSizer" expanded="true"> |
|||
<property name="Apply">0</property> |
|||
<property name="Cancel">1</property> |
|||
<property name="ContextHelp">0</property> |
|||
<property name="Help">0</property> |
|||
<property name="No">0</property> |
|||
<property name="OK">0</property> |
|||
<property name="Save">1</property> |
|||
<property name="Yes">0</property> |
|||
<property name="minimum_size"></property> |
|||
<property name="name">m_sdbSizer1</property> |
|||
<property name="permission">protected</property> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</object> |
|||
</wxFormBuilder_Project> |
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue