KiCad PCB EDA Suite
Loading...
Searching...
No Matches
match_properties_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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef MATCH_PROPERTIES_TOOL_H
21#define MATCH_PROPERTIES_TOOL_H
22
23#include <set>
24
25#include <tools/pcb_tool_base.h>
26
28
29
31{
32public:
34
35 bool Init() override;
36 int Match( const TOOL_EVENT& aEvent );
37
38protected:
39 void setTransitions() override;
40
41private:
43 void showSettingsDialog( const EDA_ITEM& aSource );
44
46 int runInteractive( const TOOL_EVENT& aEvent, const KIID& aSourceId );
47
48 const std::set<wxString>& enabledKeys();
49
50 bool applyToTargets( const EDA_ITEM& aSource, const std::vector<EDA_ITEM*>& aTargets );
51
53};
54
55#endif
A base class for most all the KiCad significant classes used in schematics and boards.
Definition eda_item.h:98
Definition kiid.h:46
void showSettingsDialog(const EDA_ITEM &aSource)
Only the running tool opens this, and only for the source it is copying from.
bool Init() override
Init() is called once upon a registration of the tool.
int Match(const TOOL_EVENT &aEvent)
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
PCB_SELECTION_TOOL * m_selectionTool
bool applyToTargets(const EDA_ITEM &aSource, const std::vector< EDA_ITEM * > &aTargets)
int runInteractive(const TOOL_EVENT &aEvent, const KIID &aSourceId)
The picker session. aSourceId is niluuid when the first click still has to name it.
const std::set< wxString > & enabledKeys()
The selection tool: currently supports:
PCB_TOOL_BASE(TOOL_ID aId, const std::string &aName)
Constructor.
Generic, UI-independent tool event.
Definition tool_event.h:167