feature/enable sending qml ui over network
Enable sending qml ui over network
@@ -234,6 +234,12 @@ class SkillGUI:
self.page = None # the active GUI page (e.g. QML template) to show
self.skill = skill
self.on_gui_changed_callback = None
+ self.config = Configuration.get()
+
+ @property
+ def remote_url(self):
+ """ Returns configuration value for url of remote-server. """
+ return self.config.get('remote-server')
def build_message_type(self, event):
""" Builds a message matching the output from the enclosure. """
@@ -346,6 +352,9 @@ class SkillGUI:
for name in page_names:
page = self.skill.find_resource(name, 'ui')
if page:
+ if self.config.get('remote') is True:
+ page_urls.append(self.remote_url + "/" + page)
+ else:
page_urls.append("file://" + page)
else:
raise FileNotFoundError("Unable to find page: {}".format(name))
