Skip to content

Commit

Permalink
rename Q3DWebPageCommon.settings to .expSettings
Browse files Browse the repository at this point in the history
QWebEnginePage has its own member function settings()
  • Loading branch information
minorua committed Nov 27, 2023
1 parent 1440b23 commit a6ea27c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions q3dwebviewcommon.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, _=None):

def setup(self, settings, wnd=None, exportMode=False):
"""wnd: Q3DWindow or None (off-screen mode)"""
self.settings = settings
self.expSettings = settings
self.wnd = wnd or DummyWindow()
self.offScreen = bool(wnd is None)
self.exportMode = exportMode
Expand All @@ -58,25 +58,25 @@ def pageLoaded(self, ok):
if self.exportMode:
self.runScript("Q3D.Config.exportMode = true;")

if self.settings.isOrthoCamera():
if self.expSettings.isOrthoCamera():
self.runScript("Q3D.Config.orthoCamera = true;")

p = self.settings.widgetProperties("NorthArrow")
p = self.expSettings.widgetProperties("NorthArrow")
if p.get("visible"):
self.runScript("Q3D.Config.northArrow.enabled = true;")
self.runScript("Q3D.Config.northArrow.color = {};".format(hex_color(p.get("color", 0), prefix="0x")))

# navigation widget
if not self.settings.isNavigationEnabled():
if not self.expSettings.isNavigationEnabled():
self.runScript("Q3D.Config.navigation.enabled = false;")

# call init()
self.runScript("init({}, {}, {})".format(js_bool(self.offScreen), DEBUG_MODE, js_bool(self.isWebEnginePage)))

def initialized(self):
# labels
header = self.settings.headerLabel()
footer = self.settings.footerLabel()
header = self.expSettings.headerLabel()
footer = self.expSettings.footerLabel()
if header or footer:
self.runScript('setHFLabel(pyData())', data={"Header": header, "Footer": footer})

Expand Down

0 comments on commit a6ea27c

Please sign in to comment.