diff options
author | Rahul P | 2020-08-08 19:16:28 +0530 |
---|---|---|
committer | GitHub | 2020-08-08 19:16:28 +0530 |
commit | 8255c72075ab3541e8b6cfa7facb4e016157a905 (patch) | |
tree | e86226cc6a609e54133b527ad71912996360722b /src/browser/UserManual.py | |
parent | 175208c2553bde875968a9bc53176b6039ba9360 (diff) | |
parent | 7871e58975d75eb2b02928f7a48d29113bebeb2b (diff) | |
download | eSim-8255c72075ab3541e8b6cfa7facb4e016157a905.tar.gz eSim-8255c72075ab3541e8b6cfa7facb4e016157a905.tar.bz2 eSim-8255c72075ab3541e8b6cfa7facb4e016157a905.zip |
Merge pull request #156 from rahulp13/master
ported GUI to PyQt5; platform independent paths; launch ngspice through mintty on Win OS
Diffstat (limited to 'src/browser/UserManual.py')
-rw-r--r-- | src/browser/UserManual.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/browser/UserManual.py b/src/browser/UserManual.py index f31af29d..e723680a 100644 --- a/src/browser/UserManual.py +++ b/src/browser/UserManual.py @@ -1,28 +1,28 @@ -from PyQt4 import QtGui +from PyQt5 import QtWidgets import subprocess -import platform import os -class UserManual(QtGui.QWidget): +class UserManual(QtWidgets.QWidget): """ This class opens User-Manual page in new tab of web browser when help button is clicked. """ def __init__(self): - QtGui.QWidget.__init__(self) + QtWidgets.QWidget.__init__(self) - self.vlayout = QtGui.QVBoxLayout() + self.vlayout = QtWidgets.QVBoxLayout() - file = os.path.realpath( - 'library/browser/User-Manual/eSim_Manual_2019_Dec_31.pdf' - ) + manual = 'library/browser/User-Manual/eSim_Manual_2.1.pdf' - if 'Win' in platform.system(): - os.startfile(file) + if os.name == 'nt': + os.startfile(os.path.realpath(manual)) else: - subprocess.Popen(['xpdf.real', file], shell=False) + manual_path = '../../' + manual + subprocess.Popen( + ['xdg-open', os.path.realpath(manual_path)], shell=False + ) self.setLayout(self.vlayout) self.show() |