KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_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 The 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 SCH_EDIT_TABLE_TOOL_H
25
#define SCH_EDIT_TABLE_TOOL_H
26
27
#include <
tools/sch_tool_base.h
>
28
#include <
tool/edit_table_tool_base.h
>
29
#include <
sch_table.h
>
30
#include <
sch_tablecell.h
>
31
#include <
sch_commit.h
>
32
33
34
class
SCH_EDIT_FRAME
;
35
36
37
class
SCH_EDIT_TABLE_TOOL
:
public
SCH_TOOL_BASE
<SCH_EDIT_FRAME>,
38
public
EDIT_TABLE_TOOL_BASE
<SCH_TABLE, SCH_TABLECELL, SCH_COMMIT>
39
{
40
public
:
41
SCH_EDIT_TABLE_TOOL
();
42
~SCH_EDIT_TABLE_TOOL
()
override
{ }
43
45
bool
Init
()
override
;
46
47
int
AddRowAbove
(
const
TOOL_EVENT
& aEvent ) {
return
doAddRowAbove
( aEvent ); }
48
int
AddRowBelow
(
const
TOOL_EVENT
& aEvent ) {
return
doAddRowBelow
( aEvent ); }
49
int
AddColumnBefore
(
const
TOOL_EVENT
& aEvent ) {
return
doAddColumnBefore
( aEvent ); }
50
int
AddColumnAfter
(
const
TOOL_EVENT
& aEvent ) {
return
doAddColumnAfter
( aEvent ); }
51
int
DeleteRows
(
const
TOOL_EVENT
& aEvent ) {
return
doDeleteRows
( aEvent ); }
52
int
DeleteColumns
(
const
TOOL_EVENT
& aEvent ) {
return
doDeleteColumns
( aEvent ); }
53
54
int
MergeCells
(
const
TOOL_EVENT
& aEvent ) {
return
doMergeCells
( aEvent ); }
55
int
UnmergeCells
(
const
TOOL_EVENT
& aEvent ) {
return
doUnmergeCells
( aEvent ); }
56
57
int
EditTable
(
const
TOOL_EVENT
& aEvent );
58
59
private
:
61
void
setTransitions
()
override
;
62
63
private
:
64
TOOL_MANAGER
*
getToolMgr
()
override
{
return
m_toolMgr
; }
65
BASE_SCREEN
*
getScreen
()
override
{
return
m_frame
->GetScreen(); }
66
67
const
SELECTION
&
getTableCellSelection
()
override
;
68
void
clearSelection
()
override
{
m_toolMgr
->RunAction(
ACTIONS::selectionClear
); };
69
70
SCH_TABLECELL
*
copyCell
(
SCH_TABLECELL
* aSource )
override
;
71
};
72
73
#endif
//SCH_EDIT_TABLE_TOOL_H
ACTIONS::selectionClear
static TOOL_ACTION selectionClear
Clear the current selection.
Definition
actions.h:223
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< SCH_TABLE, SCH_TABLECELL, SCH_COMMIT >::doDeleteColumns
int doDeleteColumns(const TOOL_EVENT &aEvent)
Definition
edit_table_tool_base.h:396
EDIT_TABLE_TOOL_BASE< SCH_TABLE, SCH_TABLECELL, SCH_COMMIT >::doAddColumnAfter
int doAddColumnAfter(const TOOL_EVENT &aEvent)
Definition
edit_table_tool_base.h:268
EDIT_TABLE_TOOL_BASE< SCH_TABLE, SCH_TABLECELL, SCH_COMMIT >::doAddRowBelow
int doAddRowBelow(const TOOL_EVENT &aEvent)
Definition
edit_table_tool_base.h:165
EDIT_TABLE_TOOL_BASE< SCH_TABLE, SCH_TABLECELL, SCH_COMMIT >::doAddColumnBefore
int doAddColumnBefore(const TOOL_EVENT &aEvent)
Definition
edit_table_tool_base.h:217
EDIT_TABLE_TOOL_BASE< SCH_TABLE, SCH_TABLECELL, SCH_COMMIT >::doAddRowAbove
int doAddRowAbove(const TOOL_EVENT &aEvent)
Definition
edit_table_tool_base.h:116
EDIT_TABLE_TOOL_BASE< SCH_TABLE, SCH_TABLECELL, SCH_COMMIT >::doMergeCells
int doMergeCells(const TOOL_EVENT &aEvent)
Definition
edit_table_tool_base.h:474
EDIT_TABLE_TOOL_BASE< SCH_TABLE, SCH_TABLECELL, SCH_COMMIT >::doDeleteRows
int doDeleteRows(const TOOL_EVENT &aEvent)
Definition
edit_table_tool_base.h:319
EDIT_TABLE_TOOL_BASE< SCH_TABLE, SCH_TABLECELL, SCH_COMMIT >::doUnmergeCells
int doUnmergeCells(const TOOL_EVENT &aEvent)
Definition
edit_table_tool_base.h:543
SCH_EDIT_FRAME
Schematic editor (Eeschema) main window.
Definition
sch_edit_frame.h:128
SCH_EDIT_TABLE_TOOL::setTransitions
void setTransitions() override
< Set up handlers for various events.
Definition
sch_edit_table_tool.cpp:103
SCH_EDIT_TABLE_TOOL::SCH_EDIT_TABLE_TOOL
SCH_EDIT_TABLE_TOOL()
Definition
sch_edit_table_tool.cpp:29
SCH_EDIT_TABLE_TOOL::getScreen
BASE_SCREEN * getScreen() override
Definition
sch_edit_table_tool.h:65
SCH_EDIT_TABLE_TOOL::DeleteRows
int DeleteRows(const TOOL_EVENT &aEvent)
Definition
sch_edit_table_tool.h:51
SCH_EDIT_TABLE_TOOL::MergeCells
int MergeCells(const TOOL_EVENT &aEvent)
Definition
sch_edit_table_tool.h:54
SCH_EDIT_TABLE_TOOL::clearSelection
void clearSelection() override
Definition
sch_edit_table_tool.h:68
SCH_EDIT_TABLE_TOOL::UnmergeCells
int UnmergeCells(const TOOL_EVENT &aEvent)
Definition
sch_edit_table_tool.h:55
SCH_EDIT_TABLE_TOOL::getToolMgr
TOOL_MANAGER * getToolMgr() override
Definition
sch_edit_table_tool.h:64
SCH_EDIT_TABLE_TOOL::AddRowBelow
int AddRowBelow(const TOOL_EVENT &aEvent)
Definition
sch_edit_table_tool.h:48
SCH_EDIT_TABLE_TOOL::AddColumnBefore
int AddColumnBefore(const TOOL_EVENT &aEvent)
Definition
sch_edit_table_tool.h:49
SCH_EDIT_TABLE_TOOL::EditTable
int EditTable(const TOOL_EVENT &aEvent)
Definition
sch_edit_table_tool.cpp:45
SCH_EDIT_TABLE_TOOL::getTableCellSelection
const SELECTION & getTableCellSelection() override
Definition
sch_edit_table_tool.cpp:97
SCH_EDIT_TABLE_TOOL::~SCH_EDIT_TABLE_TOOL
~SCH_EDIT_TABLE_TOOL() override
Definition
sch_edit_table_tool.h:42
SCH_EDIT_TABLE_TOOL::DeleteColumns
int DeleteColumns(const TOOL_EVENT &aEvent)
Definition
sch_edit_table_tool.h:52
SCH_EDIT_TABLE_TOOL::Init
bool Init() override
Init() is called once upon a registration of the tool.
Definition
sch_edit_table_tool.cpp:35
SCH_EDIT_TABLE_TOOL::AddColumnAfter
int AddColumnAfter(const TOOL_EVENT &aEvent)
Definition
sch_edit_table_tool.h:50
SCH_EDIT_TABLE_TOOL::AddRowAbove
int AddRowAbove(const TOOL_EVENT &aEvent)
Definition
sch_edit_table_tool.h:47
SCH_EDIT_TABLE_TOOL::copyCell
SCH_TABLECELL * copyCell(SCH_TABLECELL *aSource) override
Definition
sch_edit_table_tool.cpp:84
SCH_TABLECELL
Definition
sch_tablecell.h:32
SCH_TOOL_BASE< SCH_EDIT_FRAME >::m_frame
SCH_EDIT_FRAME * m_frame
Definition
sch_tool_base.h:373
SCH_TOOL_BASE< SCH_EDIT_FRAME >::SCH_TOOL_BASE
SCH_TOOL_BASE(const std::string &aName)
Definition
sch_tool_base.h:58
SELECTION
Definition
selection.h:39
SCH_TOOL_BASE< SCH_EDIT_FRAME >::m_toolMgr
TOOL_MANAGER * m_toolMgr
Definition
tool_base.h:220
TOOL_EVENT
Generic, UI-independent tool event.
Definition
tool_event.h:171
TOOL_INTERACTIVE::TOOL_MANAGER
friend class TOOL_MANAGER
Definition
tool_interactive.h:142
edit_table_tool_base.h
sch_commit.h
sch_table.h
sch_tablecell.h
sch_tool_base.h
src
eeschema
tools
sch_edit_table_tool.h
Generated on Sun Sep 21 2025 01:05:24 for KiCad PCB EDA Suite by
1.13.2