1
/***************************************************************************
2
* Copyright (c) 2005 Werner Mayer <wmayer[at]users.sourceforge.net> *
4
* This file is part of the FreeCAD CAx development system. *
6
* This library is free software; you can redistribute it and/or *
7
* modify it under the terms of the GNU Library General Public *
8
* License as published by the Free Software Foundation; either *
9
* version 2 of the License, or (at your option) any later version. *
11
* This library 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 Library General Public License for more details. *
16
* You should have received a copy of the GNU Library General Public *
17
* License along with this library; see the file COPYING.LIB. If not, *
18
* write to the Free Software Foundation, Inc., 59 Temple Place, *
19
* Suite 330, Boston, MA 02111-1307, USA *
21
***************************************************************************/
23
#include "PreCompiled.h"
25
#include <Gui/MenuManager.h>
26
#include <Gui/ToolBarManager.h>
31
using namespace DrawingGui;
33
#if 0 // needed for Qt's lupdate utility
34
qApp->translate("Workbench", "Drawing");
37
/// @namespace DrawingGui @class Workbench
38
TYPESYSTEM_SOURCE(DrawingGui::Workbench, Gui::StdWorkbench)
43
Workbench::~Workbench()
46
Gui::MenuItem* Workbench::setupMenuBar() const
48
Gui::MenuItem* root = StdWorkbench::setupMenuBar();
49
Gui::MenuItem* item = root->findItem("&Windows");
51
Gui::MenuItem* part = new Gui::MenuItem;
52
root->insertItem(item, part);
53
part->setCommand("Drawing");
54
*part << "Drawing_Open";
55
//*part << "Drawing_NewA3Landscape";
56
*part << "Drawing_NewPage";
57
*part << "Drawing_NewView";
58
*part << "Drawing_OrthoViews";
59
*part << "Drawing_OpenBrowserView";
60
*part << "Drawing_Annotation";
61
*part << "Drawing_Clip";
62
*part << "Drawing_Symbol";
63
*part << "Drawing_DraftView";
64
*part << "Drawing_SpreadsheetView";
65
*part << "Drawing_ExportPage";
67
*part << "Drawing_ProjectShape";
72
Gui::ToolBarItem* Workbench::setupToolBars() const
74
Gui::ToolBarItem* root = StdWorkbench::setupToolBars();
75
Gui::ToolBarItem* part = new Gui::ToolBarItem(root);
76
part->setCommand("Drawing");
77
*part << "Drawing_Open";
78
//*part << "Drawing_NewA3Landscape";
79
*part << "Drawing_NewPage";
80
*part << "Drawing_NewView";
81
*part << "Drawing_OrthoViews";
82
*part << "Drawing_OpenBrowserView";
83
*part << "Drawing_Annotation";
84
*part << "Drawing_Clip";
85
*part << "Drawing_Symbol";
86
*part << "Drawing_DraftView";
87
*part << "Drawing_SpreadsheetView";
88
*part << "Drawing_ExportPage";
92
Gui::ToolBarItem* Workbench::setupCommandBars() const
95
Gui::ToolBarItem* root = new Gui::ToolBarItem;
96
Gui::ToolBarItem* img = new Gui::ToolBarItem(root);
97
img->setCommand("I/O");
98
*img << "Drawing_Open";
99
img = new Gui::ToolBarItem(root);
100
img->setCommand("Drawing types");
101
//*img << "Drawing_NewA3Landscape";
102
*img << "Drawing_NewPage";
103
*img << "Drawing_OrthoViews";
104
*img << "Drawing_OpenBrowserView";
105
*img << "Drawing_Annotation";
106
*img << "Drawing_Clip";
107
*img << "Drawing_DraftView";
108
img = new Gui::ToolBarItem(root);
109
img->setCommand("Views");
110
*img << "Drawing_NewView";