Mod/Part/Gui/Workbench.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "PreCompiled.h"
00025
00026 #ifndef _PreComp_
00027 # include <qobject.h>
00028 #endif
00029
00030 #include "Workbench.h"
00031 #include <Gui/MenuManager.h>
00032 #include <Gui/ToolBarManager.h>
00033
00034 using namespace PartGui;
00035
00036 #if 0 // needed for Qt's lupdate utility
00037 qApp->translate("Workbench", "&Part");
00038 qApp->translate("Workbench", "&Simple");
00039 qApp->translate("Workbench", "&Parametric");
00040 qApp->translate("Workbench", "Solids");
00041 qApp->translate("Workbench", "Part tools");
00042 qApp->translate("Workbench", "Boolean");
00043 #endif
00044
00046 TYPESYSTEM_SOURCE(PartGui::Workbench, Gui::StdWorkbench)
00047
00048 Workbench::Workbench()
00049 {
00050 }
00051
00052 Workbench::~Workbench()
00053 {
00054 }
00055
00056 Gui::MenuItem* Workbench::setupMenuBar() const
00057 {
00058 Gui::MenuItem* root = StdWorkbench::setupMenuBar();
00059 Gui::MenuItem* item = root->findItem("&Windows");
00060
00061 Gui::MenuItem* part = new Gui::MenuItem;
00062 root->insertItem(item, part);
00063 part->setCommand("&Part");
00064 *part << "Part_Import" << "Part_Export" << "Separator";
00065 *part << "Part_Primitives" << "Part_ShapeFromMesh"
00066 << "Part_MakeSolid" << "Part_ReverseShape" << "Part_SimpleCopy" << "Separator"
00067 << "Part_Boolean" << "Part_CrossSections" << "Part_Extrude"
00068 << "Part_Revolve" << "Part_Mirror" << "Part_Fillet"
00069 << "Part_RuledSurface" << "Part_Loft"
00070 << "Part_Builder";
00071
00072 Gui::MenuItem* partSimple = new Gui::MenuItem;
00073 root->insertItem(item, partSimple);
00074 partSimple->setCommand("&Simple");
00075 *partSimple << "Part_SimpleCylinder";
00076
00077 Gui::MenuItem* solids = new Gui::MenuItem;
00078 root->insertItem(item, solids);
00079 solids->setCommand("&Parametric");
00080 *solids << "Part_Box" << "Part_Cylinder" << "Part_Sphere" << "Part_Cone"
00081 << "Part_Torus" << "Separator" << "Part_Primitives";
00082
00083 return root;
00084 }
00085
00086 Gui::ToolBarItem* Workbench::setupToolBars() const
00087 {
00088 Gui::ToolBarItem* root = StdWorkbench::setupToolBars();
00089
00090 Gui::ToolBarItem* solids = new Gui::ToolBarItem(root);
00091 solids->setCommand("Solids");
00092 *solids << "Part_Box" << "Part_Cylinder" << "Part_Sphere" << "Part_Cone" << "Part_Torus" << "Part_Primitives";
00093
00094 Gui::ToolBarItem* tool = new Gui::ToolBarItem(root);
00095 tool->setCommand("Part tools");
00096 *tool << "Part_Extrude" << "Part_Revolve" << "Part_Mirror" << "Part_Fillet" << "Part_RuledSurface";
00097
00098 Gui::ToolBarItem* boolop = new Gui::ToolBarItem(root);
00099 boolop->setCommand("Boolean");
00100 *boolop << "Part_Boolean" << "Part_Cut" << "Part_Fuse" << "Part_Common" << "Part_Section";
00101
00102 return root;
00103 }
00104
00105 Gui::ToolBarItem* Workbench::setupCommandBars() const
00106 {
00107
00108 Gui::ToolBarItem* root = new Gui::ToolBarItem;
00109 return root;
00110 }
00111