FreeCAD

Форк
0
/
Workbench.cpp 
91 строка · 3.4 Кб
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

31
using namespace PointsGui;
32

33
#if 0  // needed for Qt's lupdate utility
34
    qApp->translate("Workbench", "Points tools");
35
    qApp->translate("Workbench", "&Points");
36
#endif
37

38
/// @namespace PointsGui @class Workbench
39
TYPESYSTEM_SOURCE(PointsGui::Workbench, Gui::StdWorkbench)
40

41
Workbench::Workbench() = default;
42

43
Workbench::~Workbench() = default;
44

45
Gui::ToolBarItem* Workbench::setupToolBars() const
46
{
47
    Gui::ToolBarItem* root = StdWorkbench::setupToolBars();
48
    Gui::ToolBarItem* pnt = new Gui::ToolBarItem(root);
49
    pnt->setCommand("Points tools");
50
    *pnt << "Points_Import"
51
         << "Points_Export"
52
         << "Separator"
53
         << "Points_Convert"
54
         << "Points_Structure"
55
         << "Points_Merge"
56
         << "Points_PolyCut";
57
    return root;
58
}
59

60
Gui::ToolBarItem* Workbench::setupCommandBars() const
61
{
62
    // point tools
63
    Gui::ToolBarItem* root = new Gui::ToolBarItem;
64
    Gui::ToolBarItem* pnt = new Gui::ToolBarItem(root);
65
    pnt->setCommand("Points tools");
66
    *pnt << "Points_Import"
67
         << "Points_Export"
68
         << "Points_Convert"
69
         << "Points_Structure"
70
         << "Points_Merge";
71
    return root;
72
}
73

74
Gui::MenuItem* Workbench::setupMenuBar() const
75
{
76
    Gui::MenuItem* root = StdWorkbench::setupMenuBar();
77
    Gui::MenuItem* item = root->findItem("&Windows");
78
    Gui::MenuItem* pnts = new Gui::MenuItem;
79
    root->insertItem(item, pnts);
80

81
    pnts->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";
90
    return root;
91
}
92

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.