KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_edit_table_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) 2024 KiCad Developers, see AUTHORS.txt for contributors.
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU 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, you may find one here:
18
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19
* or you may search the http://www.gnu.org website for the version 2 license,
20
* or you may write to the Free Software Foundation, Inc.,
21
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22
*/
23
24
#ifndef PCB_EDIT_TABLE_TOOL_H
25
#define PCB_EDIT_TABLE_TOOL_H
26
27
#include <
tools/pcb_tool_base.h
>
28
#include <
tool/edit_table_tool_base.h
>
29
#include <
pcb_table.h
>
30
#include <
pcb_tablecell.h
>
31
#include <
board_commit.h
>
32
33
34
class
PCB_EDIT_TABLE_TOOL
:
public
PCB_TOOL_BASE
,
35
public
EDIT_TABLE_TOOL_BASE
<PCB_TABLE, PCB_TABLECELL, BOARD_COMMIT>
36
{
37
public
:
38
PCB_EDIT_TABLE_TOOL
();
39
~PCB_EDIT_TABLE_TOOL
()
override
{ }
40
42
bool
Init
()
override
;
43
44
int
AddRowAbove
(
const
TOOL_EVENT
& aEvent ) {
return
doAddRowAbove
( aEvent ); }
45
int
AddRowBelow
(
const
TOOL_EVENT
& aEvent ) {
return
doAddRowBelow
( aEvent ); }
46
int
AddColumnBefore
(
const
TOOL_EVENT
& aEvent ) {
return
doAddColumnBefore
( aEvent ); }
47
int
AddColumnAfter
(
const
TOOL_EVENT
& aEvent ) {
return
doAddColumnAfter
( aEvent ); }
48
int
DeleteRows
(
const
TOOL_EVENT
& aEvent ) {
return
doDeleteRows
( aEvent ); }
49
int
DeleteColumns
(
const
TOOL_EVENT
& aEvent ) {
return
doDeleteColumns
( aEvent ); }
50
51
int
MergeCells
(
const
TOOL_EVENT
& aEvent ) {
return
doMergeCells
( aEvent ); }
52
int
UnmergeCells
(
const
TOOL_EVENT
& aEvent ) {
return
doUnmergeCells
( aEvent ); }
53
54
int
EditTable
(
const
TOOL_EVENT
& aEvent );
55
56
private
:
58
void
setTransitions
()
override
;
59
60
private
:
61
TOOL_MANAGER
*
getToolMgr
()
override
{
return
m_toolMgr
; }
62
BASE_SCREEN
*
getScreen
()
override
{
return
nullptr
; }
63
64
const
SELECTION
&
getTableCellSelection
()
override
;
65
void
clearSelection
()
override
;
66
67
PCB_TABLECELL
*
copyCell
(
PCB_TABLECELL
* aSource )
override
;
68
};
69
70
#endif
//PCB_EDIT_TABLE_TOOL_H
board_commit.h
BASE_SCREEN
Handles how to draw a screen (a board, a schematic ...)
Definition:
base_screen.h:41
EDIT_TABLE_TOOL_BASE
SCH_TABLE_EDIT_TOOL and PCB_TABLE_EDIT_TOOL share most of their algorithms, which are implemented her...
Definition:
edit_table_tool_base.h:43
EDIT_TABLE_TOOL_BASE< PCB_TABLE, PCB_TABLECELL, BOARD_COMMIT >::doDeleteColumns
int doDeleteColumns(const TOOL_EVENT &aEvent)
Definition:
edit_table_tool_base.h:397
EDIT_TABLE_TOOL_BASE< PCB_TABLE, PCB_TABLECELL, BOARD_COMMIT >::doAddColumnAfter
int doAddColumnAfter(const TOOL_EVENT &aEvent)
Definition:
edit_table_tool_base.h:269
EDIT_TABLE_TOOL_BASE< PCB_TABLE, PCB_TABLECELL, BOARD_COMMIT >::doAddRowBelow
int doAddRowBelow(const TOOL_EVENT &aEvent)
Definition:
edit_table_tool_base.h:166
EDIT_TABLE_TOOL_BASE< PCB_TABLE, PCB_TABLECELL, BOARD_COMMIT >::doAddColumnBefore
int doAddColumnBefore(const TOOL_EVENT &aEvent)
Definition:
edit_table_tool_base.h:218
EDIT_TABLE_TOOL_BASE< PCB_TABLE, PCB_TABLECELL, BOARD_COMMIT >::doAddRowAbove
int doAddRowAbove(const TOOL_EVENT &aEvent)
Definition:
edit_table_tool_base.h:117
EDIT_TABLE_TOOL_BASE< PCB_TABLE, PCB_TABLECELL, BOARD_COMMIT >::doMergeCells
int doMergeCells(const TOOL_EVENT &aEvent)
Definition:
edit_table_tool_base.h:475
EDIT_TABLE_TOOL_BASE< PCB_TABLE, PCB_TABLECELL, BOARD_COMMIT >::doDeleteRows
int doDeleteRows(const TOOL_EVENT &aEvent)
Definition:
edit_table_tool_base.h:320
EDIT_TABLE_TOOL_BASE< PCB_TABLE, PCB_TABLECELL, BOARD_COMMIT >::doUnmergeCells
int doUnmergeCells(const TOOL_EVENT &aEvent)
Definition:
edit_table_tool_base.h:544
PCB_EDIT_TABLE_TOOL
Definition:
pcb_edit_table_tool.h:36
PCB_EDIT_TABLE_TOOL::AddRowAbove
int AddRowAbove(const TOOL_EVENT &aEvent)
Definition:
pcb_edit_table_tool.h:44
PCB_EDIT_TABLE_TOOL::EditTable
int EditTable(const TOOL_EVENT &aEvent)
Definition:
pcb_edit_table_tool.cpp:83
PCB_EDIT_TABLE_TOOL::DeleteRows
int DeleteRows(const TOOL_EVENT &aEvent)
Definition:
pcb_edit_table_tool.h:48
PCB_EDIT_TABLE_TOOL::AddRowBelow
int AddRowBelow(const TOOL_EVENT &aEvent)
Definition:
pcb_edit_table_tool.h:45
PCB_EDIT_TABLE_TOOL::Init
bool Init() override
Init() is called once upon a registration of the tool.
Definition:
pcb_edit_table_tool.cpp:38
PCB_EDIT_TABLE_TOOL::setTransitions
void setTransitions() override
< Set up handlers for various events.
Definition:
pcb_edit_table_tool.cpp:121
PCB_EDIT_TABLE_TOOL::~PCB_EDIT_TABLE_TOOL
~PCB_EDIT_TABLE_TOOL() override
Definition:
pcb_edit_table_tool.h:39
PCB_EDIT_TABLE_TOOL::UnmergeCells
int UnmergeCells(const TOOL_EVENT &aEvent)
Definition:
pcb_edit_table_tool.h:52
PCB_EDIT_TABLE_TOOL::AddColumnAfter
int AddColumnAfter(const TOOL_EVENT &aEvent)
Definition:
pcb_edit_table_tool.h:47
PCB_EDIT_TABLE_TOOL::DeleteColumns
int DeleteColumns(const TOOL_EVENT &aEvent)
Definition:
pcb_edit_table_tool.h:49
PCB_EDIT_TABLE_TOOL::PCB_EDIT_TABLE_TOOL
PCB_EDIT_TABLE_TOOL()
Definition:
pcb_edit_table_tool.cpp:32
PCB_EDIT_TABLE_TOOL::AddColumnBefore
int AddColumnBefore(const TOOL_EVENT &aEvent)
Definition:
pcb_edit_table_tool.h:46
PCB_EDIT_TABLE_TOOL::clearSelection
void clearSelection() override
Definition:
pcb_edit_table_tool.cpp:77
PCB_EDIT_TABLE_TOOL::getScreen
BASE_SCREEN * getScreen() override
Definition:
pcb_edit_table_tool.h:62
PCB_EDIT_TABLE_TOOL::getTableCellSelection
const SELECTION & getTableCellSelection() override
Definition:
pcb_edit_table_tool.cpp:59
PCB_EDIT_TABLE_TOOL::MergeCells
int MergeCells(const TOOL_EVENT &aEvent)
Definition:
pcb_edit_table_tool.h:51
PCB_EDIT_TABLE_TOOL::getToolMgr
TOOL_MANAGER * getToolMgr() override
Definition:
pcb_edit_table_tool.h:61
PCB_EDIT_TABLE_TOOL::copyCell
PCB_TABLECELL * copyCell(PCB_TABLECELL *aSource) override
Definition:
pcb_edit_table_tool.cpp:48
PCB_TABLECELL
Definition:
pcb_tablecell.h:32
PCB_TOOL_BASE
Definition:
pcb_tool_base.h:71
SELECTION
Definition:
selection.h:39
TOOL_BASE::m_toolMgr
TOOL_MANAGER * m_toolMgr
Definition:
tool_base.h:218
TOOL_EVENT
Generic, UI-independent tool event.
Definition:
tool_event.h:167
TOOL_MANAGER
Master controller class:
Definition:
tool_manager.h:62
edit_table_tool_base.h
pcb_table.h
pcb_tablecell.h
pcb_tool_base.h
src
pcbnew
tools
pcb_edit_table_tool.h
Generated on Wed Oct 30 2024 00:04:56 for KiCad PCB EDA Suite by
1.9.6