FreeCAD
52 строки · 2.5 Кб
1# ***************************************************************************
2# * Copyright (c) 2002,2003 Juergen Riegel <juergen.riegel@web.de> *
3# * Copyright (c) 2013 Eivind Kvedalen <eivind@kvedalen.name> *
4# * *
5# * This file is part of the FreeCAD CAx development system. *
6# * *
7# * This program is free software; you can redistribute it and/or modify *
8# * it under the terms of the GNU General Public License (GPL) *
9# * as published by the Free Software Foundation; either version 2 of *
10# * the License, or (at your option) any later version. *
11# * for detail see the LICENCE text file. *
12# * *
13# * FreeCAD is distributed in the hope that it will be useful, *
14# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16# * GNU Library General Public License for more details. *
17# * *
18# * You should have received a copy of the GNU Library General Public *
19# * License along with FreeCAD; if not, write to the Free Software *
20# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
21# * USA *
22# ***************************************************************************/
23
24# Spreadsheet gui init module
25#
26# Gathering all the information to start FreeCAD
27# This is the second one of three init scripts, the third one
28# runs when the gui is up
29
30
31class SpreadsheetWorkbench(Workbench):32"Spreadsheet workbench object"33
34def __init__(self):35self.__class__.Icon = (36FreeCAD.getResourceDir() + "Mod/Spreadsheet/Resources/icons/SpreadsheetWorkbench.svg"37)38self.__class__.MenuText = "Spreadsheet"39self.__class__.ToolTip = "Spreadsheet workbench"40
41def Initialize(self):42# load the module43import SpreadsheetGui44
45def GetClassName(self):46return "SpreadsheetGui::Workbench"47
48
49Gui.addWorkbench(SpreadsheetWorkbench())50
51# Append the open handler
52FreeCAD.addImportType("Spreadsheet formats (*.csv *.CSV)", "SpreadsheetGui")53