FreeCAD

Форк
0
/
InitGui.py 
60 строк · 2.8 Кб
1
# Drawing gui init module
2
# (c) 2003 Juergen Riegel
3
#
4
# Gathering all the information to start FreeCAD
5
# This is the second one of three init scripts, the third one
6
# runs when the gui is up
7

8
# ***************************************************************************
9
# *   (c) Juergen Riegel (juergen.riegel@web.de) 2002
10
# *                                                                         *
11
# *   This file is part of the FreeCAD CAx development system.              *
12
# *                                                                         *
13
# *   This program is free software; you can redistribute it and/or modify  *
14
# *   it under the terms of the GNU Lesser General Public License (LGPL)    *
15
# *   as published by the Free Software Foundation; either version 2 of     *
16
# *   the License, or (at your option) any later version.                   *
17
# *   for detail see the LICENCE text file.                                 *
18
# *                                                                         *
19
# *   FreeCAD is distributed in the hope that it will be useful,            *
20
# *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
21
# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
22
# *   GNU Lesser General Public License for more details.                   *
23
# *                                                                         *
24
# *   You should have received a copy of the GNU Library General Public     *
25
# *   License along with FreeCAD; if not, write to the Free Software        *
26
# *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  *
27
# *   USA                                                                   *
28
# *                                                                         *
29
# *   Juergen Riegel 2002                                                   *
30
# ***************************************************************************/
31

32

33
class DrawingWorkbench(Workbench):
34
    "Drawing workbench object"
35

36
    def __init__(self):
37
        self.__class__.Icon = (
38
            FreeCAD.getResourceDir() + "Mod/Drawing/Resources/icons/DrawingWorkbench.svg"
39
        )
40
        self.__class__.MenuText = "Drawing"
41
        self.__class__.ToolTip = "Drawing workbench"
42

43
    def Initialize(self):
44
        # load the module
45
        import DrawingGui
46

47
    def Activated(self):
48
        FreeCAD.Console.PrintWarning(
49
            "Drawing became obsolete in 0.17; " "consider using TechDraw instead.\n"
50
        )
51

52
    def GetClassName(self):
53
        return "DrawingGui::Workbench"
54

55

56
Gui.addWorkbench(DrawingWorkbench())
57

58
# Append the open handler
59
FreeCAD.addImportType("Drawing (*.svg *.svgz)", "DrawingGui")
60
FreeCAD.addExportType("Drawing (*.svg *.svgz *.dxf)", "DrawingGui")
61

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

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

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

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