Improve navbar
Signed-off-by: Rémi BERTHO <remi.bertho@dalan.fr>
This commit is contained in:
parent
7c604fab52
commit
50030cabc1
3 changed files with 12 additions and 4 deletions
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) <year> <copyright holders>
|
Copyright (c) 2018 Rémi BERTHO
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,12 @@
|
||||||
var PSV = new PhotoSphereViewer({
|
var PSV = new PhotoSphereViewer({
|
||||||
container: 'photosphere',
|
container: 'photosphere',
|
||||||
panorama: '__IMG_PATH__',
|
panorama: '__IMG_PATH__',
|
||||||
time_anim: false
|
time_anim: false,
|
||||||
|
navbar: [
|
||||||
|
'autorotate',
|
||||||
|
'zoom',
|
||||||
|
'caption'
|
||||||
|
]
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
7
main.py
7
main.py
|
@ -12,18 +12,21 @@ from PyQt5.QtWebEngineWidgets import *
|
||||||
path = os.path.dirname(os.path.realpath(sys.argv[0]))
|
path = os.path.dirname(os.path.realpath(sys.argv[0]))
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
|
|
||||||
|
img = sys.argv[1]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open("html/index.html", "r", encoding="utf8") as file:
|
with open("html/index.html", "r", encoding="utf8") as file:
|
||||||
html = file.read()
|
html = file.read()
|
||||||
except OSError as exception:
|
except OSError as exception:
|
||||||
print("Error: HTML file not found: " + str(exception))
|
print("Error: HTML file not found: " + str(exception))
|
||||||
html = html.replace("__IMG_PATH__", sys.argv[1])
|
html = html.replace("__IMG_PATH__", img)
|
||||||
|
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
|
app.setApplicationName("SimplePanoramaViewer")
|
||||||
|
|
||||||
web = QWebEngineView()
|
web = QWebEngineView()
|
||||||
web.setHtml(html,QUrl("file://" + path + "/index.html"))
|
web.setHtml(html,QUrl("file://" + path + "/index.html"))
|
||||||
web.setWindowTitle("SimplePanoramaViewer")
|
web.setWindowTitle(img)
|
||||||
web.show()
|
web.show()
|
||||||
|
|
||||||
sys.exit(app.exec_())
|
sys.exit(app.exec_())
|
||||||
|
|
Loading…
Reference in a new issue