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" ),
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" ),
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  directory_xpm );
55 
56 TOOL_ACTION KICAD_MANAGER_ACTIONS::closeProject( "kicad.Control.closeProject",
57  AS_GLOBAL,
58  0, LEGACY_HK_NAME( "Close Project" ),
59  _( "Close Project" ), _( "Close the current project" ),
60  directory_xpm );
61 
62 TOOL_ACTION KICAD_MANAGER_ACTIONS::editSchematic( "kicad.Control.editSchematic",
63  AS_GLOBAL,
64  MD_CTRL + 'E', LEGACY_HK_NAME( "Run Eeschema" ),
65  _( "Edit Schematic" ), _( "Edit Schematic" ),
66  eeschema_xpm, AF_NONE, (void*) FRAME_SCH );
67 
68 TOOL_ACTION KICAD_MANAGER_ACTIONS::editSymbols( "kicad.Control.editSymbols",
69  AS_GLOBAL,
70  MD_CTRL + 'L', LEGACY_HK_NAME( "Run LibEdit" ),
71  _( "Edit Schematic Symbols" ), _( "Edit Schematic Symbols" ),
73 
74 TOOL_ACTION KICAD_MANAGER_ACTIONS::editPCB( "kicad.Control.editPCB",
75  AS_GLOBAL,
76  MD_CTRL + 'P', LEGACY_HK_NAME( "Run Pcbnew" ),
77  _( "Edit PCB" ), _( "Edit PCB" ),
79 
80 TOOL_ACTION KICAD_MANAGER_ACTIONS::editFootprints( "kicad.Control.editFootprints",
81  AS_GLOBAL,
82  MD_CTRL + 'F', LEGACY_HK_NAME( "Run FpEditor" ),
83  _( "Edit PCB Footprints" ), _( "Edit PCB Footprints" ),
85 
86 TOOL_ACTION KICAD_MANAGER_ACTIONS::viewGerbers( "kicad.Control.viewGerbers",
87  AS_GLOBAL,
88  MD_CTRL + 'G', LEGACY_HK_NAME( "Run Gerbview" ),
89  _( "View Gerber Files" ), _( "View Gerber Files" ),
91 
92 TOOL_ACTION KICAD_MANAGER_ACTIONS::convertImage( "kicad.Control.convertImage",
93  AS_GLOBAL,
94  MD_CTRL + 'B', LEGACY_HK_NAME( "Run Bitmap2Component" ),
95  _( "Convert Image" ), _( "Convert bitmap images to schematic or PCB components" ),
97 
98 TOOL_ACTION KICAD_MANAGER_ACTIONS::showCalculator( "kicad.Control.showCalculator",
99  AS_GLOBAL, 0, LEGACY_HK_NAME( "Run PcbCalculator" ),
100  _( "Calculator Tools" ), _( "Run component calculations, track width calculations, etc." ),
101  calculator_xpm );
102 
103 TOOL_ACTION KICAD_MANAGER_ACTIONS::editWorksheet( "kicad.Control.editWorksheet",
104  AS_GLOBAL,
105  MD_CTRL + 'Y', LEGACY_HK_NAME( "Run PlEditor" ),
106  _( "Edit Worksheet" ), _( "Edit worksheet graphics and text" ),
108 
109 TOOL_ACTION KICAD_MANAGER_ACTIONS::openTextEditor( "kicad.Control.openTextEditor",
110  AS_GLOBAL,
111  0, "",
112  _( "Open Text Editor" ), _( "Launch preferred text editor" ),
113  editor_xpm );
114 
115 TOOL_ACTION KICAD_MANAGER_ACTIONS::editOtherSch( "kicad.Control.editOtherSch",
116  AS_GLOBAL );
117 
118 TOOL_ACTION KICAD_MANAGER_ACTIONS::editOtherPCB( "kicad.Control.editOtherPCB",
119  AS_GLOBAL );
120 
121 
static TOOL_ACTION newProject
const BITMAP_OPAQUE libedit_xpm[1]
#define LEGACY_HK_NAME(x)
Definition: actions.h:35
const BITMAP_OPAQUE new_project_with_template_xpm[1]
const BITMAP_OPAQUE editor_xpm[1]
Definition: editor.cpp:83
const BITMAP_OPAQUE new_project_xpm[1]
Definition: new_project.cpp:32
static TOOL_ACTION showCalculator
static TOOL_ACTION viewGerbers
const BITMAP_OPAQUE pagelayout_load_xpm[1]
static TOOL_ACTION newFromTemplate
const BITMAP_OPAQUE bitmap2component_xpm[1]
static TOOL_ACTION convertImage
static TOOL_ACTION closeProject
static TOOL_ACTION editOtherPCB
const BITMAP_OPAQUE calculator_xpm[1]
Definition: calculator.cpp:100
static TOOL_ACTION editSchematic
const BITMAP_OPAQUE module_editor_xpm[1]
static TOOL_ACTION editFootprints
const BITMAP_OPAQUE pcbnew_xpm[1]
static TOOL_ACTION editWorksheet
All active tools
Definition: tool_event.h:147
#define _(s)
const BITMAP_OPAQUE directory_xpm[1]
Definition: directory.cpp:30
static TOOL_ACTION editOtherSch
static TOOL_ACTION editPCB
static TOOL_ACTION openProject
Represents a single user action.
Definition: tool_action.h:44
const BITMAP_OPAQUE eeschema_xpm[1]
const BITMAP_OPAQUE icon_gerbview_small_xpm[1]
static TOOL_ACTION editSymbols
static TOOL_ACTION openTextEditor