KiCad PCB EDA Suite
Loading...
Searching...
No Matches
eeschema_jobs_handler.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2022 Mark Roszko <[email protected]>
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21#ifndef EESCHEMA_JOBS_HANDLER_H
22#define EESCHEMA_JOBS_HANDLER_H
23
24#include <jobs/job_dispatcher.h>
26#include <wx/string.h>
27
29class KIWAY;
30class SCHEMATIC;
32class LIB_SYMBOL;
34class REPORTER;
35class wxWindow;
36
41{
42public:
44 int JobExportBom( JOB* aJob );
45 int JobExportPythonBom( JOB* aJob );
46 int JobExportNetlist( JOB* aJob );
47 int JobExportPlot( JOB* aJob );
48 int JobSchErc( JOB* aJob );
49 int JobSymUpgrade( JOB* aJob );
50 int JobSymExportSvg( JOB* aJob );
51 int JobUpgrade( JOB* aJob );
52 int JobImport( JOB* aJob );
53 int JobSchDiff( JOB* aJob );
54 int JobSymDiff( JOB* aJob );
55
58 int RunMerge( KICAD_DIFF::DOC_KIND aKind, const wxString& aAncestor, const wxString& aOurs,
59 const wxString& aTheirs, const wxString& aOutput, bool aInteractive,
60 bool aSingleFile, REPORTER* aReporter );
61 int OpenDiffDialog( KICAD_DIFF::DOC_KIND aKind, const wxString& aFileA, const wxString& aFileB,
62 const wxString& aLabelA, const wxString& aLabelB, wxWindow* aParent,
63 REPORTER* aReporter );
64
65private:
66 int runSchMerge( const wxString& aAncestor, const wxString& aOurs, const wxString& aTheirs,
67 const wxString& aOutput, bool aInteractive );
68 int runSymLibMerge( const wxString& aAncestor, const wxString& aOurs, const wxString& aTheirs,
69 const wxString& aOutput );
70
71public:
72
78
90 void InitRenderSettings( SCH_RENDER_SETTINGS* aRenderSettings, const wxString& aTheme,
91 SCHEMATIC* aSch,
92 const wxString& aDrawingSheetOverride = wxEmptyString );
93
94private:
95 SCHEMATIC* getSchematic( const wxString& aPath );
96
97 int doSymExportSvg( JOB_SYM_EXPORT_SVG* aSvgJob, SCH_RENDER_SETTINGS* aRenderSettings,
98 LIB_SYMBOL* symbol );
99
101
103};
104
105#endif
int runSchMerge(const wxString &aAncestor, const wxString &aOurs, const wxString &aTheirs, const wxString &aOutput, bool aInteractive)
void InitRenderSettings(SCH_RENDER_SETTINGS *aRenderSettings, const wxString &aTheme, SCHEMATIC *aSch, const wxString &aDrawingSheetOverride=wxEmptyString)
Configure the SCH_RENDER_SETTINGS object with the correct data to be used with plotting.
int RunMerge(KICAD_DIFF::DOC_KIND aKind, const wxString &aAncestor, const wxString &aOurs, const wxString &aTheirs, const wxString &aOutput, bool aInteractive, bool aSingleFile, REPORTER *aReporter)
Non-job entry points (reached via the kiface KIFACE_MERGE_DOCUMENT / KIFACE_OPEN_DIFF_DIALOG function...
SCHEMATIC * getSchematic(const wxString &aPath)
DS_PROXY_VIEW_ITEM * getDrawingSheetProxyView(SCHEMATIC *aSch)
int runSymLibMerge(const wxString &aAncestor, const wxString &aOurs, const wxString &aTheirs, const wxString &aOutput)
int OpenDiffDialog(KICAD_DIFF::DOC_KIND aKind, const wxString &aFileA, const wxString &aFileB, const wxString &aLabelA, const wxString &aLabelB, wxWindow *aParent, REPORTER *aReporter)
void ClearCachedSchematic()
Clear the cached CLI schematic so the next job reloads from the current project.
int doSymExportSvg(JOB_SYM_EXPORT_SVG *aSvgJob, SCH_RENDER_SETTINGS *aRenderSettings, LIB_SYMBOL *symbol)
JOB_DISPATCHER(KIWAY *aKiway)
An simple container class that lets us dispatch output jobs to kifaces.
Definition job.h:184
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition kiway.h:311
Define a library symbol object.
Definition lib_symbol.h:79
A pure virtual class used to derive REPORTER objects from.
Definition reporter.h:71
Holds all the data relating to one schematic.
Definition schematic.h:90
DOC_KIND
Document type a diff/merge entry point should route to, derived from a file path's extension.