FreeCAD

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

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

32

33
# Registered in Part's Init.py file
34
FreeCAD.changeImportModule("STEP with colors (*.step *.STEP *.stp *.STP)", "Import", "ImportGui")
35
FreeCAD.changeExportModule("STEP with colors (*.step *.stp)", "Import", "ImportGui")
36
FreeCAD.changeExportModule("glTF (*.gltf *.glb)", "Import", "ImportGui")
37

38
App.__unit_test__ += ["TestImportGui"]
39

40
"""
41
class ImportWorkbench ( Workbench ):
42
    "Import workbench object"
43
    def Activate(self):
44
        # load the module
45
        try:
46
            Log ('Loading ImportGui module')
47
            import Import
48
            import ImportGui
49
        except ImportError:
50
            Err('Cannot load ImportGui')
51
            raise
52
    def GetIcon(self):
53
        # returns an icon for the workbench
54
        return ["/* XPM */\n"
55
            "static const char *fileopen[] = {\n"
56
            "\"16 13 5 1\",\n"
57
            "\". c #040404\",\n"
58
            "\"# c #808304\",\n"
59
            "\"a c None\",\n"
60
            "\"b c #f3f704\",\n"
61
            "\"c c #f3f7f3\",\n"
62
            "\"aaaaaaaaa...aaaa\",\n"
63
            "\"aaaaaaaa.aaa.a.a\",\n"
64
            "\"aaaaaaaaaaaaa..a\",\n"
65
            "\"a...aaaaaaaa...a\",\n"
66
            "\".bcb.......aaaaa\",\n"
67
            "\".cbcbcbcbc.aaaaa\",\n"
68
            "\".bcbcbcbcb.aaaaa\",\n"
69
            "\".cbcb...........\",\n"
70
            "\".bcb.#########.a\",\n"
71
            "\".cb.#########.aa\",\n"
72
            "\".b.#########.aaa\",\n"
73
            "\"..#########.aaaa\",\n"
74
            "\"...........aaaaa\"};\n"]
75

76
Gui.addWorkbench("Import",ImportWorkbench())
77
"""
78
# See https://forum.freecad.org/viewtopic.php?f=3&t=26782
79
# import Import_rc
80
# FreeCADGui.addPreferencePage(":/ui/preferences-import.ui","Import-Export")
81

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

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

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

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