KiCad PCB EDA Suite
Loading...
Searching...
No Matches
footprint_editor_tab_context.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 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
#include <
footprint_editor_tab_context.h
>
21
22
#include <
board.h
>
23
#include <
footprint.h
>
24
25
26
FOOTPRINT_EDITOR_TAB_CONTEXT::FOOTPRINT_EDITOR_TAB_CONTEXT
(
const
wxString& aLib,
27
const
wxString& aName,
28
std::unique_ptr<BOARD> aBoard ) :
29
m_lib
( aLib ),
30
m_name
( aName ),
31
m_board
(
std
::
move
( aBoard ) ),
32
m_footprintNameWhenLoaded
( aName )
33
{
34
}
35
36
37
FOOTPRINT_EDITOR_TAB_CONTEXT::FOOTPRINT_EDITOR_TAB_CONTEXT
(
const
KIID
& aSourceUuid,
38
const
wxString& aReference,
39
std::unique_ptr<BOARD> aBoard ) :
40
m_board
(
std
::
move
( aBoard ) ),
41
m_fromBoard
( true ),
42
m_sourceUuid
( aSourceUuid ),
43
m_reference
( aReference )
44
{
45
}
46
47
48
FOOTPRINT_EDITOR_TAB_CONTEXT::~FOOTPRINT_EDITOR_TAB_CONTEXT
() =
default
;
49
50
51
bool
FOOTPRINT_EDITOR_TAB_CONTEXT::IsModified
()
const
52
{
53
return
m_modified
&&
m_board
&&
m_board
->GetFirstFootprint();
54
}
55
56
57
void
FOOTPRINT_EDITOR_TAB_CONTEXT::SetOriginalFootprintCopy
( std::unique_ptr<FOOTPRINT> aCopy )
58
{
59
m_originalFootprintCopy
= std::move( aCopy );
60
}
BITMAPS::move
@ move
Definition
bitmaps_list.h:374
board.h
FOOTPRINT_EDITOR_TAB_CONTEXT::m_footprintNameWhenLoaded
wxString m_footprintNameWhenLoaded
Definition
footprint_editor_tab_context.h:124
FOOTPRINT_EDITOR_TAB_CONTEXT::m_lib
wxString m_lib
Definition
footprint_editor_tab_context.h:120
FOOTPRINT_EDITOR_TAB_CONTEXT::m_sourceUuid
KIID m_sourceUuid
Reference designator of the source footprint, shown as the tab label.
Definition
footprint_editor_tab_context.h:131
FOOTPRINT_EDITOR_TAB_CONTEXT::m_originalFootprintCopy
std::unique_ptr< FOOTPRINT > m_originalFootprintCopy
Definition
footprint_editor_tab_context.h:123
FOOTPRINT_EDITOR_TAB_CONTEXT::m_name
wxString m_name
Definition
footprint_editor_tab_context.h:121
FOOTPRINT_EDITOR_TAB_CONTEXT::~FOOTPRINT_EDITOR_TAB_CONTEXT
~FOOTPRINT_EDITOR_TAB_CONTEXT() override
FOOTPRINT_EDITOR_TAB_CONTEXT::m_board
std::unique_ptr< BOARD > m_board
Definition
footprint_editor_tab_context.h:122
FOOTPRINT_EDITOR_TAB_CONTEXT::m_modified
bool m_modified
True for an instance tab edited in place from a placed board footprint.
Definition
footprint_editor_tab_context.h:125
FOOTPRINT_EDITOR_TAB_CONTEXT::SetOriginalFootprintCopy
void SetOriginalFootprintCopy(std::unique_ptr< FOOTPRINT > aCopy)
Definition
footprint_editor_tab_context.cpp:57
FOOTPRINT_EDITOR_TAB_CONTEXT::IsModified
bool IsModified() const override
True only when dirty and the board actually holds a footprint to edit.
Definition
footprint_editor_tab_context.cpp:51
FOOTPRINT_EDITOR_TAB_CONTEXT::FOOTPRINT_EDITOR_TAB_CONTEXT
FOOTPRINT_EDITOR_TAB_CONTEXT(const wxString &aLib, const wxString &aName, std::unique_ptr< BOARD > aBoard)
Definition
footprint_editor_tab_context.cpp:26
FOOTPRINT_EDITOR_TAB_CONTEXT::m_fromBoard
bool m_fromBoard
Source board footprint UUID, used as the de-dup key and save-back target.
Definition
footprint_editor_tab_context.h:128
FOOTPRINT_EDITOR_TAB_CONTEXT::m_reference
wxString m_reference
Editor-to-board UUID remap used to save instance edits back to the original board items.
Definition
footprint_editor_tab_context.h:134
KIID
Definition
kiid.h:44
footprint.h
footprint_editor_tab_context.h
std
STL namespace.
src
pcbnew
footprint_editor_tab_context.cpp
Generated on Fri Jun 19 2026 00:06:47 for KiCad PCB EDA Suite by
1.13.2