1
/***************************************************************************
2
* Copyright (c) 2024 David Friedli <david[at]friedli-be.ch> *
4
* This file is part of FreeCAD. *
6
* FreeCAD is free software: you can redistribute it and/or modify it *
7
* under the terms of the GNU Lesser General Public License as *
8
* published by the Free Software Foundation, either version 2.1 of the *
9
* License, or (at your option) any later version. *
11
* FreeCAD is distributed in the hope that it will be useful, but *
12
* WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14
* Lesser General Public License for more details. *
16
* You should have received a copy of the GNU Lesser General Public *
17
* License along with FreeCAD. If not, see *
18
* <https://www.gnu.org/licenses/>. *
20
**************************************************************************/
23
#include "PreCompiled.h"
24
#include "WorkbenchManipulator.h"
25
#include <Gui/MenuManager.h>
26
#include <Gui/ToolBarManager.h>
28
using namespace MeasureGui;
30
void WorkbenchManipulator::modifyMenuBar([[maybe_unused]] Gui::MenuItem* menuBar)
32
auto menuTools = menuBar->findItem("&Tools");
36
auto itemMeasure = new Gui::MenuItem();
37
itemMeasure->setCommand("Std_Measure");
38
menuTools->appendItem(itemMeasure);
41
void WorkbenchManipulator::modifyToolBars(Gui::ToolBarItem* toolBar)
43
auto tbView = toolBar->findItem("View");
48
auto itemMeasure = new Gui::ToolBarItem();
49
itemMeasure->setCommand("Std_Measure");
50
tbView->appendItem(itemMeasure);