KiCad PCB EDA Suite
board_commit.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) 2016 CERN
5  * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #ifndef __BOARD_COMMIT_H
26 #define __BOARD_COMMIT_H
27 
28 #include <commit.h>
29 
30 class BOARD_ITEM;
31 class PICKED_ITEMS_LIST;
32 class PCB_TOOL;
33 class PCB_BASE_FRAME;
34 class TOOL_MANAGER;
35 
36 class BOARD_COMMIT : public COMMIT
37 {
38 public:
39  BOARD_COMMIT( PCB_TOOL* aTool );
40  BOARD_COMMIT( PCB_BASE_FRAME* aFrame );
41  virtual ~BOARD_COMMIT();
42 
43  virtual void Push( const wxString& aMessage = wxT( "A commit" ), bool aCreateUndoEntry = true ) override;
44  virtual void Revert() override;
45 
46 private:
49  virtual EDA_ITEM* parentObject( EDA_ITEM* aItem ) const override;
50 };
51 
52 #endif
BOARD_COMMIT(PCB_TOOL *aTool)
Class BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class...
virtual void Revert() override
Revertes the commit by restoring the modifed items state.
Class COMMIT.
Definition: commit.h:71
TOOL_MANAGER * m_toolMgr
Definition: board_commit.h:47
virtual ~BOARD_COMMIT()
virtual EDA_ITEM * parentObject(EDA_ITEM *aItem) const override
virtual void Push(const wxString &aMessage=wxT("A commit"), bool aCreateUndoEntry=true) override
Executes the changes.
Class TOOL_MANAGER.
Definition: tool_manager.h:49
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
bool m_editModules
Definition: board_commit.h:48
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:165
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer...