75 lines
2.7 KiB
C++
75 lines
2.7 KiB
C++
/***************************************************************************
|
|
* Copyright (c) 2023 David Carter <dcarter@david.carter.ca> *
|
|
* *
|
|
* 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 *
|
|
* <https://www.gnu.org/licenses/>. *
|
|
* *
|
|
**************************************************************************/
|
|
|
|
|
|
#include "PreCompiled.h"
|
|
|
|
#include <Gui/MenuManager.h>
|
|
#include <Gui/ToolBarManager.h>
|
|
|
|
#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;
|
|
}
|