KiCad PCB EDA Suite
Loading...
Searching...
No Matches
toolbars_3d.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) 2016 Mario Luzeiro <[email protected]>
5 * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
6 * Copyright (C) 2013 Wayne Stambaugh <[email protected]>
7 * Copyright (C) 2023 CERN
8 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 */
23
24#include <eda_3d_viewer_frame.h>
25#include <tool/action_toolbar.h>
27#include <3d_viewer_id.h>
28
29#include <toolbars_3d.h>
30
31
32std::optional<TOOLBAR_CONFIGURATION> EDA_3D_VIEWER_TOOLBAR_SETTINGS::DefaultToolbarConfig( TOOLBAR_LOC aToolbar )
33{
35
36 // clang-format off
37 switch( aToolbar )
38 {
42 return std::nullopt;
43
45 config.AppendAction( EDA_3D_ACTIONS::reloadBoard );
46
47 config.AppendSeparator()
48 .AppendAction( EDA_3D_ACTIONS::copyToClipboard );
49
50 config.AppendSeparator()
51 .AppendAction( EDA_3D_ACTIONS::toggleRaytacing );
52
53 config.AppendSeparator()
54 .AppendAction( ACTIONS::zoomRedraw )
55 .AppendAction( ACTIONS::zoomInCenter )
56 .AppendAction( ACTIONS::zoomOutCenter )
57 .AppendAction( ACTIONS::zoomFitScreen );
58
59 config.AppendSeparator()
60 .AppendAction( EDA_3D_ACTIONS::rotateXCW )
61 .AppendAction( EDA_3D_ACTIONS::rotateXCCW );
62
63 config.AppendSeparator()
64 .AppendAction( EDA_3D_ACTIONS::rotateYCW )
65 .AppendAction( EDA_3D_ACTIONS::rotateYCCW );
66
67 config.AppendSeparator()
68 .AppendAction( EDA_3D_ACTIONS::rotateZCW )
69 .AppendAction( EDA_3D_ACTIONS::rotateZCCW );
70
71 config.AppendSeparator()
72 .AppendAction( EDA_3D_ACTIONS::flipView );
73
74 config.AppendSeparator()
75 .AppendAction( EDA_3D_ACTIONS::moveLeft )
76 .AppendAction( EDA_3D_ACTIONS::moveRight )
77 .AppendAction( EDA_3D_ACTIONS::moveUp )
78 .AppendAction( EDA_3D_ACTIONS::moveDown );
79
80 config.AppendSeparator()
81 .AppendAction( EDA_3D_ACTIONS::toggleOrtho );
82
83 config.AppendSeparator()
84 .AppendAction( EDA_3D_ACTIONS::showLayersManager );
85
86 break;
87 }
88
89 // clang-format on
90 return config;
91}
static TOOL_ACTION zoomRedraw
Definition actions.h:128
static TOOL_ACTION zoomOutCenter
Definition actions.h:132
static TOOL_ACTION zoomFitScreen
Definition actions.h:138
static TOOL_ACTION zoomInCenter
Definition actions.h:131
static TOOL_ACTION showLayersManager
static TOOL_ACTION rotateXCCW
static TOOL_ACTION reloadBoard
static TOOL_ACTION rotateZCCW
static TOOL_ACTION rotateZCW
static TOOL_ACTION rotateYCCW
static TOOL_ACTION rotateXCW
static TOOL_ACTION toggleOrtho
static TOOL_ACTION moveLeft
static TOOL_ACTION toggleRaytacing
static TOOL_ACTION moveUp
static TOOL_ACTION flipView
static TOOL_ACTION moveDown
static TOOL_ACTION copyToClipboard
static TOOL_ACTION moveRight
static TOOL_ACTION rotateYCW
std::optional< TOOLBAR_CONFIGURATION > DefaultToolbarConfig(TOOLBAR_LOC aToolbar) override
Get the default tools to show on the specified canvas toolbar.
Declaration of the eda_3d_viewer class.
@ RIGHT
Toolbar on the right side of the canvas.
@ LEFT
Toolbar on the left side of the canvas.
@ TOP_AUX
Toolbar on the top of the canvas.
@ TOP_MAIN
Toolbar on the top of the canvas.