Navigation Menu

Skip to content

Commit

Permalink
Navigation indicator for FreeCAD
Browse files Browse the repository at this point in the history
  • Loading branch information
triplus authored and wwmayer committed Feb 18, 2017
1 parent 4169e94 commit 978978f
Show file tree
Hide file tree
Showing 71 changed files with 2,920 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -231,6 +231,7 @@ OPTION(BUILD_SPREADSHEET "Build the FreeCAD spreadsheet module" ON)
OPTION(BUILD_START "Build the FreeCAD start module" ON)
OPTION(BUILD_TEST "Build the FreeCAD test module" ON)
OPTION(BUILD_TECHDRAW "Build the FreeCAD Technical Drawing module" ON)
OPTION(BUILD_TUX "Build the FreeCAD Tux module" ON)
OPTION(BUILD_WEB "Build the FreeCAD web module" ON)
OPTION(BUILD_VR "Build the FreeCAD Oculus Rift support (need Oculus SDK 4.x or higher)" OFF)

Expand Down
3 changes: 3 additions & 0 deletions src/Mod/CMakeLists.txt
Expand Up @@ -139,3 +139,6 @@ if(BUILD_ADDONMGR)
add_subdirectory(AddonManager)
endif(BUILD_ADDONMGR)

if(BUILD_TUX)
add_subdirectory(Tux)
endif(BUILD_TUX)
31 changes: 31 additions & 0 deletions src/Mod/Tux/CMakeLists.txt
@@ -0,0 +1,31 @@
IF (BUILD_GUI)
PYSIDE_WRAP_RC(Tux_QRC_SRCS Resources/Tux.qrc)
ENDIF (BUILD_GUI)

SET(Tux_SRCS
InitGui.py
NavigationIndicatorGui.py
)
SOURCE_GROUP("" FILES ${Tux_SRCS})

ADD_CUSTOM_TARGET(Tux ALL
SOURCES ${Tux_SRCS} ${Tux_QRC_SRCS}
)

fc_copy_sources(Tux "${CMAKE_BINARY_DIR}/Mod/Tux" ${Tux_SRCS})

IF (BUILD_GUI)
fc_target_copy_resource(Tux
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/Mod/Tux
Tux_rc.py)
ENDIF (BUILD_GUI)

INSTALL(
FILES
${Tux_SRCS}
${Tux_QRC_SRCS}
DESTINATION
Mod/Tux
)

26 changes: 26 additions & 0 deletions src/Mod/Tux/InitGui.py
@@ -0,0 +1,26 @@
# Tux module for FreeCAD
# Copyright (C) 2017 triplus @ FreeCAD
#
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

"""Tux module for FreeCAD."""

p = FreeCAD.ParamGet("User parameter:Tux")

if p.GetGroup("NavigationIndicator").GetBool("Enabled", 1):
import NavigationIndicatorGui
else:
pass

0 comments on commit 978978f

Please sign in to comment.