KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_inspection_tool.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) 2019 CERN
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU 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 SCH_INSPECTION_TOOL_H
22#define SCH_INSPECTION_TOOL_H
23
24#include <tools/sch_tool_base.h>
26#include <sch_base_frame.h>
27
28
30class SCH_BASE_FRAME;
31class DIALOG_ERC;
33
34
35class SCH_INSPECTION_TOOL : public wxEvtHandler, public SCH_TOOL_BASE<SCH_BASE_FRAME>
36{
37public:
40
42 bool Init() override;
43
44 void Reset( RESET_REASON aReason ) override;
45
46 int RunERC( const TOOL_EVENT& aEvent );
47 void ShowERCDialog();
48
49 int PrevMarker( const TOOL_EVENT& aEvent );
50 int NextMarker( const TOOL_EVENT& aEvent );
51
53 int CrossProbe( const TOOL_EVENT& aEvent );
54
55 void CrossProbe( const SCH_MARKER* aMarker );
56
57 wxString InspectERCErrorMenuText( const std::shared_ptr<RC_ITEM>& aERCItem );
58 void InspectERCError( const std::shared_ptr<RC_ITEM>& aERCItem );
59
60 int ExcludeMarker( const TOOL_EVENT& aEvent );
61
62 int ShowBusSyntaxHelp( const TOOL_EVENT& aEvent );
63
64 int CheckSymbol( const TOOL_EVENT& aEvent );
65 int DiffSymbol( const TOOL_EVENT& aEvent );
66 void DiffSymbol( SCH_SYMBOL* aSymbol );
67
69 int CompareSchematicWithFile( const TOOL_EVENT& aEvent );
70
72 int CompareSchematicWithHistory( const TOOL_EVENT& aEvent );
73
74 int RunSimulation( const TOOL_EVENT& aEvent );
75
76 int ShowDatasheet( const TOOL_EVENT& aEvent );
77
79 int UpdateMessagePanel( const TOOL_EVENT& aEvent );
80
81private:
83 int showSchematicComparison( const wxString& aOtherPath, const wxString& aProjectPath,
84 const wxString& aComparisonLabel );
85
86 SYMBOL_DIFF_WIDGET* constructDiffPanel( wxPanel* aParentPanel );
87
89 void setTransitions() override;
90
91private:
93};
94
95#endif /* SCH_INSPECTION_TOOL_H */
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
int CompareSchematicWithHistory(const TOOL_EVENT &aEvent)
Diff the current schematic against the most recent local-history commit.
void InspectERCError(const std::shared_ptr< RC_ITEM > &aERCItem)
bool Init() override
Init() is called once upon a registration of the tool.
SYMBOL_DIFF_WIDGET * constructDiffPanel(wxPanel *aParentPanel)
This method is meant to be overridden in order to specify handlers for events.
int NextMarker(const TOOL_EVENT &aEvent)
int DiffSymbol(const TOOL_EVENT &aEvent)
int RunERC(const TOOL_EVENT &aEvent)
HTML_MESSAGE_BOX * m_busSyntaxHelp
int RunSimulation(const TOOL_EVENT &aEvent)
int ShowDatasheet(const TOOL_EVENT &aEvent)
wxString InspectERCErrorMenuText(const std::shared_ptr< RC_ITEM > &aERCItem)
int ExcludeMarker(const TOOL_EVENT &aEvent)
int CheckSymbol(const TOOL_EVENT &aEvent)
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
int UpdateMessagePanel(const TOOL_EVENT &aEvent)
Display the selected item info (when clicking on a item)
int PrevMarker(const TOOL_EVENT &aEvent)
int showSchematicComparison(const wxString &aOtherPath, const wxString &aProjectPath, const wxString &aComparisonLabel)
Diff the schematic at aOtherPath against the live one and show the dialog.
int CompareSchematicWithFile(const TOOL_EVENT &aEvent)
Diff the current schematic against a user-selected .kicad_sch file.
int CrossProbe(const TOOL_EVENT &aEvent)
Called when clicking on a item:
int ShowBusSyntaxHelp(const TOOL_EVENT &aEvent)
Schematic symbol object.
Definition sch_symbol.h:69
SCH_TOOL_BASE(const std::string &aName)
Generic, UI-independent tool event.
Definition tool_event.h:167
void Reset() override