KiCad PCB EDA Suite
kicad_manager_actions.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 (C) 2019 CERN
5  * Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
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 #include <tool/tool_action.h>
26 #include <bitmaps.h>
28 #include <frame_type.h>
29 
30 
31 // Actions, being statically-defined, require specialized I18N handling. We continue to
32 // use the _() macro so that string harvesting by the I18N framework doesn't have to be
33 // specialized, but we don't translate on initialization and instead do it in the getters.
34 
35 #undef _
36 #define _(s) s
37 
38 TOOL_ACTION KICAD_MANAGER_ACTIONS::newProject( "kicad.Control.newProject",
39  AS_GLOBAL,
40  MD_CTRL + 'N', LEGACY_HK_NAME( "New Project" ),
41  _( "New Project..." ), _( "Create new blank project" ),
42  new_project_xpm );
43 
44 TOOL_ACTION KICAD_MANAGER_ACTIONS::newFromTemplate( "kicad.Control.newFromTemplate",
45  AS_GLOBAL,
46  MD_CTRL + 'T', LEGACY_HK_NAME( "New Project From Template" ),
47  _( "New Project from Template..." ), _( "Create new project from template" ),
48  new_project_with_template_xpm );
49 
50 TOOL_ACTION KICAD_MANAGER_ACTIONS::openProject( "kicad.Control.openProject",
51  AS_GLOBAL,
52  MD_CTRL + 'O', LEGACY_HK_NAME( "Open Project" ),
53  _( "Open Project..." ), _( "Open an existing project" ),
54  open_project_xpm );
55 
56 TOOL_ACTION KICAD_MANAGER_ACTIONS::editSchematic( "kicad.Control.editSchematic",
57  AS_GLOBAL,
58  MD_CTRL + 'E', LEGACY_HK_NAME( "Run Eeschema" ),
59  _( "Edit Schematic" ), _( "Edit Schematic" ),
60  eeschema_xpm, AF_NONE, (void*) FRAME_SCH );
61 
62 TOOL_ACTION KICAD_MANAGER_ACTIONS::editSymbols( "kicad.Control.editSymbols",
63  AS_GLOBAL,
64  MD_CTRL + 'L', LEGACY_HK_NAME( "Run LibEdit" ),
65  _( "Edit Schematic Symbols" ), _( "Edit Schematic Symbols" ),
66  libedit_xpm, AF_NONE, (void*) FRAME_SCH_LIB_EDITOR );
67 
68 TOOL_ACTION KICAD_MANAGER_ACTIONS::editPCB( "kicad.Control.editPCB",
69  AS_GLOBAL,
70  MD_CTRL + 'P', LEGACY_HK_NAME( "Run Pcbnew" ),
71  _( "Edit PCB" ), _( "Edit PCB" ),
72  pcbnew_xpm, AF_NONE, (void*) FRAME_PCB );
73 
74 TOOL_ACTION KICAD_MANAGER_ACTIONS::editFootprints( "kicad.Control.editFootprints",
75  AS_GLOBAL,
76  MD_CTRL + 'F', LEGACY_HK_NAME( "Run FpEditor" ),
77  _( "Edit PCB Footprints" ), _( "Edit PCB Footprints" ),
78  module_editor_xpm, AF_NONE, (void*) FRAME_PCB_MODULE_EDITOR );
79 
80 TOOL_ACTION KICAD_MANAGER_ACTIONS::viewGerbers( "kicad.Control.viewGerbers",
81  AS_GLOBAL,
82  MD_CTRL + 'G', LEGACY_HK_NAME( "Run Gerbview" ),
83  _( "View Gerber Files" ), _( "View Gerber Files" ),
84  icon_gerbview_small_xpm );
85 
86 TOOL_ACTION KICAD_MANAGER_ACTIONS::convertImage( "kicad.Control.convertImage",
87  AS_GLOBAL,
88  MD_CTRL + 'B', LEGACY_HK_NAME( "Run Bitmap2Component" ),
89  _( "Convert Image" ), _( "Convert bitmap images to schematic or PCB components" ),
90  bitmap2component_xpm );
91 
92 TOOL_ACTION KICAD_MANAGER_ACTIONS::showCalculator( "kicad.Control.showCalculator",
93  AS_GLOBAL,
94  MD_CTRL + 'A', LEGACY_HK_NAME( "Run PcbCalculator" ),
95  _( "Calculator Tools" ), _( "Run component calculations, track width calculations, etc." ),
96  calculator_xpm );
97 
98 TOOL_ACTION KICAD_MANAGER_ACTIONS::editWorksheet( "kicad.Control.editWorksheet",
99  AS_GLOBAL,
100  MD_CTRL + 'Y', LEGACY_HK_NAME( "Run PlEditor" ),
101  _( "Edit Worksheet" ), _( "Edit worksheet graphics and text" ),
102  pagelayout_load_xpm );
103 
104 TOOL_ACTION KICAD_MANAGER_ACTIONS::openTextEditor( "kicad.Control.openTextEditor",
105  AS_GLOBAL,
106  0, "",
107  _( "Open Text Editor" ), _( "Launch preferred text editor" ),
108  editor_xpm );
109 
110 TOOL_ACTION KICAD_MANAGER_ACTIONS::editOtherSch( "kicad.Control.editOtherSch",
111  AS_GLOBAL );
112 
113 TOOL_ACTION KICAD_MANAGER_ACTIONS::editOtherPCB( "kicad.Control.editOtherPCB",
114  AS_GLOBAL );
115 
116 
static TOOL_ACTION newProject
#define LEGACY_HK_NAME(x)
Definition: actions.h:35
static TOOL_ACTION showCalculator
static TOOL_ACTION viewGerbers
static TOOL_ACTION newFromTemplate
static TOOL_ACTION convertImage
static TOOL_ACTION editOtherPCB
static TOOL_ACTION editSchematic
static TOOL_ACTION editFootprints
static TOOL_ACTION editWorksheet
All active tools
Definition: tool_event.h:144
#define _(s)
static TOOL_ACTION editOtherSch
static TOOL_ACTION editPCB
static TOOL_ACTION openProject
Class TOOL_ACTION.
Definition: tool_action.h:46
static TOOL_ACTION editSymbols
static TOOL_ACTION openTextEditor