MCPcopy Create free account
hub / github.com/Kitware/VeloView / onUserGuide

Function onUserGuide

Application/Ui/python/lidarview/applogic.py:978–998  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

976
977
978def onUserGuide():
979 basePath = PythonQt.QtGui.QApplication.instance().applicationDirPath()
980 filename = 'VeloView_User_Guide.pdf'
981 dirs = ['../Resources', # apple
982 '../../doc', # linux
983 '../doc'] # windows
984
985 # on Linux we need to temporarily change LD_LIBRARY_PATH as it points to
986 # .so libraries likely to be incompatible with the PDF reader
987 if "LD_LIBRARY_PATH" in os.environ:
988 saved_ld_library_path = os.environ['LD_LIBRARY_PATH']
989 home_dir = os.path.expanduser("~")
990 os.environ['LD_LIBRARY_PATH'] = home_dir
991
992 for d in dirs:
993 path = os.path.abspath(os.path.join(basePath, os.path.join(d, filename)))
994 if os.path.isfile(path):
995 QtGui.QDesktopServices.openUrl(QtCore.QUrl('file:///%s' % path, QtCore.QUrl.TolerantMode))
996
997 if "LD_LIBRARY_PATH" in os.environ:
998 os.environ['LD_LIBRARY_PATH'] = saved_ld_library_path
999
1000
1001def onAbout():

Callers

nothing calls this directly

Calls 1

instanceMethod · 0.80

Tested by

no test coverage detected