2019-06-17 01:34:21 +01:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2019-08-14 09:28:07 +01:00
|
|
|
* Copyright (C) 2019 CERN
|
2019-06-17 01:34:21 +01:00
|
|
|
* Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <tool/tool_action.h>
|
|
|
|
#include <bitmaps.h>
|
|
|
|
#include <tools/kicad_manager_actions.h>
|
2019-06-17 23:02:30 +01:00
|
|
|
#include <frame_type.h>
|
2019-06-17 01:34:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
// Actions, being statically-defined, require specialized I18N handling. We continue to
|
|
|
|
// use the _() macro so that string harvesting by the I18N framework doesn't have to be
|
|
|
|
// specialized, but we don't translate on initialization and instead do it in the getters.
|
|
|
|
|
|
|
|
#undef _
|
|
|
|
#define _(s) s
|
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::newProject( "kicad.Control.newProject",
|
|
|
|
AS_GLOBAL,
|
|
|
|
MD_CTRL + 'N', LEGACY_HK_NAME( "New Project" ),
|
|
|
|
_( "New Project..." ), _( "Create new blank project" ),
|
|
|
|
new_project_xpm );
|
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::newFromTemplate( "kicad.Control.newFromTemplate",
|
|
|
|
AS_GLOBAL,
|
|
|
|
MD_CTRL + 'T', LEGACY_HK_NAME( "New Project From Template" ),
|
|
|
|
_( "New Project from Template..." ), _( "Create new project from template" ),
|
|
|
|
new_project_with_template_xpm );
|
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::openProject( "kicad.Control.openProject",
|
|
|
|
AS_GLOBAL,
|
|
|
|
MD_CTRL + 'O', LEGACY_HK_NAME( "Open Project" ),
|
|
|
|
_( "Open Project..." ), _( "Open an existing project" ),
|
2019-11-09 19:39:08 +00:00
|
|
|
directory_xpm );
|
2019-06-17 01:34:21 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editSchematic( "kicad.Control.editSchematic",
|
|
|
|
AS_GLOBAL,
|
|
|
|
MD_CTRL + 'E', LEGACY_HK_NAME( "Run Eeschema" ),
|
2019-07-02 22:25:53 +01:00
|
|
|
_( "Edit Schematic" ), _( "Edit Schematic" ),
|
2019-07-17 19:59:42 +02:00
|
|
|
eeschema_xpm, AF_NONE, (void*) FRAME_SCH );
|
2019-06-17 01:34:21 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editSymbols( "kicad.Control.editSymbols",
|
|
|
|
AS_GLOBAL,
|
|
|
|
MD_CTRL + 'L', LEGACY_HK_NAME( "Run LibEdit" ),
|
2019-07-02 22:25:53 +01:00
|
|
|
_( "Edit Schematic Symbols" ), _( "Edit Schematic Symbols" ),
|
2019-07-17 19:59:42 +02:00
|
|
|
libedit_xpm, AF_NONE, (void*) FRAME_SCH_LIB_EDITOR );
|
2019-06-17 01:34:21 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editPCB( "kicad.Control.editPCB",
|
|
|
|
AS_GLOBAL,
|
|
|
|
MD_CTRL + 'P', LEGACY_HK_NAME( "Run Pcbnew" ),
|
2019-07-02 22:25:53 +01:00
|
|
|
_( "Edit PCB" ), _( "Edit PCB" ),
|
2019-09-05 23:00:47 +01:00
|
|
|
pcbnew_xpm, AF_NONE, (void*) FRAME_PCB_EDITOR );
|
2019-06-17 01:34:21 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editFootprints( "kicad.Control.editFootprints",
|
|
|
|
AS_GLOBAL,
|
|
|
|
MD_CTRL + 'F', LEGACY_HK_NAME( "Run FpEditor" ),
|
2019-07-02 22:25:53 +01:00
|
|
|
_( "Edit PCB Footprints" ), _( "Edit PCB Footprints" ),
|
2019-09-05 23:00:47 +01:00
|
|
|
module_editor_xpm, AF_NONE, (void*) FRAME_FOOTPRINT_EDITOR );
|
2019-06-17 01:34:21 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::viewGerbers( "kicad.Control.viewGerbers",
|
|
|
|
AS_GLOBAL,
|
|
|
|
MD_CTRL + 'G', LEGACY_HK_NAME( "Run Gerbview" ),
|
2019-07-02 22:25:53 +01:00
|
|
|
_( "View Gerber Files" ), _( "View Gerber Files" ),
|
2019-07-17 19:59:42 +02:00
|
|
|
icon_gerbview_small_xpm );
|
2019-06-17 01:34:21 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::convertImage( "kicad.Control.convertImage",
|
|
|
|
AS_GLOBAL,
|
|
|
|
MD_CTRL + 'B', LEGACY_HK_NAME( "Run Bitmap2Component" ),
|
|
|
|
_( "Convert Image" ), _( "Convert bitmap images to schematic or PCB components" ),
|
2019-07-17 19:59:42 +02:00
|
|
|
bitmap2component_xpm );
|
2019-06-17 01:34:21 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::showCalculator( "kicad.Control.showCalculator",
|
|
|
|
AS_GLOBAL,
|
|
|
|
MD_CTRL + 'A', LEGACY_HK_NAME( "Run PcbCalculator" ),
|
|
|
|
_( "Calculator Tools" ), _( "Run component calculations, track width calculations, etc." ),
|
2019-07-17 19:59:42 +02:00
|
|
|
calculator_xpm );
|
2019-06-17 01:34:21 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editWorksheet( "kicad.Control.editWorksheet",
|
|
|
|
AS_GLOBAL,
|
|
|
|
MD_CTRL + 'Y', LEGACY_HK_NAME( "Run PlEditor" ),
|
|
|
|
_( "Edit Worksheet" ), _( "Edit worksheet graphics and text" ),
|
2019-07-17 19:59:42 +02:00
|
|
|
pagelayout_load_xpm );
|
2019-06-17 01:34:21 +01:00
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::openTextEditor( "kicad.Control.openTextEditor",
|
|
|
|
AS_GLOBAL,
|
|
|
|
0, "",
|
|
|
|
_( "Open Text Editor" ), _( "Launch preferred text editor" ),
|
|
|
|
editor_xpm );
|
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editOtherSch( "kicad.Control.editOtherSch",
|
|
|
|
AS_GLOBAL );
|
|
|
|
|
|
|
|
TOOL_ACTION KICAD_MANAGER_ACTIONS::editOtherPCB( "kicad.Control.editOtherPCB",
|
|
|
|
AS_GLOBAL );
|
|
|
|
|
|
|
|
|