KiCad PCB EDA Suite
Loading...
Searching...
No Matches
board_reannotate_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) 2020 Brian Piccioni [email protected]
5 * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
6 * @author Brian Piccioni <[email protected]>
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#ifndef PCBREANNOTATETOOL_H_
27#define PCBREANNOTATETOOL_H_
28
30#include <pcb_edit_frame.h>
31#include <tools/pcb_actions.h>
32#include <tools/pcb_tool_base.h>
33
34
35class BOARD_REANNOTATE_TOOL : public wxEvtHandler, public PCB_TOOL_BASE
36{
37public:
39
40 bool Init() override;
41 void Reset( RESET_REASON aReason ) override;
42 int ShowReannotateDialog( const TOOL_EVENT& aEvent );
43
45
46 int ReannotateDuplicates( const PCB_SELECTION& aSelectionToReannotate,
47 const std::vector<EDA_ITEM*>& aAdditionalFootprints );
48
49private:
50 void setTransitions() override; //> Bind handlers to corresponding TOOL_ACTIONs
51
52private:
54 PCB_EDIT_FRAME* m_frame; // Pointer to the currently used edit frame.
55};
56
57#endif /* PCBREANNOTATETOOL_H_ */
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
int ReannotateDuplicates(const PCB_SELECTION &aSelectionToReannotate, const std::vector< EDA_ITEM * > &aAdditionalFootprints)
PCB_SELECTION_TOOL * m_selectionTool
int ShowReannotateDialog(const TOOL_EVENT &aEvent)
bool Init() override
Init() is called once upon a registration of the tool.
The main frame for Pcbnew.
The selection tool: currently supports:
RESET_REASON
Determine the reason of reset for a tool.
Definition: tool_base.h:78
Generic, UI-independent tool event.
Definition: tool_event.h:167
void Reset() override