/*************************************************************************** * Copyright (c) 2023 David Carter * * * * This file is part of FreeCAD. * * * * FreeCAD is free software: you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as * * published by the Free Software Foundation, either version 2.1 of the * * License, or (at your option) any later version. * * * * FreeCAD 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 * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with FreeCAD. If not, see * * . * * * **************************************************************************/ #include "PreCompiled.h" #include #include #include "Workbench.h" using namespace MatGui; #if 0 // needed for Qt's lupdate utility qApp->translate("Workbench", "&Materials"); qApp->translate("Workbench", "Materials"); #endif /// @namespace MatGui @class Workbench TYPESYSTEM_SOURCE(MatGui::Workbench, Gui::StdWorkbench) Workbench::Workbench() = default; Workbench::~Workbench() = default; Gui::MenuItem* Workbench::setupMenuBar() const { Gui::MenuItem* root = StdWorkbench::setupMenuBar(); Gui::MenuItem* item = root->findItem("&Windows"); Gui::MenuItem* material = new Gui::MenuItem; root->insertItem(item, material); material->setCommand("&Material"); *material << "Material_Edit"; return root; } Gui::ToolBarItem* Workbench::setupToolBars() const { Gui::ToolBarItem* root = StdWorkbench::setupToolBars(); Gui::ToolBarItem* material = new Gui::ToolBarItem(root); material->setCommand("Material"); *material << "Material_Edit"; return root; } Gui::ToolBarItem* Workbench::setupCommandBars() const { // Part tools Gui::ToolBarItem* root = new Gui::ToolBarItem; return root; }