FreeCAD
1/***************************************************************************
2* Copyright (c) 2005 Werner Mayer <wmayer[at]users.sourceforge.net> *
3* *
4* This file is part of the FreeCAD CAx development system. *
5* *
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. *
10* *
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. *
15* *
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 *
20* *
21***************************************************************************/
22
23#include "PreCompiled.h"24
25#include <Gui/MenuManager.h>26#include <Gui/ToolBarManager.h>27
28#include "Workbench.h"29
30
31using namespace PointsGui;32
33#if 0 // needed for Qt's lupdate utility34qApp->translate("Workbench", "Points tools");35qApp->translate("Workbench", "&Points");36#endif37
38/// @namespace PointsGui @class Workbench
39TYPESYSTEM_SOURCE(PointsGui::Workbench, Gui::StdWorkbench)40
41Workbench::Workbench() = default;42
43Workbench::~Workbench() = default;44
45Gui::ToolBarItem* Workbench::setupToolBars() const46{
47Gui::ToolBarItem* root = StdWorkbench::setupToolBars();48Gui::ToolBarItem* pnt = new Gui::ToolBarItem(root);49pnt->setCommand("Points tools");50*pnt << "Points_Import"51<< "Points_Export"52<< "Separator"53<< "Points_Convert"54<< "Points_Structure"55<< "Points_Merge"56<< "Points_PolyCut";57return root;58}
59
60Gui::ToolBarItem* Workbench::setupCommandBars() const61{
62// point tools63Gui::ToolBarItem* root = new Gui::ToolBarItem;64Gui::ToolBarItem* pnt = new Gui::ToolBarItem(root);65pnt->setCommand("Points tools");66*pnt << "Points_Import"67<< "Points_Export"68<< "Points_Convert"69<< "Points_Structure"70<< "Points_Merge";71return root;72}
73
74Gui::MenuItem* Workbench::setupMenuBar() const75{
76Gui::MenuItem* root = StdWorkbench::setupMenuBar();77Gui::MenuItem* item = root->findItem("&Windows");78Gui::MenuItem* pnts = new Gui::MenuItem;79root->insertItem(item, pnts);80
81pnts->setCommand("&Points");82*pnts << "Points_Convert"83<< "Points_Structure"84<< "Separator"85<< "Points_Import"86<< "Points_Export"87<< "Separator"88<< "Points_PolyCut"89<< "Points_Merge";90return root;91}
92