Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
limikael committed May 8, 2019
0 parents commit b01fafc
Show file tree
Hide file tree
Showing 11 changed files with 582 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__
40 changes: 40 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

IF (BUILD_GUI)
PYSIDE_WRAP_RC(Slcr_QRC_SRCS Resources/Slcr.qrc)
ENDIF (BUILD_GUI)

SET(Slcr_SRCS
Init.py
InitGui.py
Slcr.py
SlcrGui.py
)
SOURCE_GROUP("" FILES ${Slcr_SRCS})

ADD_CUSTOM_TARGET(Slcr ALL
SOURCES ${Slcr_SRCS} ${Slcr_QRC_SRCS}
)

fc_copy_sources(Slcr "${CMAKE_BINARY_DIR}/Mod/Slcr" ${Slcr_SRCS})

IF (BUILD_GUI)
fc_target_copy_resource(Slcr
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/Mod/Slcr
Slcr_rc.py)
ENDIF (BUILD_GUI)

INSTALL(
FILES
${Slcr_SRCS}
${Slcr_QRC_SRCS}
DESTINATION
Mod/Slcr
)

SET(SlcrGuiIcon_SVG
Resources/icons/SlcrWorkbench.svg
)

fc_copy_sources(Slcr "${CMAKE_BINARY_DIR}/Mod/Slcr" ${SlcrGuiIcon_SVG})
INSTALL(FILES ${SlcrGuiIcon_SVG} DESTINATION "Mod/Slcr/Resources/icons")
4 changes: 4 additions & 0 deletions Init.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# FreeCAD init script of the Slcr module
# (c) 2001 Juergen Riegel
# License LGPL
24 changes: 24 additions & 0 deletions InitGui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# Slcr gui init module
# (c) 2001 Juergen Riegel
# License LGPL


class SlcrWorkbench ( Workbench ):
"Slcr workbench object"

import SlcrRoot,os
Icon = os.path.dirname(SlcrRoot.__file__)+"/Resources/icons/Slic3r.svg"
MenuText = "Slic3r Tools"
ToolTip = "Slic3r Tools workbench"

def Initialize(self):
# load the module
import SlcrGui
self.appendToolbar('Slic3r Tools',['Slcr_HelloWorld'])
self.appendMenu('Slic&3r Tools',['Slcr_HelloWorld'])

def GetClassName(self):
return "Gui::PythonWorkbench"

Gui.addWorkbench(SlcrWorkbench())
5 changes: 5 additions & 0 deletions Resources/Slcr.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>icons/Slic3r.svg</file>
</qresource>
</RCC>
159 changes: 159 additions & 0 deletions Resources/icons/SlcrWorkbench.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b01fafc

Please sign in to comment.