KiCad PCB EDA Suite
pcb_reannotate_tool.cpp
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) 2020 Brian Piccioni brian@documenteddesigns.com
5  * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
6  * @author Brian Piccioni <brian@documenteddesigns.com>
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 #include <tool/tool_manager.h>
27 #include <wx/filedlg.h>
28 #include <wx/wx.h>
30 
31 
33  PCB_TOOL_BASE( "pcbnew.ReannotateTool" ),
34  m_frame( nullptr )
35 {
36 }
37 
38 
40 {
41  return true;
42 }
43 
44 
46 {
47  m_frame = getEditFrame<PCB_EDIT_FRAME>();
48 }
49 
50 
52 {
54  dialog.ShowModal();
55  return 0;
56 }
57 
58 
60 {
62 }
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
bool Init() override
Function Init() Init() is called once upon a registration of the tool.
void Go(int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
Function Go()
int ShowReannotateDialog(const TOOL_EVENT &aEvent)
void Reset(RESET_REASON aReason) override
Function Reset() Brings the tool to a known, initial state.
PCB_EDIT_FRAME * m_frame
static TOOL_ACTION boardReannotate
Definition: pcb_actions.h:434
TOOL_EVENT.
Definition: tool_event.h:171
RESET_REASON
Determines the reason of reset for a tool
Definition: tool_base.h:79