KiCad PCB EDA Suite
Loading...
Searching...
No Matches
footprint_editor_control.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) 2014 CERN
5
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
6
*
7
* @author Maciej Suminski <
[email protected]
>
8
*
9
* This program is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public License
11
* as published by the Free Software Foundation; either version 2
12
* of the License, or (at your option) any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, you may find one here:
21
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22
* or you may search the http://www.gnu.org website for the version 2 license,
23
* or you may write to the Free Software Foundation, Inc.,
24
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25
*/
26
27
#ifndef FOOTPRINT_EDITOR_CONTROL_H
28
#define FOOTPRINT_EDITOR_CONTROL_H
29
30
#include <
tools/pcb_tool_base.h
>
31
32
33
class
FOOTPRINT_EDIT_FRAME
;
34
class
DIALOG_FOOTPRINT_CHECKER
;
35
39
class
FOOTPRINT_EDITOR_CONTROL
:
public
PCB_TOOL_BASE
40
{
41
public
:
42
FOOTPRINT_EDITOR_CONTROL
();
43
45
void
Reset
(
RESET_REASON
aReason )
override
;
46
48
bool
Init
()
override
;
49
50
int
NewFootprint
(
const
TOOL_EVENT
& aEvent );
51
int
CreateFootprint
(
const
TOOL_EVENT
& aEvent );
52
53
int
Save
(
const
TOOL_EVENT
& aEvent );
54
int
SaveAs
(
const
TOOL_EVENT
& aEvent );
55
int
Revert
(
const
TOOL_EVENT
& aEvent );
56
57
int
EditFootprint
(
const
TOOL_EVENT
& aEvent );
58
int
EditLibraryFootprint
(
const
TOOL_EVENT
& aEvent );
59
int
CutCopyFootprint
(
const
TOOL_EVENT
& aEvent );
60
int
PasteFootprint
(
const
TOOL_EVENT
& aEvent );
61
int
DuplicateFootprint
(
const
TOOL_EVENT
& aEvent );
62
int
RenameFootprint
(
const
TOOL_EVENT
& aEvent );
63
int
DeleteFootprint
(
const
TOOL_EVENT
& aEvent );
64
int
ImportFootprint
(
const
TOOL_EVENT
& aEvent );
65
int
ExportFootprint
(
const
TOOL_EVENT
& aEvent );
66
int
OpenDirectory
(
const
TOOL_EVENT
& aEvent );
67
int
OpenWithTextEditor
(
const
TOOL_EVENT
& aEvent );
68
int
ShowDatasheet
(
const
TOOL_EVENT
& aEvent );
69
70
int
ToggleLayersManager
(
const
TOOL_EVENT
& aEvent );
71
int
ToggleProperties
(
const
TOOL_EVENT
& aEvent );
72
int
Properties
(
const
TOOL_EVENT
& aEvent );
73
74
int
EditTextAndGraphics
(
const
TOOL_EVENT
& aEvent );
75
76
int
CheckFootprint
(
const
TOOL_EVENT
& aEvent );
77
void
CrossProbe
(
const
PCB_MARKER
* aMarker );
78
void
DestroyCheckerDialog
();
79
80
int
CleanupGraphics
(
const
TOOL_EVENT
& aEvent );
81
int
RepairFootprint
(
const
TOOL_EVENT
& aEvent );
82
86
int
DefaultPadProperties
(
const
TOOL_EVENT
& aEvent );
87
88
private
:
90
void
setTransitions
()
override
;
91
95
void
tryToSaveFootprintInLibrary
(
FOOTPRINT
& aFootprint,
const
LIB_ID
& aLibId );
96
97
FOOTPRINT_EDIT_FRAME
*
m_frame
;
98
DIALOG_FOOTPRINT_CHECKER
*
m_checkerDialog
;
99
100
// A private clipboard for cut/copy/past of an entire footprint
101
std::unique_ptr<FOOTPRINT>
m_copiedFootprint
;
102
};
103
104
#endif
// FOOTPRINT_EDITOR_CONTROL_H
DIALOG_FOOTPRINT_CHECKER
Definition:
dialog_footprint_checker.h:36
FOOTPRINT_EDITOR_CONTROL
Module editor specific tools.
Definition:
footprint_editor_control.h:40
FOOTPRINT_EDITOR_CONTROL::Revert
int Revert(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:369
FOOTPRINT_EDITOR_CONTROL::OpenWithTextEditor
int OpenWithTextEditor(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:659
FOOTPRINT_EDITOR_CONTROL::PasteFootprint
int PasteFootprint(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:397
FOOTPRINT_EDITOR_CONTROL::m_checkerDialog
DIALOG_FOOTPRINT_CHECKER * m_checkerDialog
Definition:
footprint_editor_control.h:98
FOOTPRINT_EDITOR_CONTROL::CutCopyFootprint
int CutCopyFootprint(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:376
FOOTPRINT_EDITOR_CONTROL::EditFootprint
int EditFootprint(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:729
FOOTPRINT_EDITOR_CONTROL::ToggleProperties
int ToggleProperties(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:762
FOOTPRINT_EDITOR_CONTROL::Save
int Save(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:301
FOOTPRINT_EDITOR_CONTROL::OpenDirectory
int OpenDirectory(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:588
FOOTPRINT_EDITOR_CONTROL::FOOTPRINT_EDITOR_CONTROL
FOOTPRINT_EDITOR_CONTROL()
Definition:
footprint_editor_control.cpp:60
FOOTPRINT_EDITOR_CONTROL::DestroyCheckerDialog
void DestroyCheckerDialog()
Definition:
footprint_editor_control.cpp:826
FOOTPRINT_EDITOR_CONTROL::CreateFootprint
int CreateFootprint(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:239
FOOTPRINT_EDITOR_CONTROL::EditTextAndGraphics
int EditTextAndGraphics(const TOOL_EVENT &aEvent)
Definition:
pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp:631
FOOTPRINT_EDITOR_CONTROL::m_frame
FOOTPRINT_EDIT_FRAME * m_frame
Definition:
footprint_editor_control.h:97
FOOTPRINT_EDITOR_CONTROL::NewFootprint
int NewFootprint(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:205
FOOTPRINT_EDITOR_CONTROL::DefaultPadProperties
int DefaultPadProperties(const TOOL_EVENT &aEvent)
Edit the properties used for new pad creation.
Definition:
footprint_editor_control.cpp:781
FOOTPRINT_EDITOR_CONTROL::CrossProbe
void CrossProbe(const PCB_MARKER *aMarker)
Definition:
footprint_editor_control.cpp:814
FOOTPRINT_EDITOR_CONTROL::ImportFootprint
int ImportFootprint(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:551
FOOTPRINT_EDITOR_CONTROL::CleanupGraphics
int CleanupGraphics(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:788
FOOTPRINT_EDITOR_CONTROL::ShowDatasheet
int ShowDatasheet(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:708
FOOTPRINT_EDITOR_CONTROL::tryToSaveFootprintInLibrary
void tryToSaveFootprintInLibrary(FOOTPRINT &aFootprint, const LIB_ID &aLibId)
Try to save the footprint in the library, if it is valid and writable.
Definition:
footprint_editor_control.cpp:165
FOOTPRINT_EDITOR_CONTROL::Properties
int Properties(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:769
FOOTPRINT_EDITOR_CONTROL::ToggleLayersManager
int ToggleLayersManager(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:755
FOOTPRINT_EDITOR_CONTROL::RepairFootprint
int RepairFootprint(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:836
FOOTPRINT_EDITOR_CONTROL::RenameFootprint
int RenameFootprint(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:442
FOOTPRINT_EDITOR_CONTROL::DuplicateFootprint
int DuplicateFootprint(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:420
FOOTPRINT_EDITOR_CONTROL::m_copiedFootprint
std::unique_ptr< FOOTPRINT > m_copiedFootprint
Definition:
footprint_editor_control.h:101
FOOTPRINT_EDITOR_CONTROL::Init
bool Init() override
Init() is called once upon a registration of the tool.
Definition:
footprint_editor_control.cpp:77
FOOTPRINT_EDITOR_CONTROL::ExportFootprint
int ExportFootprint(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:579
FOOTPRINT_EDITOR_CONTROL::EditLibraryFootprint
int EditLibraryFootprint(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:736
FOOTPRINT_EDITOR_CONTROL::DeleteFootprint
int DeleteFootprint(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:535
FOOTPRINT_EDITOR_CONTROL::SaveAs
int SaveAs(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:323
FOOTPRINT_EDITOR_CONTROL::setTransitions
void setTransitions() override
< Set up handlers for various events.
Definition:
footprint_editor_control.cpp:904
FOOTPRINT_EDITOR_CONTROL::CheckFootprint
int CheckFootprint(const TOOL_EVENT &aEvent)
Definition:
footprint_editor_control.cpp:798
FOOTPRINT_EDIT_FRAME
Definition:
footprint_edit_frame.h:41
FOOTPRINT
Definition:
footprint.h:119
LIB_ID
A logical library item identifier and consists of various portions much like a URI.
Definition:
lib_id.h:49
PCB_MARKER
Definition:
pcb_marker.h:43
PCB_TOOL_BASE
Definition:
pcb_tool_base.h:71
TOOL_BASE::RESET_REASON
RESET_REASON
Determine the reason of reset for a tool.
Definition:
tool_base.h:78
TOOL_EVENT
Generic, UI-independent tool event.
Definition:
tool_event.h:167
Reset
void Reset() override
pcb_tool_base.h
src
pcbnew
tools
footprint_editor_control.h
Generated on Sun Dec 22 2024 00:05:29 for KiCad PCB EDA Suite by
1.9.6