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 The 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, see <https://www.gnu.org/licenses/>.
20 */
21
22#ifndef PCBREANNOTATETOOL_H_
23#define PCBREANNOTATETOOL_H_
24
26#include <pcb_edit_frame.h>
27#include <tools/pcb_actions.h>
28#include <tools/pcb_tool_base.h>
29
30
31class BOARD_REANNOTATE_TOOL : public wxEvtHandler, public PCB_TOOL_BASE
32{
33public:
35
36 bool Init() override;
37 void Reset( RESET_REASON aReason ) override;
38 int ShowReannotateDialog( const TOOL_EVENT& aEvent );
39
41
42 int ReannotateDuplicates( const PCB_SELECTION& aSelectionToReannotate,
43 const std::vector<EDA_ITEM*>& aAdditionalFootprints );
44
45private:
46 void setTransitions() override; //> Bind handlers to corresponding TOOL_ACTIONs
47
48private:
50 PCB_EDIT_FRAME* m_frame; // Pointer to the currently used edit frame.
51};
52
53#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:
PCB_TOOL_BASE(TOOL_ID aId, const std::string &aName)
Constructor.
RESET_REASON
Determine the reason of reset for a tool.
Definition tool_base.h:74
Generic, UI-independent tool event.
Definition tool_event.h:167
void Reset() override