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
38
39namespace KICAD_DIFF
40{
42struct DOCUMENT_DIFF;
43} // namespace KICAD_DIFF
44
49{
50public:
52 int JobExportBom( JOB* aJob );
53 int JobExportPythonBom( JOB* aJob );
54 int JobExportNetlist( JOB* aJob );
55 int JobExportPlot( JOB* aJob );
56 int JobSchErc( JOB* aJob );
57 int JobSymUpgrade( JOB* aJob );
58 int JobSymExportSvg( JOB* aJob );
59 int JobUpgrade( JOB* aJob );
60 int JobDowngrade( JOB* aJob );
61 int JobImport( JOB* aJob );
62 int JobSchDiff( JOB* aJob );
63 int JobSymDiff( JOB* aJob );
64
67 int RunMerge( KICAD_DIFF::DOC_KIND aKind, const wxString& aAncestor, const wxString& aOurs,
68 const wxString& aTheirs, const wxString& aOutput, bool aInteractive,
69 bool aSingleFile, REPORTER* aReporter );
70 int OpenDiffDialog( KICAD_DIFF::DOC_KIND aKind, const wxString& aFileA, const wxString& aFileB,
71 const wxString& aLabelA, const wxString& aLabelB, wxWindow* aParent,
72 REPORTER* aReporter );
73
77 const wxString& aFileB, WIDGET_DIFF_CANVAS* aBefore,
79 REPORTER* aReporter );
80
81private:
82 int runSchMerge( const wxString& aAncestor, const wxString& aOurs, const wxString& aTheirs,
83 const wxString& aOutput, bool aInteractive );
84 int runSymLibMerge( const wxString& aAncestor, const wxString& aOurs, const wxString& aTheirs,
85 const wxString& aOutput );
86
87public:
88
94
107 void InitRenderSettings( SCH_RENDER_SETTINGS* aRenderSettings, const wxString& aTheme,
108 SCHEMATIC* aSch,
109 const wxString& aDrawingSheetOverride = wxEmptyString );
110
111private:
112 SCHEMATIC* getSchematic( const wxString& aPath, bool aRequireRoot = true );
113
114 int doSymExportSvg( JOB_SYM_EXPORT_SVG* aSvgJob, SCH_RENDER_SETTINGS* aRenderSettings,
115 LIB_SYMBOL* symbol );
116
118
121};
122
123#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...
DS_PROXY_VIEW_ITEM * getDrawingSheetProxyView(SCHEMATIC *aSch)
KICAD_DIFF::DIFF_CANVAS_CONTEXT * AttachDiffCanvases(KICAD_DIFF::DOC_KIND aKind, const wxString &aFileA, const wxString &aFileB, WIDGET_DIFF_CANVAS *aBefore, WIDGET_DIFF_CANVAS *aAfter, KICAD_DIFF::DOCUMENT_DIFF &aDiff, REPORTER *aReporter)
Diff two schematics for a window outside the kiface, drawing the first on aBefore and the second on a...
int runSymLibMerge(const wxString &aAncestor, const wxString &aOurs, const wxString &aTheirs, const wxString &aOutput)
SCHEMATIC * getSchematic(const wxString &aPath, bool aRequireRoot=true)
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
Keeps the documents drawn on a pair of diff canvases alive.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition kiway.h:348
Define a library symbol object.
Definition lib_symbol.h:114
A pure virtual class used to derive REPORTER objects from.
Definition reporter.h:73
Holds all the data relating to one schematic.
Definition schematic.h:149
GAL-backed canvas for visualizing a KICAD_DIFF::DIFF_SCENE.
DOC_KIND
Document type a diff/merge entry point should route to, derived from a file path's extension.
The full set of changes between two parsed documents of one type.